| 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.query |
Helper classes for the translation resources connectors.
|
| net.sf.okapi.common.resource |
Interfaces and classes that represent the parsed resources attached to the
events sent by a filter.
|
| net.sf.okapi.common.skeleton |
Interfaces and classes for the skeleton objects.
|
| Modifier and Type | Method and Description |
|---|---|
ITextUnit |
Event.getTextUnit()
|
| Modifier and Type | Method and Description |
|---|---|
static void |
RenumberingUtil.renumberTextUnitCodes(ITextUnit tu,
LocaleId trgLocale)
Renumber the codes in the TextUnit's source container, then align with
the codes in the target.
|
| Modifier and Type | Method and Description |
|---|---|
ITextUnit |
AltTranslation.getEntry()
Gets the text unit for this entry.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
GenericAnnotation.addAnnotation(ITextUnit tu,
GenericAnnotation ann)
Adds an annotation to a text unit.
|
static void |
ITSLQIAnnotations.addAnnotations(ITextUnit tu,
ITSLQIAnnotations newSet)
Adds an ITSLQIAnnotations to a text unit.
|
static void |
ITSProvenanceAnnotations.addAnnotations(ITextUnit tu,
ITSProvenanceAnnotations newSet) |
| Modifier and Type | Method and Description |
|---|---|
ITextUnit |
EventBuilder.endTextUnit()
|
ITextUnit |
EventBuilder.endTextUnit(GenericSkeleton endMarker)
|
ITextUnit |
EventBuilder.endTextUnit(GenericSkeleton endMarker,
LocaleId locale,
List<PropertyTextUnitPlaceholder> propertyTextUnitPlaceholders)
|
protected ITextUnit |
AbstractLineFilter.getFirstTextUnit() |
ITextUnit |
EventBuilder.peekMostRecentTextUnit()
Peek At the most recently created
TextUnit. |
protected ITextUnit |
EventBuilder.postProcessTextUnit(ITextUnit textUnit)
Do any required post-processing on the TextUnit after endTextUnit is called.
|
| Modifier and Type | Method and Description |
|---|---|
protected ITextUnit |
EventBuilder.postProcessTextUnit(ITextUnit textUnit)
Do any required post-processing on the TextUnit after endTextUnit is called.
|
String |
SubFilterSkeletonWriter.processTextUnit(ITextUnit resource) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
GenericFilterWriter.processTextUnit(ITextUnit resource) |
protected void |
TMXWriter.writeAllPropertiesAsAttibutes(XMLWriter writer,
Set<String> names,
ITextUnit item) |
void |
TMXWriter.writeAlternates(ITextUnit tu,
LocaleId trgLoc)
Writes the entries of an
AltTranslationsAnnotation
annotation(s) of a given text unit to the TMX document. |
void |
TMXWriter.writeItem(ITextUnit tu,
Map<String,String> attributes)
Writes a given text unit.
|
protected void |
TMXWriter.writeResourceLevelProperties(Set<String> names,
ITextUnit item,
TextFragment srcSegment) |
void |
XLIFFWriter.writeTextUnit(ITextUnit tu)
Writes a text unit as a <trans-unit> element.
|
void |
XLIFFWriter.writeTextUnit(ITextUnit tu,
String phaseName)
Writes a text unit as a <trans-unit> element.
|
void |
TMXWriter.writeTUFull(ITextUnit item)
Writes a TextUnit (all targets) with all the properties associated to it.
|
void |
TMXWriter.writeTUFull(ITextUnit item,
LocaleId sourceLocId)
Writes a TextUnit (all targets) with all the properties associated to it.
|
| Modifier and Type | Method and Description |
|---|---|
void |
IQuery.leverage(ITextUnit tu)
Leverages a text unit (segmented or not) based on the current settings.
|
| Modifier and Type | Method and Description |
|---|---|
void |
IQuery.batchLeverage(List<ITextUnit> tus)
Leverages a batch of text units (segmented or not) based on the current settings.
|
| Modifier and Type | Class and Description |
|---|---|
class |
TextUnit
Basic unit of extraction from a filter and also the resource associated with
the filter event TEXT_UNIT.
|
| Modifier and Type | Method and Description |
|---|---|
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(String source)
Creates a generic new text unit resource based a given string becoming the source text of the text unit.
|
static ITextUnit |
TextUnitUtil.buildGenericTU(String srcPart,
String skelPart)
Creates a generic new text unit resource based on a given string becoming the source text of the text unit, and a
skeleton string, which gets appended to the new text unit's skeleton.
|
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.
|
ITextUnit |
ITextUnit.clone()
Clones this TextUnit.
|
ITextUnit |
AlignedSegments.getParent() |
| Modifier and Type | Method and Description |
|---|---|
static void |
TextUnitUtil.addQualifiers(ITextUnit textUnit,
String qualifier)
Adds to the skeleton of a given text unit resource qualifiers (quotation marks etc.) to appear around text.
|
static void |
TextUnitUtil.addQualifiers(ITextUnit textUnit,
String startQualifier,
String endQualifier)
Adds to the skeleton of a given text unit resource qualifiers (quotation marks etc.) to appear around text.
|
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 GenericSkeleton |
TextUnitUtil.convertToSkeleton(ITextUnit textUnit)
Copies source and target text of a given text unit into a newly created skeleton.
|
static GenericSkeleton |
TextUnitUtil.forceSkeleton(ITextUnit tu)
Makes sure that a given text unit contains a skeleton.
|
static <A extends IAnnotation> |
TextUnitUtil.getSourceAnnotation(ITextUnit textUnit,
Class<A> type)
Gets an annotation attached to the source part of a given text unit resource.
|
static String |
TextUnitUtil.getSourceText(ITextUnit textUnit)
Gets the coded text of the first part of the source of a given text unit resource.
|
static String |
TextUnitUtil.getSourceText(ITextUnit textUnit,
boolean removeCodes)
Gets the coded text of the first part of a source part of a given text unit resource.
|
static <A extends IAnnotation> |
TextUnitUtil.getTargetAnnotation(ITextUnit textUnit,
LocaleId locId,
Class<A> type)
Gets an annotation attached to the target part of a given text unit resource in a given locale.
|
static String |
TextUnitUtil.getTargetText(ITextUnit textUnit,
LocaleId locId)
Gets text of the first part of the target of a given text unit resource in the given locale.
|
static boolean |
TextUnitUtil.hasSource(ITextUnit textUnit)
Indicates if a given text unit resource is null, or its source part is null or empty.
|
static boolean |
TextUnitUtil.isApproved(ITextUnit tu,
LocaleId targetLocale) |
static boolean |
TextUnitUtil.isEmpty(ITextUnit textUnit)
Indicates if a given text unit resource is null, or its source part is null or empty.
|
static boolean |
TextUnitUtil.isEmpty(ITextUnit textUnit,
boolean ignoreWS)
Indicates if a given text unit resource is null, or its source part is null or empty.
|
static boolean |
TextUnitUtil.isStandalone(ITextUnit tu) |
static boolean |
TextUnitUtil.needsPreserveWhitespaces(ITextUnit tu) |
static void |
TextUnitUtil.removeCodes(ITextUnit textUnit,
boolean removeTargetCodes)
Removes all inline tags in the source (or optionally the target) text unit resource.
|
static boolean |
TextUnitUtil.removeQualifiers(ITextUnit textUnit,
String qualifier)
Removes from the source part of a given text unit resource qualifiers (quotation marks etc.) around text.
|
static boolean |
TextUnitUtil.removeQualifiers(ITextUnit textUnit,
String startQualifier,
String endQualifier)
Removes from the source part of a given un-segmented text unit resource qualifiers (parenthesis, quotation marks
etc.) around text.
|
static void |
TextUnitUtil.setSourceAnnotation(ITextUnit textUnit,
IAnnotation annotation)
Attaches an annotation to the source part of a given text unit resource.
|
static void |
TextUnitUtil.setSourceText(ITextUnit textUnit,
String text)
Sets the coded text of the un-segmented source of a given text unit resource.
|
static void |
TextUnitUtil.setTargetAnnotation(ITextUnit textUnit,
LocaleId locId,
IAnnotation annotation)
Attaches an annotation to the target part of a given text unit resource in a given language.
|
static void |
TextUnitUtil.setTargetText(ITextUnit textUnit,
LocaleId locId,
String text)
Sets the coded text of the the target part of a given text unit resource in a given language.
|
static void |
TextUnitUtil.simplifyCodes(ITextUnit textUnit,
String rules,
boolean removeLeadingTrailingCodes)
Simplifies all possible tags in the source part of a given text unit resource.
|
static void |
TextUnitUtil.simplifyCodes(ITextUnit textUnit,
String rules,
boolean removeLeadingTrailingCodes,
boolean mergeCodes)
Simplifies all possible tags in the source part of a given text unit resource.
|
static void |
TextUnitUtil.simplifyCodesPostSegmentation(ITextUnit textUnit,
String rules,
boolean removeLeadingTrailingCodes,
boolean mergeCodes)
Simplifies all possible tags in the source part of a given text unit resource.
|
static void |
TextUnitUtil.trimTU(ITextUnit textUnit,
boolean trimLeading,
boolean trimTrailing)
Removes leading and/or trailing whitespaces from the source part of a given text unit resource.
|
static void |
TextUnitUtil.unsegmentTU(ITextUnit tu) |
| Constructor and Description |
|---|
AlignedSegments(ITextUnit parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
GenericSkeleton.addContentPlaceholder(ITextUnit textUnit)
Adds to this skeleton a placeholder for the source content of the resource
to which this skeleton is attached.
|
void |
GenericSkeleton.addContentPlaceholder(ITextUnit textUnit,
LocaleId locId)
Adds to this skeleton a placeholder for the content (in a given locale) of the resource
to which this skeleton is attached.
|
protected String |
GenericSkeletonWriter.getContent(ITextUnit tu,
LocaleId locToUse,
EncoderContext context)
Gets the original content of a given text unit.
|
protected String |
GenericSkeletonWriter.getString(ITextUnit tu,
LocaleId locToUse,
EncoderContext context)
Gets the skeleton and the original content of a given text unit.
|
String |
GenericSkeletonWriter.processTextUnit(ITextUnit resource) |
String |
ISkeletonWriter.processTextUnit(ITextUnit resource)
Processes the TEXT_UNIT event.
|
Copyright © 2021. All rights reserved.