Uses of Class
net.sf.okapi.common.resource.TextFragment
-
-
Uses of TextFragment in net.sf.okapi.common
Methods in net.sf.okapi.common with parameters of type TextFragment Modifier and Type Method Description static int
RenumberingUtil. calculateCodeOffset(TextFragment tf)
Find the minimum ID of any code in the TextFragment, then use that to calculate the offset/delta by which all code IDs in the TextFragment need to be adjusted.static boolean
RenumberingUtil. containsOnlyMatchingCodes(TextFragment tf)
Check to see if this text fragment contains either open or closed tags that do not have a corresponding paired tag within the same TextFragment. -
Uses of TextFragment in net.sf.okapi.common.annotation
Methods in net.sf.okapi.common.annotation with parameters of type TextFragment Modifier and Type Method Description AltTranslation
AltTranslationsAnnotation. add(LocaleId sourceLocId, LocaleId targetLocId, TextFragment originalSource, TextFragment alternateSource, TextFragment alternateTarget, MatchType type, int combinedScore, String origin)
Adds a new entry to the list of alternate translations.AltTranslation
AltTranslationsAnnotation. add(LocaleId sourceLocId, LocaleId targetLocId, TextFragment originalSource, TextFragment alternateSource, TextFragment alternateTarget, MatchType type, int combinedScore, String origin, int fuzzyScore, int qualityScore)
Adds a new entry to the list of alternate translations.void
AltTranslation. setTarget(LocaleId targetLocId, TextFragment alternateTarget)
Sets the target parts of this alternate translation.Constructors in net.sf.okapi.common.annotation with parameters of type TextFragment Constructor Description AltTranslation(LocaleId sourceLocId, LocaleId targetLocId, TextFragment originalSource, TextFragment alternateSource, TextFragment alternateTarget, MatchType type, int combinedScore, String origin)
Creates a new AltTranslation object.AltTranslation(LocaleId sourceLocId, LocaleId targetLocId, TextFragment originalSource, TextFragment alternateSource, TextFragment alternateTarget, MatchType type, int combinedScore, String origin, int fuzzyScore, int qualityScore)
Creates a new AltTranslation object. -
Uses of TextFragment in net.sf.okapi.common.filters
Methods in net.sf.okapi.common.filters with parameters of type TextFragment Modifier and Type Method Description void
InlineCodeFinder. process(TextFragment fragment)
Applies the rules to a given content and converts all matching sections into in-line codes. -
Uses of TextFragment in net.sf.okapi.common.filterwriter
Methods in net.sf.okapi.common.filterwriter that return TextFragment Modifier and Type Method Description static TextFragment
GenericContent. fromLetterCodedToFragment(String text, TextFragment fragment, boolean reuseCodes, boolean decodeEncodedLetterCodes)
Converts a letter-coded text to a fragment.Methods in net.sf.okapi.common.filterwriter with parameters of type TextFragment Modifier and Type Method Description static String
GenericContent. fromFragmentToLetterCoded(TextFragment fragment, boolean encodeExistingLetterCodes)
Converts a text fragment into a letter-coded text, optionally escaping tags that will interfere with conversion back to a fragment.static TextFragment
GenericContent. fromLetterCodedToFragment(String text, TextFragment fragment, boolean reuseCodes, boolean decodeEncodedLetterCodes)
Converts a letter-coded text to a fragment.GenericContent
GenericContent. setContent(TextFragment content)
TMXContent
TMXContent. setContent(TextFragment content)
Sets the fragment to format.XLIFFContent
XLIFFContent. setContent(TextFragment content)
Sets the fragment to format.XLIFFContent
XLIFFContent. setContent(TextFragment content, boolean resetStandoff)
Sets the fragment to format.static void
GenericContent. updateFragment(String genericText, TextFragment fragment, boolean allowCodeDeletion)
Updates a text fragment from a generic representation.void
TMXWriter. writeAlternate(AltTranslation alt, TextFragment srcOriginal)
Writes the data of anAltTranslation
to this TMX output.protected void
TMXWriter. writeResourceLevelProperties(Set<String> names, ITextUnit item, TextFragment srcSegment)
void
TMXWriter. writeTU(TextFragment source, TextFragment target, String tuid, Map<String,String> attributes)
Writes a TMX TU element.void
TMXWriter. writeTU(TextFragment source, TextFragment target, String tuid, Map<String,String> attributes, LocaleId altTrgLoc)
Writes a TMX TU element.protected void
TMXWriter. writeTUV(TextFragment frag, LocaleId locale, TextContainer contForProp)
Writes a TUV element.Constructors in net.sf.okapi.common.filterwriter with parameters of type TextFragment Constructor Description GenericContent(TextFragment content)
TMXContent(TextFragment content)
Creates a new TMXContent object and set its content to the given fragment.XLIFFContent(TextFragment content)
Creates a new XLIFFContent object and set its content to the given fragment. -
Uses of TextFragment in net.sf.okapi.common.query
Fields in net.sf.okapi.common.query declared as TextFragment Modifier and Type Field Description TextFragment
QueryResult. source
Text of the source for this result.TextFragment
QueryResult. target
Text of the target for this result.Methods in net.sf.okapi.common.query with parameters of type TextFragment Modifier and Type Method Description int
IQuery. query(TextFragment text)
Starts a query for a given text.AltTranslation
QueryResult. toAltTranslation(TextFragment originalSource, LocaleId sourceLocId, LocaleId targetLocId)
Convert a QueryResult to anAltTranslation
Method parameters in net.sf.okapi.common.query with type arguments of type TextFragment Modifier and Type Method Description List<List<QueryResult>>
IQuery. batchQuery(List<TextFragment> fragments)
Starts a batch query for a given list ofTextFragment
s. -
Uses of TextFragment in net.sf.okapi.common.resource
Fields in net.sf.okapi.common.resource declared as TextFragment Modifier and Type Field Description TextFragment
AnnotatedSpan. span
Copy of the fragment of text to which the annotation is applied.TextFragment
TextPart. text
Text fragment of this part.Methods in net.sf.okapi.common.resource that return TextFragment Modifier and Type Method Description TextFragment
TextFragment. append(char value)
Appends a character to the fragment.TextFragment
TextFragment. append(CharSequence csq)
Appends the specified character sequence to this fragment.TextFragment
TextFragment. append(CharSequence csq, int start, int end)
Appends a subsequence of the specified character sequence to this fragment.TextFragment
TextFragment. append(String text)
Appends a string to the fragment.TextFragment
TextFragment. append(Code code)
Appends an existing code to this fragment.TextFragment
TextFragment. append(TextFragment fragment)
Appends a TextFragment object to this fragment.TextFragment
TextFragment. append(TextFragment fragment, boolean keepCodeIds)
Appends a TextFragment object to this fragment.TextFragment
TextFragment. cleanCodes()
Removes all codes both in the Codes list and the markers.TextFragment
TextFragment. clone()
Clones this TextFragment.TextFragment
TextContainer. createJoinedContent()
TextFragment
TextContainer. createJoinedContent(boolean keepCodeIds)
static TextFragment
TextUnitUtil. expandCodes(TextFragment tf)
Expand codes that have been previously merged.static TextFragment
TextUnitUtil. extractSegMarkers(TextFragment tf, TextFragment original, boolean removeFromOriginal)
Extracts segment and text part markers from a given string, creates codes (place-holder type) for those markers, and appends them to a given text fragment.TextFragment
TextPart. getContent()
Gets the text fragment for this part.TextFragment
ISegments. getFirstContent()
Gets the content of the first segment of this container.TextFragment
Segments. getFirstContent()
TextFragment
TextContainer. getFirstContent()
Gets the content of the first part (segment or non-segment) of this container.TextFragment
ISegments. getLastContent()
Gets the content of last segment of this container.TextFragment
Segments. getLastContent()
TextFragment
TextContainer. getLastContent()
Gets the content of the last part (segment or non-segment) of this container.TextFragment
TextContainer. getUnSegmentedContentCopy()
Gets a new TextFragment representing the un-segmented content of this container.TextFragment
TextContainer. getUnSegmentedContentCopy(boolean keepCodeIds)
Gets a new TextFragment representing the un-segmented content of this container.static TextFragment
TextFragmentUtil. removeMoreThanMaxCodes(TextFragment tf)
TextFragment
ITextUnit. setSourceContent(TextFragment content)
Sets the content of the source for this TextUnit.TextFragment
TextUnit. setSourceContent(TextFragment content)
TextFragment
ITextUnit. setTargetContent(LocaleId locId, TextFragment content)
Sets the content of the target for a given locale for this TextUnit.TextFragment
TextUnit. setTargetContent(LocaleId locId, TextFragment content)
TextFragment[]
CodeSimplifier. simplifyAll(TextContainer tc, boolean removeLeadingTrailingCodes, boolean mergeCodes)
Simplifies all possible tags in a given possibly segmented text container.TextFragment[]
CodeSimplifier. simplifyAll(TextFragment tf, boolean removeLeadingTrailingCodes)
Simplifies all possible tags in a given text fragment.TextFragment[]
CodeSimplifier. simplifyAll(TextFragment tf, boolean removeLeadingTrailingCodes, boolean mergeCodes)
Simplifies all possible tags in a given text fragment.TextFragment[]
CodeSimplifier. simplifyAll(TextFragment tf, int maxIterations, boolean removeLeadingTrailingCodes, boolean mergeCodes)
Simplifies all possible tags in a given text fragment.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 TextFragment[]
TextUnitUtil. simplifyCodes(TextFragment tf, String rules, boolean removeLeadingTrailingCodes)
Simplifies all possible tags in a given text fragment.static TextFragment[]
TextUnitUtil. simplifyCodes(TextFragment tf, String rules, boolean removeLeadingTrailingCodes, boolean mergeCodes)
Simplifies all possible tags in a given text fragment.static TextFragment
TextUnitUtil. storeSegmentation(TextContainer tc)
TextFragment
TextFragment. subSequence(int start, int end)
Gets a copy of a sub-sequence of this object.Methods in net.sf.okapi.common.resource with parameters of type TextFragment Modifier and Type Method Description static void
TextFragmentUtil. addMissingCodes(TextFragment from, TextFragment to, CodeMatches codeMatches)
Add missing leading and trailing codes from source (aka "from") to target (aka 'to').static CodeMatches
TextFragmentUtil. alignAndCopyCodeMetadata(TextFragment from, TextFragment to)
Update the meta fields inCode
"to
" that match those of "from
" But only if the "to" code has empty data.static CodeMatches
TextFragmentUtil. alignAndCopyCodeMetadata(TextFragment from, TextFragment to, boolean addMissingCodes)
Update the meta fields inCode
"to
" that match those of "from
" But only if the "to" code has empty data (@see{forceCopy}).static CodeMatches
TextFragmentUtil. alignAndCopyCodeMetadata(TextFragment from, TextFragment to, boolean addMissingCodes, boolean forceCopy)
static CodeMatches
TextFragmentUtil. alignAndCopyCodeMetadata(TextFragment from, TextFragment to, boolean addMissingCodes, boolean forceCopy, CodeMatchStrategy strategy)
Update the meta fields inCode
"to
" that match those of "from
" But only if the "to" code has empty data (@see{forceCopy}).void
TextFragment. alignCodeIds(TextFragment base)
void
TextFragment. alignCodeIds(TextFragment base, CodeMatchStrategy strategy)
Aligns the code IDs of this fragment with the ones of a given fragment.void
ISegments. append(TextFragment fragment)
Appends a TextFragment as a segment at the end of this container.void
ISegments. append(TextFragment fragment, boolean collapseIfPreviousEmpty)
Appends a TextFragment as a segment at the end of this container.void
Segments. append(TextFragment fragment)
void
Segments. append(TextFragment fragment, boolean collapseIfPreviousEmpty)
void
TextContainer. append(TextFragment fragment)
Appends a part at the end of this container.void
TextContainer. append(TextFragment fragment, boolean collapseIfPreviousEmpty)
Appends a part at the end of this container.void
TextContainer. append(TextFragment fragment, boolean collapseIfPreviousEmpty, boolean keepCodeIds)
Appends a part at the end of this container.TextFragment
TextFragment. append(TextFragment fragment)
Appends a TextFragment object to this fragment.TextFragment
TextFragment. append(TextFragment fragment, boolean keepCodeIds)
Appends a TextFragment object to this fragment.int
TextFragment. compareTo(TextFragment tf)
Compares an object with this TextFragment.int
TextFragment. compareTo(TextFragment frag, TextFragment.CompareMode compMode)
Compares with another TextFragment.static void
TextFragmentUtil. copyCodeMetadata(TextFragment sf, TextFragment tf, boolean forceCopy, CodeMatches cm)
static void
TextUnitUtil. deleteLastChar(TextFragment textFragment)
Deletes the last non-whitespace and non-code character of a given text fragment.static boolean
TextUnitUtil. endsWith(TextFragment textFragment, String substr)
Indicates if a given text fragment ends with a given sub-string.static TextFragment
TextUnitUtil. expandCodes(TextFragment tf)
Expand codes that have been previously merged.static TextFragment
TextUnitUtil. extractSegMarkers(TextFragment tf, TextFragment original, boolean removeFromOriginal)
Extracts segment and text part markers from a given string, creates codes (place-holder type) for those markers, and appends them to a given text fragment.static int
TextFragment. fromFragmentToString(TextFragment frag, int pos)
Gets the position in the string representation of a fragment of a given position in that fragment.static String
TextUnitUtil. getCodedText(TextFragment textFragment)
Gets text of a given text fragment object possibly containing inline codes.static char
TextUnitUtil. getLastChar(TextFragment textFragment)
Gets the last character of a given text fragment.static String
TextUnitUtil. getText(TextFragment textFragment)
Extracts text from the given text fragment.static String
TextUnitUtil. getText(TextFragment textFragment, List<Integer> markerPositions)
Extracts text from the given text fragment.static boolean
TextUnitUtil. hasMergedCode(TextFragment tf)
void
TextFragment. insert(int offset, TextFragment fragment)
Inserts a TextFragment object to this fragment.void
TextFragment. insert(int offset, TextFragment fragment, boolean keepCodeIds)
Inserts a TextFragment object to this fragment.static boolean
TextUnitUtil. isEmpty(TextFragment textFragment)
Indicates if a given text fragment object is null, or the text it contains is null or empty.static boolean
TextFragmentUtil. isLeadingCode(Code code, TextFragment source)
Determine if the code is at the beginning of theTextFragment
without intervening text.static boolean
TextUnitUtil. isWellformed(TextFragment tf)
static int
TextUnitUtil. lastIndexOf(TextFragment textFragment, String findWhat)
Returns the index (within a given text fragment object) of the rightmost occurrence of the specified substring.static void
TextFragmentUtil. logCodeMismatchErrors(CodeMatches matches, TextFragment from, TextFragment to, String textUnitId)
Log all code mismatch issuesstatic boolean
TextFragmentUtil. moreThanMaxCodes(TextFragment tf)
static String
TextUnitUtil. printMarkerIndexes(TextFragment textFragment)
static String
TextUnitUtil. printMarkers(TextFragment textFragment)
static void
TextUnitUtil. removeCodes(TextFragment tf)
Removes all inline tags from the givenTextFragment
static TextFragment
TextFragmentUtil. removeMoreThanMaxCodes(TextFragment tf)
static String
TextUnitUtil. restoreSegmentation(TextContainer tc, TextFragment segStorage)
Restores original segmentation of a given text container from a given text fragment created with storeSegmentation().void
TextContainer. setContent(TextFragment content)
Sets the content of this TextContainer.void
TextPart. setContent(TextFragment fragment)
Sets theTextFragment
for this part.TextFragment
ITextUnit. setSourceContent(TextFragment content)
Sets the content of the source for this TextUnit.TextFragment
TextUnit. setSourceContent(TextFragment content)
TextFragment
ITextUnit. setTargetContent(LocaleId locId, TextFragment content)
Sets the content of the target for a given locale for this TextUnit.TextFragment
TextUnit. setTargetContent(LocaleId locId, TextFragment content)
TextFragment[]
CodeSimplifier. simplifyAll(TextFragment tf, boolean removeLeadingTrailingCodes)
Simplifies all possible tags in a given text fragment.TextFragment[]
CodeSimplifier. simplifyAll(TextFragment tf, boolean removeLeadingTrailingCodes, boolean mergeCodes)
Simplifies all possible tags in a given text fragment.TextFragment[]
CodeSimplifier. simplifyAll(TextFragment tf, int maxIterations, boolean removeLeadingTrailingCodes, boolean mergeCodes)
Simplifies all possible tags in a given text fragment.static TextFragment[]
TextUnitUtil. simplifyCodes(TextFragment tf, String rules, boolean removeLeadingTrailingCodes)
Simplifies all possible tags in a given text fragment.static TextFragment[]
TextUnitUtil. simplifyCodes(TextFragment tf, String rules, boolean removeLeadingTrailingCodes, boolean mergeCodes)
Simplifies all possible tags in a given text fragment.void
CodeSimplifier. simplifyEmptyOpeningClosing(TextFragment tf)
void
CodeSimplifier. simplifyIsolated(TextFragment tf)
Simplifies the place-holders in a given text fragment.void
CodeSimplifier. simplifyOpeningClosing(TextFragment tf)
static CodeMatches
TextFragmentUtil. synchronizeCodeIds(TextFragment from, TextFragment to)
static CodeMatches
TextFragmentUtil. synchronizeCodeIds(TextFragment from, TextFragment to, CodeMatchStrategy strategy)
Matches the code IDs of thefrom
fragment with the ones of the
to
fragment.
static String
TextFragmentUtil. toText(TextFragment tf)
Render theTextFragment
including allCode
s.static String
TextUnitUtil. toText(TextFragment tf)
Returns the content of a given text fragment, including the original codes whenever possible.static void
TextUnitUtil. trimLeading(TextFragment textFragment)
Removes leading whitespaces from a given text fragment.static void
TextUnitUtil. trimLeading(TextFragment textFragment, GenericSkeleton skel)
Removes leading whitespaces from a given text fragment, puts removed whitespaces to the given skeleton.static void
TextUnitUtil. trimTrailing(TextFragment textFragment)
Removes trailing whitespaces from a given text fragment.static void
TextUnitUtil. trimTrailing(TextFragment textFragment, GenericSkeleton skel)
Removes trailing whitespaces from a given text fragment, puts removed whitespaces to the given skeleton.static void
TextFragment. unwrap(TextFragment frag)
Unwraps the content of a TextFragment.Constructors in net.sf.okapi.common.resource with parameters of type TextFragment Constructor Description AnnotatedSpan(String type, InlineAnnotation annotation, TextFragment span, int start, int end)
Creates a new AnnotatedSpan object with a give type of annotation, its annotation and its fragment of text.CodeMatches(TextFragment from, TextFragment to)
Segment(String id, TextFragment text)
Creates a Segment object with a given identifier and a given text fragment.TextContainer(TextFragment fragment)
Creates a new TextContainer object with an initial TextFragment.TextFragment(TextFragment fragment)
Creates a TextFragment with the content of a given TextFragment.TextPart(String id, TextFragment text)
Creates a new TextPart with a givenTextFragment
.TextPart(TextFragment text)
Creates a new TextPart with a givenTextFragment
. -
Uses of TextFragment in net.sf.okapi.common.skeleton
Methods in net.sf.okapi.common.skeleton with parameters of type TextFragment Modifier and Type Method Description String
GenericSkeletonWriter. getContent(TextFragment tf, LocaleId locToUse, EncoderContext context)
Gets the original content of a TextFragment. -
Uses of TextFragment in net.sf.okapi.connectors.apertium
Methods in net.sf.okapi.connectors.apertium with parameters of type TextFragment Modifier and Type Method Description int
ApertiumMTConnector. query(TextFragment fragment)
Queries the Apertium API. -
Uses of TextFragment in net.sf.okapi.connectors.bifile
Methods in net.sf.okapi.connectors.bifile with parameters of type TextFragment Modifier and Type Method Description int
BilingualFileConnector. query(TextFragment text)
-
Uses of TextFragment in net.sf.okapi.connectors.google
Methods in net.sf.okapi.connectors.google with parameters of type TextFragment Modifier and Type Method Description int
GoogleMTv2Connector. query(TextFragment frag)
Method parameters in net.sf.okapi.connectors.google with type arguments of type TextFragment Modifier and Type Method Description List<List<QueryResult>>
GoogleMTv2Connector. batchQuery(List<TextFragment> fragments)
-
Uses of TextFragment in net.sf.okapi.connectors.googleautoml
Methods in net.sf.okapi.connectors.googleautoml with parameters of type TextFragment Modifier and Type Method Description int
GoogleAutoMLTranslationConnector. query(TextFragment sourceFragment)
-
Uses of TextFragment in net.sf.okapi.connectors.kantan
Methods in net.sf.okapi.connectors.kantan with parameters of type TextFragment Modifier and Type Method Description int
KantanMTv21Connector. query(TextFragment tf)
Method parameters in net.sf.okapi.connectors.kantan with type arguments of type TextFragment Modifier and Type Method Description List<List<QueryResult>>
KantanMTv21Connector. batchQuery(List<TextFragment> fragments)
-
Uses of TextFragment in net.sf.okapi.connectors.lingo24
Methods in net.sf.okapi.connectors.lingo24 with parameters of type TextFragment Modifier and Type Method Description int
Lingo24Connector. query(TextFragment fragment)
Queries the Lingo24 Premium MT API. -
Uses of TextFragment in net.sf.okapi.connectors.microsoft
Methods in net.sf.okapi.connectors.microsoft with parameters of type TextFragment Modifier and Type Method Description int
MicrosoftMTConnector. query(TextFragment frag)
Method parameters in net.sf.okapi.connectors.microsoft with type arguments of type TextFragment Modifier and Type Method Description List<List<QueryResult>>
MicrosoftMTConnector. batchQuery(List<TextFragment> fragments)
-
Uses of TextFragment in net.sf.okapi.connectors.mmt
Methods in net.sf.okapi.connectors.mmt with parameters of type TextFragment Modifier and Type Method Description int
MMTConnector. query(TextFragment fragment)
Queries the ModernMT API fro the configured server. -
Uses of TextFragment in net.sf.okapi.connectors.mymemory
Methods in net.sf.okapi.connectors.mymemory with parameters of type TextFragment Modifier and Type Method Description int
MyMemoryTMConnector. query(TextFragment frag)
Method parameters in net.sf.okapi.connectors.mymemory with type arguments of type TextFragment Modifier and Type Method Description List<List<QueryResult>>
MyMemoryTMConnector. batchQuery(List<TextFragment> fragments)
-
Uses of TextFragment in net.sf.okapi.connectors.pensieve
Methods in net.sf.okapi.connectors.pensieve with parameters of type TextFragment Modifier and Type Method Description int
PensieveTMConnector. query(TextFragment text)
-
Uses of TextFragment in net.sf.okapi.connectors.tda
Methods in net.sf.okapi.connectors.tda with parameters of type TextFragment Modifier and Type Method Description int
TDASearchConnector. query(TextFragment frag)
Method parameters in net.sf.okapi.connectors.tda with type arguments of type TextFragment Modifier and Type Method Description List<List<QueryResult>>
TDASearchConnector. batchQuery(List<TextFragment> fragments)
-
Uses of TextFragment in net.sf.okapi.connectors.translatetoolkit
Methods in net.sf.okapi.connectors.translatetoolkit with parameters of type TextFragment Modifier and Type Method Description int
TranslateToolkitTMConnector. query(TextFragment text)
Method parameters in net.sf.okapi.connectors.translatetoolkit with type arguments of type TextFragment Modifier and Type Method Description List<List<QueryResult>>
TranslateToolkitTMConnector. batchQuery(List<TextFragment> fragments)
-
Uses of TextFragment in net.sf.okapi.filters.icml
Methods in net.sf.okapi.filters.icml that return TextFragment Modifier and Type Method Description TextFragment[]
ICMLSkeleton. getMovedParts()
Methods in net.sf.okapi.filters.icml with parameters of type TextFragment Modifier and Type Method Description void
ICMLSkeleton. addMovedParts(TextFragment[] movedParts)
-
Uses of TextFragment in net.sf.okapi.filters.its.html5
Methods in net.sf.okapi.filters.its.html5 with parameters of type TextFragment Modifier and Type Method Description String
HTML5SkeletonWriter. getContent(TextFragment tf, LocaleId locToUse, EncoderContext context)
Gets the original content of a TextFragment. -
Uses of TextFragment in net.sf.okapi.filters.mosestext
Methods in net.sf.okapi.filters.mosestext that return TextFragment Modifier and Type Method Description TextFragment
MosesTextFilter. fromPseudoXLIFF(String text)
Converts a pseudoXLIFF string into a TextFragment. -
Uses of TextFragment in net.sf.okapi.filters.ttx
Methods in net.sf.okapi.filters.ttx with parameters of type TextFragment Modifier and Type Method Description protected String
TTXSkeletonWriter. processFragment(TextFragment frag, EncoderContext context)
Outputs a fragment. -
Uses of TextFragment in net.sf.okapi.filters.txml
Methods in net.sf.okapi.filters.txml with parameters of type TextFragment Modifier and Type Method Description protected String
TXMLSkeletonWriter. processFragment(TextFragment frag, EncoderContext context)
Outputs a fragment. -
Uses of TextFragment in net.sf.okapi.filters.xini
Methods in net.sf.okapi.filters.xini that return TextFragment Modifier and Type Method Description TextFragment
InlineCodeTransformer. serializeTextParts(List<Serializable> parts, boolean targetIsTKit)
TextFragment
InlineCodeTransformer. serializeTextPartsForFilter(List<Serializable> parts)
TextFragment
InlineCodeTransformer. serializeTextPartsForTKit(List<Serializable> parts)
-
Uses of TextFragment in net.sf.okapi.filters.xliff2
Methods in net.sf.okapi.filters.xliff2 with parameters of type TextFragment Modifier and Type Method Description void
OkpToX2Converter. copyOver(TextFragment source, Fragment out, Set<String> existingCodeIds)
Copies the text and codes from Okapi CoreTextFragment
to an XLIFF ToolkitFragment
. -
Uses of TextFragment in net.sf.okapi.lib.merge.merge
Methods in net.sf.okapi.lib.merge.merge with parameters of type TextFragment Modifier and Type Method Description default void
ITextUnitMerger. copyCodeMetadata(TextFragment from, TextFragment to)
Update the meta fields inCode
's "to
" that match those of "from
" But only if the "to" code has empty data.void
TextUnitMerger. copyCodeMetadata(TextFragment from, TextFragment to)
-
Uses of TextFragment in net.sf.okapi.lib.terminology
Methods in net.sf.okapi.lib.terminology with parameters of type TextFragment Modifier and Type Method Description List<TermHit>
ITermAccess. getExistingStrings(TextFragment fragment, LocaleId fragmentLoc, LocaleId otherLoc)
List<TermHit>
ITermAccess. getExistingTerms(TextFragment fragment, LocaleId fragmentLoc, LocaleId otherLoc)
Gets the list of all terms of the termbase that exist in a given fragment for a given source/target pair of locales. -
Uses of TextFragment in net.sf.okapi.lib.terminology.simpletb
Methods in net.sf.okapi.lib.terminology.simpletb with parameters of type TextFragment Modifier and Type Method Description List<TermHit>
SimpleTB. getExistingStrings(TextFragment frag, LocaleId fragmentLoc, LocaleId otherLoc)
List<TermHit>
SimpleTBConnector. getExistingStrings(TextFragment fragment, LocaleId fragmentLocId, LocaleId otherLocId)
List<TermHit>
SimpleTB. getExistingTerms(TextFragment frag, LocaleId fragmentLoc, LocaleId otherLoc)
List<TermHit>
SimpleTBConnector. getExistingTerms(TextFragment fragment, LocaleId fragmentLocId, LocaleId otherLocId)
-
Uses of TextFragment in net.sf.okapi.lib.translation
Methods in net.sf.okapi.lib.translation that return TextFragment Modifier and Type Method Description TextFragment
QueryUtil. createNewFragmentWithCodes(String plainText)
Appends the codes stored apart usingQueryUtil.separateCodesFromText(TextFragment)
at the end of a given plain text.TextFragment
QueryUtil. fromCodedHTMLToFragment(String text, TextFragment fragment)
Converts an HTML string created withQueryUtil.toCodedHTML(TextFragment)
back into a text fragment, but with empty inline codes.TextFragment
QueryUtil. fromXLIFF(Element elem, TextFragment original)
Converts back an XLIFF text contained in a given element into a TextFragment.Methods in net.sf.okapi.lib.translation with parameters of type TextFragment Modifier and Type Method Description int
TextMatcher. compare(TextFragment frag1, TextFragment frag2, int options)
Compare two textFragment content.int
TextMatcher. compareToBaseTokens(String text1, List<String> tokens1, TextFragment frag2)
Compare a list of tokens to aTextFragment
object.String
QueryUtil. fromCodedHTML(String htmlText, TextFragment fragment, boolean addMissingCodes)
Converts back a coded HTML to a coded text.String
QueryUtil. fromCodedHTML(String htmlText, TextFragment fragment, boolean addMissingCodes, boolean removeSpans)
Converts back a coded HTML to a coded text.TextFragment
QueryUtil. fromCodedHTMLToFragment(String text, TextFragment fragment)
Converts an HTML string created withQueryUtil.toCodedHTML(TextFragment)
back into a text fragment, but with empty inline codes.TextFragment
QueryUtil. fromXLIFF(Element elem, TextFragment original)
Converts back an XLIFF text contained in a given element into a TextFragment.int
QueryManager. query(TextFragment text)
Queries all enabled translation resources for a given text fragment.String
QueryUtil. separateCodesFromText(TextFragment frag)
Separate and store codes of a given text fragment.String
QueryUtil. toCodedHTML(TextFragment fragment)
Converts from coded text to coded HTML.String
QueryUtil. toXLIFF(TextFragment fragment)
Converts from coded text to XLIFF.Method parameters in net.sf.okapi.lib.translation with type arguments of type TextFragment Modifier and Type Method Description List<List<QueryResult>>
BaseConnector. batchQuery(List<TextFragment> fragments)
Slow default implementation using query!! Override to take advantage of servers batch APIList<String>
QueryUtil. toCodedHTML(List<TextFragment> frags)
Converts from coded texts to coded HTML. -
Uses of TextFragment in net.sf.okapi.lib.verification
Methods in net.sf.okapi.lib.verification with parameters of type TextFragment Modifier and Type Method Description int
SpaceChecker. checkSpaces(TextFragment srcFrag, TextFragment trgFrag)
Checks and fixes white spaces for a given text fragment.static int
AbstractChecker. fromFragmentToGeneric(TextFragment frag, int pos)
Converts a position in a coded-text string into the same position when the string display uses generic codes.static int
AbstractChecker. fromOriginalToGeneric(TextFragment frag, int pos)
Converts a position in a string display using the original code data into the same position when the string display uses generic codes.static int
AbstractChecker. fromStrippedToGeneric(TextFragment frag, int pos)
Converts a position in a string display where codes are stripped into the same position when the string display uses generic codes.static int
AbstractChecker. fromStrippedToString(TextFragment frag, int pos)
Converts a position in a string display where codes are stripped into the same position when the string display uses original data.protected String
AbstractChecker. getDisplay(TextFragment frag)
Generates the display string for a source or target text-fragment (e.g.static List<TermHit>
TermChecker. getExistingTargetStrings(TextFragment frag, List<TermHit> sourceHits, boolean betweenCodes)
static List<TermHit>
TermChecker. getExistingTargetTerms(TextFragment frag, List<TermHit> sourceHits)
Get a list of existing target term in a given fragment based on a list of TermHit object for the source. -
Uses of TextFragment in net.sf.okapi.steps.cleanup
Methods in net.sf.okapi.steps.cleanup with parameters of type TextFragment Modifier and Type Method Description protected void
Cleaner. normalizePunctuation(TextFragment srcFrag, TextFragment trgFrag)
Attempts to make punctuation and spacing around punctuation consistent according to standard English punctuation rules. -
Uses of TextFragment in net.sf.okapi.steps.codesremoval
Methods in net.sf.okapi.steps.codesremoval with parameters of type TextFragment Modifier and Type Method Description void
CodesRemover. processFragment(TextFragment tf)
-
Uses of TextFragment in net.sf.okapi.steps.common
Methods in net.sf.okapi.steps.common with parameters of type TextFragment Modifier and Type Method Description boolean
ExtractionVerificationUtil. compareTextFragments(TextFragment tf1, TextFragment tf2)
Compares two TextFragments. -
Uses of TextFragment in net.sf.okapi.steps.inconsistencycheck
Methods in net.sf.okapi.steps.inconsistencycheck with parameters of type TextFragment Modifier and Type Method Description void
InconsistencyCheck. store(String docId, String subDocId, String tuId, String segId, TextFragment srcTf, TextFragment trgTf)
Stores the source-target pair for comparison -
Uses of TextFragment in net.sf.okapi.steps.rainbowkit.common
Methods in net.sf.okapi.steps.rainbowkit.common with parameters of type TextFragment Modifier and Type Method Description long
WordCounter. getWordCount(TextFragment frag)
-
Uses of TextFragment in net.sf.okapi.steps.tokenization
Methods in net.sf.okapi.steps.tokenization with parameters of type TextFragment Modifier and Type Method Description static Tokens
Tokenizer. tokenize(TextFragment textFragment, LocaleId language, String... tokenNames)
-
Uses of TextFragment in net.sf.okapi.steps.wordcount
Methods in net.sf.okapi.steps.wordcount with parameters of type TextFragment Modifier and Type Method Description static long
WordCounter. count(TextFragment textFragment, LocaleId language)
Counts words in a given text fragment. -
Uses of TextFragment in net.sf.okapi.tm.pensieve.common
Methods in net.sf.okapi.tm.pensieve.common that return TextFragment Modifier and Type Method Description TextFragment
TranslationUnitVariant. getContent()
Methods in net.sf.okapi.tm.pensieve.common with parameters of type TextFragment Modifier and Type Method Description void
TranslationUnitVariant. setContent(TextFragment content)
Constructors in net.sf.okapi.tm.pensieve.common with parameters of type TextFragment Constructor Description TranslationUnitVariant(LocaleId language, TextFragment content)
Creates a TUV with the given language and content -
Uses of TextFragment in net.sf.okapi.tm.pensieve.seeker
Methods in net.sf.okapi.tm.pensieve.seeker with parameters of type TextFragment Modifier and Type Method Description List<TmHit>
ITmSeeker. searchExact(TextFragment query, Metadata metadata)
Get a list of exact matches for a given text fragment, taking inline codes in account.List<TmHit>
PensieveSeeker. searchExact(TextFragment query, Metadata metadata)
List<TmHit>
ITmSeeker. searchFuzzy(TextFragment query, int threshold, int maxHits, Metadata metadata)
Get a list of fuzzy matches for a given text fragment, taking inline codes in account.List<TmHit>
PensieveSeeker. searchFuzzy(TextFragment queryFrag, int threshold, int max, Metadata metadata)
Search for exact and fuzzy matches
-