| Package | Description |
|---|---|
| net.sf.okapi.common |
Classes commonly used across the whole Okapi Framework.
|
| net.sf.okapi.common.annotation |
Classes to implement and manage annotations.
|
| net.sf.okapi.common.filters |
Interfaces and base classes to implement filters
|
| net.sf.okapi.common.filterwriter |
Interfaces and classes to allow the output of a document in its original
format.
|
| net.sf.okapi.common.resource |
Interfaces and classes that represent the parsed resources attached to the
events sent by a filter.
|
| Modifier and Type | Method and Description |
|---|---|
int |
ISegmenter.computeSegments(TextContainer container)
Calculates the segmentation of a given TextContainer object.
|
Range |
ISegmenter.getNextSegmentRange(TextContainer container)
Compute the range of the next segment for a given TextContainer object.
|
static void |
RenumberingUtil.renumberCodesForDesegmentation(TextContainer tc)
Reverse the renumbering process that was performed during segmentation.
|
static void |
RenumberingUtil.renumberCodesForSegmentation(TextContainer tc)
Renumber the codes in a TextContainer for segmentation.
|
| Modifier and Type | Method and Description |
|---|---|
TextContainer |
AltTranslation.getSource()
Gets the source content of this entry (can be empty)
If the result is empty, it means the source is the same as the source of the object (segment or text container)
is attached to.
|
TextContainer |
AltTranslation.getTarget()
Gets the target content of this entry.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
GenericAnnotation.addAnnotation(TextContainer tc,
GenericAnnotation ann)
Adds an annotation to a text container.
|
static void |
ITSLQIAnnotations.addAnnotations(TextContainer tc,
GenericAnnotation issue)
Adds an LQI annotation to a text container.
|
static void |
ITSLQIAnnotations.addAnnotations(TextContainer tc,
ITSLQIAnnotations newSet)
Adds an ITSLQIAnnotations to a text container.
|
static void |
ITSProvenanceAnnotations.addAnnotations(TextContainer tc,
ITSProvenanceAnnotations newSet) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract TextProcessingResult |
AbstractLineFilter.processLine(TextContainer lineContainer)
Called by the filter for every line read from the input
|
| Modifier and Type | Method and Description |
|---|---|
String |
GenericContent.printSegmentedContent(TextContainer container,
boolean showSegments)
Prints a generic string representation of a given segmented text, with optional
markers to indicate the segments boundaries.
|
String |
GenericContent.printSegmentedContent(TextContainer container,
boolean showSegments,
boolean normalText)
Prints a string representation of a given segmented text, with optional
markers to indicate the segments boundaries.
|
String |
XLIFFContent.toSegmentedString(TextContainer container,
int quoteMode,
boolean escapeGT,
boolean withMarkers,
boolean gMode,
boolean codeAttrs,
boolean includeIts,
LocaleId trgLocId)
Generates an XLIFF string from a given text container.
|
protected void |
TMXWriter.writeAllPropertiesAsAttibutes(XMLWriter writer,
Set<String> names,
TextContainer item) |
protected void |
TMXWriter.writeTUV(TextFragment frag,
LocaleId locale,
TextContainer contForProp)
Writes a TUV element.
|
| Modifier and Type | Method and Description |
|---|---|
TextContainer |
TextContainer.clone()
Clones this TextContainer, including the properties.
|
TextContainer |
TextContainer.clone(boolean cloneProperties)
Clones this container, with or without its properties.
|
TextContainer |
TextUnit.createTarget(LocaleId targetLocale,
boolean overwriteExisting,
int creationOptions) |
TextContainer |
ITextUnit.createTarget(LocaleId locId,
boolean overwriteExisting,
int creationOptions)
Creates or get the target for this TextUnit.
|
TextContainer |
Segments.getParent() |
TextContainer |
TextUnit.getSource() |
TextContainer |
ITextUnit.getSource()
Gets the source object for this text unit (a
TextContainer object). |
TextContainer |
TextUnit.getTarget(LocaleId locId) |
TextContainer |
ITextUnit.getTarget(LocaleId locId)
Gets the target object for this text unit for a given locale.
|
TextContainer |
TextContainer.setContentFromString(String data)
Sets content of this TextContainer from a string created by
contentToString(TextContainer). |
TextContainer |
TextUnit.setSource(TextContainer textContainer) |
TextContainer |
ITextUnit.setSource(TextContainer textContainer)
Sets the source object for this TextUnit.
|
TextContainer |
TextUnit.setTarget(LocaleId locId,
TextContainer text) |
TextContainer |
ITextUnit.setTarget(LocaleId locId,
TextContainer text)
Sets the target object for this text unit for a given locale.
|
static TextContainer |
TextContainer.splitStorageToContent(String ctext,
String codes)
Creates a new
TextContainer object from two strings generated
with contentToSplitStorage(TextContainer). |
static TextContainer |
TextContainer.stringToContent(String data)
Converts a string created by
contentToString(TextContainer)
back into a TextContainer. |
| Modifier and Type | Method and Description |
|---|---|
static AltTranslationsAnnotation |
TextUnitUtil.addAltTranslation(TextContainer targetContainer,
AltTranslation alt)
Adds an
AltTranslation object to a given TextContainer. |
static ITextUnit |
TextUnitUtil.buildGenericTU(ITextUnit textUnit,
String name,
TextContainer source,
TextContainer target,
LocaleId locId,
String comment)
Creates a new generic text unit resource or updates the one passed as the parameter.
|
static ITextUnit |
TextUnitUtil.buildGenericTU(TextContainer source)
Creates a new generic text unit resource based on a given text container object becoming the source part of the text
unit.
|
int |
TextContainer.compareTo(TextContainer cont,
boolean codeSensitive)
Compares this container with another one.
|
static String[] |
TextContainer.contentToSplitStorage(TextContainer tc)
Create two storage strings to serialize a given
TextContainer. |
static String |
TextContainer.contentToString(TextContainer tc)
Creates a string that stores the content of a given container.
|
static void |
TextUnitUtil.convertTextParts_whitespaceCodesToText(TextContainer tc) |
static void |
TextUnitUtil.convertTextPartsToCodes(TextContainer tc)
Convert all TextParts (not Segments) in a given TextContainer to each contain
a single code with the part's text.
|
static boolean |
TextUnitUtil.isWellformed(TextContainer tc) |
static boolean |
TextUnitUtil.needsPreserveWhitespaces(TextContainer tc)
Detects if a given TextContainer contains whitespace characters to
be preserved in XML.
|
static void |
TextUnitUtil.removeCodes(TextContainer tc)
Removes all inline tags from the given
TextContainer |
static void |
TextUnitUtil.renumberCodes(TextContainer tc) |
static String |
TextUnitUtil.restoreSegmentation(TextContainer tc,
TextFragment segStorage)
Restores original segmentation of a given text container from a given text fragment created with storeSegmentation().
|
TextContainer |
TextUnit.setSource(TextContainer textContainer) |
TextContainer |
ITextUnit.setSource(TextContainer textContainer)
Sets the source object for this TextUnit.
|
TextContainer |
TextUnit.setTarget(LocaleId locId,
TextContainer text) |
TextContainer |
ITextUnit.setTarget(LocaleId locId,
TextContainer text)
Sets the target object for this text unit for a given locale.
|
TextFragment[] |
CodeSimplifier.simplifyAll(TextContainer tc,
boolean removeLeadingTrailingCodes,
boolean mergeCodes)
Simplifies all possible tags in a given possibly segmented text container.
|
static TextFragment[] |
TextUnitUtil.simplifyCodes(TextContainer tc,
String rules,
boolean removeLeadingTrailingCodes)
Simplifies all possible tags in a given text container.
|
static TextFragment[] |
TextUnitUtil.simplifyCodes(TextContainer tc,
String rules,
boolean removeLeadingTrailingCodes,
boolean mergeCodes)
Simplifies all possible tags in a given text container.
|
static void |
TextUnitUtil.simplifyCodesPostSegmentation(TextContainer tc,
String rules,
boolean removeLeadingTrailingCodes,
boolean mergeCodes)
Simplifies all possible tags in the source part of a given text unit resource.
|
static TextFragment |
TextUnitUtil.storeSegmentation(TextContainer tc) |
static void |
TextUnitUtil.trimSegments(TextContainer tc) |
static void |
TextUnitUtil.trimSegments(TextContainer tc,
boolean trimLeading,
boolean trimTrailing)
Trims segments of a given text container that contains leading or trailing whitespaces.
|
| Constructor and Description |
|---|
Segments(TextContainer parent)
Creates an uninitialized Segments object.
|
Copyright © 2021. All rights reserved.