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 intRenumberingUtil. 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 booleanRenumberingUtil. 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 AltTranslationAltTranslationsAnnotation. 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.AltTranslationAltTranslationsAnnotation. 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.voidAltTranslation. 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 voidInlineCodeFinder. 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 TextFragmentGenericContent. fromLetterCodedToFragment(String text, TextFragment fragment, boolean reuseCodes)Deprecated.static TextFragmentGenericContent. 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 StringGenericContent. fromFragmentToLetterCoded(TextFragment fragment)Deprecated.static StringGenericContent. 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 TextFragmentGenericContent. fromLetterCodedToFragment(String text, TextFragment fragment, boolean reuseCodes)Deprecated.static TextFragmentGenericContent. fromLetterCodedToFragment(String text, TextFragment fragment, boolean reuseCodes, boolean decodeEncodedLetterCodes)Converts a letter-coded text to a fragment.GenericContentGenericContent. setContent(TextFragment content)TMXContentTMXContent. setContent(TextFragment content)Sets the fragment to format.XLIFFContentXLIFFContent. setContent(TextFragment content)Sets the fragment to format.XLIFFContentXLIFFContent. setContent(TextFragment content, boolean resetStandoff)Sets the fragment to format.static voidGenericContent. updateFragment(String genericText, TextFragment fragment, boolean allowCodeDeletion)Updates a text fragment from a generic representation.voidTMXWriter. writeAlternate(AltTranslation alt, TextFragment srcOriginal)Writes the data of anAltTranslationto this TMX output.protected voidTMXWriter. writeResourceLevelProperties(Set<String> names, ITextUnit item, TextFragment srcSegment)voidTMXWriter. writeTU(TextFragment source, TextFragment target, String tuid, Map<String,String> attributes)Writes a TMX TU element.voidTMXWriter. writeTU(TextFragment source, TextFragment target, String tuid, Map<String,String> attributes, LocaleId altTrgLoc)Writes a TMX TU element.protected voidTMXWriter. 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 TextFragmentQueryResult. sourceText of the source for this result.TextFragmentQueryResult. targetText of the target for this result.Methods in net.sf.okapi.common.query with parameters of type TextFragment Modifier and Type Method Description intIQuery. query(TextFragment text)Starts a query for a given text.AltTranslationQueryResult. toAltTranslation(TextFragment originalSource, LocaleId sourceLocId, LocaleId targetLocId)Convert a QueryResult to anAltTranslationMethod 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 ofTextFragments. -
Uses of TextFragment in net.sf.okapi.common.resource
Fields in net.sf.okapi.common.resource declared as TextFragment Modifier and Type Field Description TextFragmentAnnotatedSpan. spanCopy of the fragment of text to which the annotation is applied.TextFragmentTextPart. textText fragment of this part.Methods in net.sf.okapi.common.resource that return TextFragment Modifier and Type Method Description TextFragmentTextFragment. append(char value)Appends a character to the fragment.TextFragmentTextFragment. append(CharSequence csq)Appends the specified character sequence to this fragment.TextFragmentTextFragment. append(CharSequence csq, int start, int end)Appends a subsequence of the specified character sequence to this fragment.TextFragmentTextFragment. append(String text)Appends a string to the fragment.TextFragmentTextFragment. append(Code code)Appends an existing code to this fragment.TextFragmentTextFragment. append(TextFragment fragment)Appends a TextFragment object to this fragment.TextFragmentTextFragment. append(TextFragment fragment, boolean keepCodeIds)Appends a TextFragment object to this fragment.TextFragmentTextFragment. cleanCodes()Removes all codes both in the Codes list and the markers.TextFragmentTextFragment. clone()Clones this TextFragment.TextFragmentTextContainer. createJoinedContent()TextFragmentTextContainer. createJoinedContent(boolean keepCodeIds)static TextFragmentTextUnitUtil. expandCodes(TextFragment tf)Expand codes that have been previously merged.static TextFragmentTextUnitUtil. 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.TextFragmentTextPart. getContent()Gets the text fragment for this part.TextFragmentISegments. getFirstContent()Gets the content of the first segment of this container.TextFragmentSegments. getFirstContent()TextFragmentTextContainer. getFirstContent()Gets the content of the first part (segment or non-segment) of this container.TextFragmentISegments. getLastContent()Gets the content of last segment of this container.TextFragmentSegments. getLastContent()TextFragmentTextContainer. getLastContent()Gets the content of the last part (segment or non-segment) of this container.TextFragmentTextContainer. getUnSegmentedContentCopy()Gets a new TextFragment representing the un-segmented content of this container.TextFragmentTextContainer. getUnSegmentedContentCopy(boolean keepCodeIds)Gets a new TextFragment representing the un-segmented content of this container.static TextFragmentTextFragmentUtil. removeMoreThanMaxCodes(TextFragment tf)TextFragmentITextUnit. setSourceContent(TextFragment content)Sets the content of the source for this TextUnit.TextFragmentTextUnit. setSourceContent(TextFragment content)TextFragmentITextUnit. setTargetContent(LocaleId locId, TextFragment content)Sets the content of the target for a given locale for this TextUnit.TextFragmentTextUnit. 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 TextFragmentTextUnitUtil. storeSegmentation(TextContainer tc)TextFragmentTextFragment. 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 voidTextFragmentUtil. addMissingCodes(TextFragment from, TextFragment to, CodeMatches codeMatches)Add missing leading and trailing codes from source (aka "from") to target (aka 'to').static CodeMatchesTextFragmentUtil. 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 CodeMatchesTextFragmentUtil. 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 CodeMatchesTextFragmentUtil. alignAndCopyCodeMetadata(TextFragment from, TextFragment to, boolean addMissingCodes, boolean forceCopy)static CodeMatchesTextFragmentUtil. 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}).voidTextFragment. alignCodeIds(TextFragment base)voidTextFragment. alignCodeIds(TextFragment base, CodeMatchStrategy strategy)Aligns the code IDs of this fragment with the ones of a given fragment.voidISegments. append(TextFragment fragment)Appends a TextFragment as a segment at the end of this container.voidISegments. append(TextFragment fragment, boolean collapseIfPreviousEmpty)Appends a TextFragment as a segment at the end of this container.voidSegments. append(TextFragment fragment)voidSegments. append(TextFragment fragment, boolean collapseIfPreviousEmpty)voidTextContainer. append(TextFragment fragment)Appends a part at the end of this container.voidTextContainer. append(TextFragment fragment, boolean collapseIfPreviousEmpty)Appends a part at the end of this container.voidTextContainer. append(TextFragment fragment, boolean collapseIfPreviousEmpty, boolean keepCodeIds)Appends a part at the end of this container.TextFragmentTextFragment. append(TextFragment fragment)Appends a TextFragment object to this fragment.TextFragmentTextFragment. append(TextFragment fragment, boolean keepCodeIds)Appends a TextFragment object to this fragment.intTextFragment. compareTo(TextFragment tf)Compares an object with this TextFragment.intTextFragment. compareTo(TextFragment frag, boolean codeSensitive)Deprecated.Use compareTo(TextFragment, CompareMode)intTextFragment. compareTo(TextFragment frag, TextFragment.CompareMode compMode)Compares with another TextFragment.static voidTextFragmentUtil. copyCodeMetadata(TextFragment sf, TextFragment tf, boolean forceCopy, CodeMatches cm)static voidTextUnitUtil. deleteLastChar(TextFragment textFragment)Deletes the last non-whitespace and non-code character of a given text fragment.static booleanTextUnitUtil. endsWith(TextFragment textFragment, String substr)Indicates if a given text fragment ends with a given sub-string.static TextFragmentTextUnitUtil. expandCodes(TextFragment tf)Expand codes that have been previously merged.static TextFragmentTextUnitUtil. 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 intTextFragment. fromFragmentToString(TextFragment frag, int pos)Gets the position in the string representation of a fragment of a given position in that fragment.static StringTextUnitUtil. getCodedText(TextFragment textFragment)Gets text of a given text fragment object possibly containing inline codes.static charTextUnitUtil. getLastChar(TextFragment textFragment)Gets the last character of a given text fragment.static StringTextUnitUtil. getText(TextFragment textFragment)Extracts text from the given text fragment.static StringTextUnitUtil. getText(TextFragment textFragment, List<Integer> markerPositions)Extracts text from the given text fragment.static booleanTextUnitUtil. hasMergedCode(TextFragment tf)voidTextFragment. insert(int offset, TextFragment fragment)Inserts a TextFragment object to this fragment.voidTextFragment. insert(int offset, TextFragment fragment, boolean keepCodeIds)Inserts a TextFragment object to this fragment.static booleanTextUnitUtil. isEmpty(TextFragment textFragment)Indicates if a given text fragment object is null, or the text it contains is null or empty.static booleanTextFragmentUtil. isLeadingCode(Code code, TextFragment source)Determine if the code is at the beginning of theTextFragmentwithout intervening text.static booleanTextUnitUtil. isWellformed(TextFragment tf)static intTextUnitUtil. lastIndexOf(TextFragment textFragment, String findWhat)Returns the index (within a given text fragment object) of the rightmost occurrence of the specified substring.static voidTextFragmentUtil. logCodeMismatchErrors(CodeMatches matches, TextFragment from, TextFragment to, String textUnitId)Log all code mismatch issuesstatic booleanTextFragmentUtil. moreThanMaxCodes(TextFragment tf)static StringTextUnitUtil. printMarkerIndexes(TextFragment textFragment)static StringTextUnitUtil. printMarkers(TextFragment textFragment)static voidTextUnitUtil. removeCodes(TextFragment tf)Removes all inline tags from the givenTextFragmentstatic TextFragmentTextFragmentUtil. removeMoreThanMaxCodes(TextFragment tf)static StringTextUnitUtil. restoreSegmentation(TextContainer tc, TextFragment segStorage)Restores original segmentation of a given text container from a given text fragment created with storeSegmentation().voidTextContainer. setContent(TextFragment content)Sets the content of this TextContainer.voidTextPart. setContent(TextFragment fragment)Sets theTextFragmentfor this part.TextFragmentITextUnit. setSourceContent(TextFragment content)Sets the content of the source for this TextUnit.TextFragmentTextUnit. setSourceContent(TextFragment content)TextFragmentITextUnit. setTargetContent(LocaleId locId, TextFragment content)Sets the content of the target for a given locale for this TextUnit.TextFragmentTextUnit. 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.voidCodeSimplifier. simplifyEmptyOpeningClosing(TextFragment tf)voidCodeSimplifier. simplifyIsolated(TextFragment tf)Simplifies the place-holders in a given text fragment.voidCodeSimplifier. simplifyOpeningClosing(TextFragment tf)static CodeMatchesTextFragmentUtil. synchronizeCodeIds(TextFragment from, TextFragment to)static CodeMatchesTextFragmentUtil. synchronizeCodeIds(TextFragment from, TextFragment to, CodeMatchStrategy strategy)Matches the code IDs of thefromfragment with the ones of thetofragment.static StringTextFragmentUtil. toText(TextFragment tf)Render theTextFragmentincluding allCodes.static StringTextUnitUtil. toText(TextFragment tf)Returns the content of a given text fragment, including the original codes whenever possible.static voidTextUnitUtil. trimLeading(TextFragment textFragment)Removes leading whitespaces from a given text fragment.static voidTextUnitUtil. trimLeading(TextFragment textFragment, GenericSkeleton skel)Removes leading whitespaces from a given text fragment, puts removed whitespaces to the given skeleton.static voidTextUnitUtil. trimTrailing(TextFragment textFragment)Removes trailing whitespaces from a given text fragment.static voidTextUnitUtil. trimTrailing(TextFragment textFragment, GenericSkeleton skel)Removes trailing whitespaces from a given text fragment, puts removed whitespaces to the given skeleton.static voidTextFragment. 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 StringGenericSkeletonWriter. 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 intApertiumMTConnector. 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 intBilingualFileConnector. 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 intGoogleMTv2Connector. 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 intGoogleAutoMLTranslationConnector. 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 intKantanMTConnector. query(TextFragment tf)Deprecated.intKantanMTv21Connector. 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>>KantanMTConnector. batchQuery(List<TextFragment> fragments)Deprecated.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 intLingo24Connector. 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 intMicrosoftMTConnector. 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 intMMTConnector. 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 intMyMemoryTMConnector. 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 intPensieveTMConnector. 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 intTDASearchConnector. 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 intTranslateToolkitTMConnector. 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 voidICMLSkeleton. 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 StringHTML5SkeletonWriter. 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 TextFragmentMosesTextFilter. 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 StringTTXSkeletonWriter. 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 StringTXMLSkeletonWriter. 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 TextFragmentInlineCodeTransformer. serializeTextParts(List<Serializable> parts, boolean targetIsTKit)TextFragmentInlineCodeTransformer. serializeTextPartsForFilter(List<Serializable> parts)TextFragmentInlineCodeTransformer. serializeTextPartsForTKit(List<Serializable> parts) -
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 voidITextUnitMerger. 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.voidTextUnitMerger. 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 TextFragmentQueryUtil. createNewFragmentWithCodes(String plainText)Appends the codes stored apart usingQueryUtil.separateCodesFromText(TextFragment)at the end of a given plain text.TextFragmentQueryUtil. fromCodedHTMLToFragment(String text, TextFragment fragment)Converts an HTML string created withQueryUtil.toCodedHTML(TextFragment)back into a text fragment, but with empty inline codes.TextFragmentQueryUtil. 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 intTextMatcher. compare(TextFragment frag1, TextFragment frag2, int options)Compare two textFragment content.intTextMatcher. compareToBaseTokens(String text1, List<String> tokens1, TextFragment frag2)Compare a list of tokens to aTextFragmentobject.StringQueryUtil. fromCodedHTML(String htmlText, TextFragment fragment, boolean addMissingCodes)Converts back a coded HTML to a coded text.StringQueryUtil. fromCodedHTML(String htmlText, TextFragment fragment, boolean addMissingCodes, boolean removeSpans)Converts back a coded HTML to a coded text.TextFragmentQueryUtil. fromCodedHTMLToFragment(String text, TextFragment fragment)Converts an HTML string created withQueryUtil.toCodedHTML(TextFragment)back into a text fragment, but with empty inline codes.TextFragmentQueryUtil. fromXLIFF(Element elem, TextFragment original)Converts back an XLIFF text contained in a given element into a TextFragment.intQueryManager. query(TextFragment text)Queries all enabled translation resources for a given text fragment.StringQueryUtil. separateCodesFromText(TextFragment frag)Separate and store codes of a given text fragment.StringQueryUtil. toCodedHTML(TextFragment fragment)Converts from coded text to coded HTML.StringQueryUtil. 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 intSpaceChecker. checkSpaces(TextFragment srcFrag, TextFragment trgFrag)Checks and fixes white spaces for a given text fragment.static intAbstractChecker. 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 intAbstractChecker. 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 intAbstractChecker. 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 intAbstractChecker. 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 StringAbstractChecker. 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 voidCleaner. 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 voidCodesRemover. 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 booleanExtractionVerificationUtil. 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 voidInconsistencyCheck. 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 longWordCounter. 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 TokensTokenizer. 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 longWordCounter. 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 TextFragmentTranslationUnitVariant. getContent()Methods in net.sf.okapi.tm.pensieve.common with parameters of type TextFragment Modifier and Type Method Description voidTranslationUnitVariant. 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
-