Uses of Class
net.sf.okapi.common.resource.Segment
-
Packages that use Segment Package Description net.sf.okapi.common.resource Interfaces and classes that represent the parsed resources attached to the events sent by a filter.net.sf.okapi.lib.translation Interfaces and classes for accessing translation resources.net.sf.okapi.lib.verification net.sf.okapi.steps.cleanup net.sf.okapi.steps.common Classes implementing often-used steps.net.sf.okapi.steps.rainbowkit.common net.sf.okapi.steps.repetitionanalysis net.sf.okapi.steps.sentencealigner net.sf.okapi.steps.terminologyleveraging net.sf.okapi.steps.wordcount net.sf.okapi.steps.wordcount.categorized.gmx net.sf.okapi.steps.wordcount.common -
-
Uses of Segment in net.sf.okapi.common.resource
Methods in net.sf.okapi.common.resource that return Segment Modifier and Type Method Description SegmentSegment. clone()SegmentISegments. get(int index)Gets the segment for a given segment index.SegmentISegments. get(String id)Gets the segment for a given identifier.SegmentSegments. get(int index)SegmentSegments. get(String id)SegmentAlignedSegments. getCorrespondingSource(Segment trgSeg, LocaleId trgLoc)SegmentIAlignedSegments. getCorrespondingSource(Segment trgSeg, LocaleId trgLoc)Gets the source segment corresponding to a given target segmentSegmentAlignedSegments. getCorrespondingTarget(Segment srcSeg, LocaleId trgLoc)SegmentIAlignedSegments. getCorrespondingTarget(Segment seg, LocaleId trgLoc)Gets the target segment corresponding to a given source segmentSegmentTextContainer. getFirstSegment()Returns the firstSegmentof this container.SegmentISegments. getLast()Gets the lastSegmentof the container.SegmentSegments. getLast()SegmentAlignedSegments. getSource(int index, LocaleId trgLoc)SegmentIAlignedSegments. getSource(int index, LocaleId trgLoc)Gets the source segment for the given target locale at a given position.SegmentITextUnit. getSourceSegment(String segId, boolean createIfNeeded)Gets the source segment for a given segment id.SegmentTextUnit. getSourceSegment(String segId, boolean createIfNeeded)SegmentITextUnit. getTargetSegment(LocaleId trgLoc, String segId, boolean createIfNeeded)Gets the segment for a given segment id in a given target.SegmentTextUnit. getTargetSegment(LocaleId trgLoc, String segId, boolean createIfNeeded)SegmentAlignedSegments. splitSource(LocaleId trgLoc, Segment srcSeg, int splitPos)SegmentIAlignedSegments. splitSource(LocaleId trgLoc, Segment srcSeg, int splitPos)Splits a given source segment into two.SegmentAlignedSegments. splitTarget(LocaleId trgLoc, Segment trgSeg, int splitPos)SegmentIAlignedSegments. splitTarget(LocaleId trgLoc, Segment trgSeg, int splitPos)Splits a given target segment into two.Methods in net.sf.okapi.common.resource that return types with arguments of type Segment Modifier and Type Method Description List<Segment>ISegments. asList()Get all segments.List<Segment>Segments. asList()Iterator<Segment>AlignedSegments. iterator()Iterator<Segment>AlignedSegments. iterator(LocaleId trgLoc)Iterator<Segment>IAlignedSegments. iterator()Gets an iterator for the default source segments of this text unit.Iterator<Segment>IAlignedSegments. iterator(LocaleId trgLoc)Gets an iterator for the source of the specified target locale.Iterator<Segment>ISegments. iterator()Gets an iterator for the segments of this container.Iterator<Segment>Segments. iterator()Methods in net.sf.okapi.common.resource with parameters of type Segment Modifier and Type Method Description static AltTranslationsAnnotationTextUnitUtil. addAltTranslation(Segment seg, AltTranslation alt)Adds anAltTranslationobject to a givenSegment.voidAlignedSegments. append(Segment srcSeg, Segment trgSeg, LocaleId trgLoc)voidIAlignedSegments. append(Segment srcSeg, Segment trgSeg, LocaleId trgLoc)Adds given source and target segments to the end of the content.voidISegments. append(Segment segment)Appends a segment at the end of this container.voidISegments. append(Segment segment, boolean collapseIfPreviousEmpty)Appends a segment at the end of this container.voidISegments. append(Segment segment, String textBefore)Appends a segment at the end of this container, with an optional non-segment part just before.voidISegments. append(Segment segment, String textBefore, boolean collapseIfPreviousEmpty)Appends a segment at the end of this container, with an optional non-segment part just before.voidSegments. append(Segment segment)voidSegments. append(Segment segment, boolean collapseIfPreviousEmpty)voidSegments. append(Segment segment, String textBefore)voidSegments. append(Segment segment, String textBefore, boolean collapseIfPreviousEmpty)intSegmentComparator. compare(Segment orig, Segment trans)Match on id and type (segment or not) or TextFragment.SegmentAlignedSegments. getCorrespondingSource(Segment trgSeg, LocaleId trgLoc)SegmentIAlignedSegments. getCorrespondingSource(Segment trgSeg, LocaleId trgLoc)Gets the source segment corresponding to a given target segmentSegmentAlignedSegments. getCorrespondingTarget(Segment srcSeg, LocaleId trgLoc)SegmentIAlignedSegments. getCorrespondingTarget(Segment seg, LocaleId trgLoc)Gets the target segment corresponding to a given source segmentvoidAlignedSegments. insert(int index, Segment srcSeg, Segment trgSeg, LocaleId trgLoc)voidIAlignedSegments. insert(int index, Segment srcSeg, Segment trgSeg, LocaleId trgLoc)Inserts given source and target segments at the specified position in the list of segments.voidISegments. insert(int index, Segment seg)Inserts a given segment at the specified position.voidSegments. insert(int index, Segment seg)voidAlignedSegments. joinWithNext(Segment seg, LocaleId trgLoc)voidIAlignedSegments. joinWithNext(Segment seg, LocaleId trgLoc)Joins the segment for a given segment's id to the next segment, including all the parts between the two segments.booleanAlignedSegments. remove(Segment seg, LocaleId trgLoc)booleanIAlignedSegments. remove(Segment seg, LocaleId trgLoc)Removes the given segment and any segments with the same id from the specified sources and targets.voidISegments. set(int index, Segment seg)Sets a new segment at a given segment index.voidSegments. set(int index, Segment seg)voidAlignedSegments. setSegment(int index, Segment seg, LocaleId trgLoc)voidIAlignedSegments. setSegment(int index, Segment seg, LocaleId trgLoc)Replaces a segment at a given position with a clone of the given segment.SegmentAlignedSegments. splitSource(LocaleId trgLoc, Segment srcSeg, int splitPos)SegmentIAlignedSegments. splitSource(LocaleId trgLoc, Segment srcSeg, int splitPos)Splits a given source segment into two.SegmentAlignedSegments. splitTarget(LocaleId trgLoc, Segment trgSeg, int splitPos)SegmentIAlignedSegments. splitTarget(LocaleId trgLoc, Segment trgSeg, int splitPos)Splits a given target segment into two.voidSegments. validateSegmentId(Segment seg)Checks if the id of a given segment is empty, null or a duplicate.Constructors in net.sf.okapi.common.resource with parameters of type Segment Constructor Description AlignedPair(Segment sourceSegment, Segment targetSegment, LocaleId localeId)Creates an AlignedPair from source and targetSegmentsTextContainer(Segment segment)Creates a new TextContainer object with an initial segment. -
Uses of Segment in net.sf.okapi.lib.translation
Methods in net.sf.okapi.lib.translation with parameters of type Segment Modifier and Type Method Description static booleanQueryManager. canLeverage(Segment srcSeg, Segment trgSeg, boolean leverageIfTargetIsEmpty, boolean leverageIfTargetIsSameAsSource)Indicates if we can fill a given target segment with leveraged translation based on whether it is empty and whether it is the same as the source segment. -
Uses of Segment in net.sf.okapi.lib.verification
Methods in net.sf.okapi.lib.verification with parameters of type Segment Modifier and Type Method Description intLanguageToolConnector. checkSegment(URI docId, String subDocId, Segment srcSeg, Segment trgSeg, ITextUnit tu)intBlacklistChecker. verify(URI docId, String subDocId, ITextUnit tu, Segment segment, boolean allowBlacklistSub, boolean isSrc)intTermChecker. verify(URI docId, String subDocId, ITextUnit tu, Segment srcSeg, Segment trgSeg) -
Uses of Segment in net.sf.okapi.steps.cleanup
Methods in net.sf.okapi.steps.cleanup with parameters of type Segment Modifier and Type Method Description protected voidCleaner. checkCharacters(ITextUnit tu, Segment seg, LocaleId targetLocale)Wrapper for removing character corruption and detecting unexpected characters.protected voidCleaner. markSegmentForRemoval(ITextUnit tu, Segment seg, LocaleId targetLocale)Effectively marks the segment for removal by emptying the content for the given target.protected voidCleaner. matchRegexExpressions(ITextUnit tu, Segment seg, LocaleId targetLocale)Marks segments for removal that contain text which match given regular expressions.protected voidCleaner. normalizeMarks(ITextUnit tu, Segment seg, LocaleId targetLocale)protected voidCleaner. normalizeQuotation(ITextUnit tu, Segment seg, LocaleId targetLocale)Converts all quotation marks (curly or language specific) to straight quotes.protected voidCleaner. normalizeWhitespace(ITextUnit tu, Segment seg, LocaleId targetLocale)Converts whitespace ({tab}, {space}, {CR}, {LF}) to single space. -
Uses of Segment in net.sf.okapi.steps.common
Methods in net.sf.okapi.steps.common with parameters of type Segment Modifier and Type Method Description booleanExtractionVerificationUtil. compareSegments(Segment seg1, Segment seg2)Compares two Segments. -
Uses of Segment in net.sf.okapi.steps.rainbowkit.common
Methods in net.sf.okapi.steps.rainbowkit.common with parameters of type Segment Modifier and Type Method Description longWordCounter. getWordCount(Segment seg) -
Uses of Segment in net.sf.okapi.steps.repetitionanalysis
Methods in net.sf.okapi.steps.repetitionanalysis with parameters of type Segment Modifier and Type Method Description static booleanRepetitionAnalysisStep. checkSegments(Segment sseg, Segment tseg) -
Uses of Segment in net.sf.okapi.steps.sentencealigner
Constructor parameters in net.sf.okapi.steps.sentencealigner with type arguments of type Segment Constructor Description SentenceAligner(List<AlignmentScorer<Segment>> scorerList) -
Uses of Segment in net.sf.okapi.steps.terminologyleveraging
Methods in net.sf.okapi.steps.terminologyleveraging with parameters of type Segment Modifier and Type Method Description protected voidBaseTerminologyConnector. populateSegmentsWithGlossary(int segmentIndex, Segment sourceSegment, Segment targetSegment, List<TerminologyQueryResult> queryResults) -
Uses of Segment in net.sf.okapi.steps.wordcount
Methods in net.sf.okapi.steps.wordcount with parameters of type Segment Modifier and Type Method Description static longWordCounter. count(Segment segment, LocaleId language)Counts words in a given segment.protected longWordCountStep. count(Segment segment, LocaleId locale)static longCharacterCounter. getCount(Segment segment)Returns the character count information stored by CharacterCountStep in a given segment of the source part of a given text unit.static longWordCounter. getCount(Segment segment)Returns the word count information stored by WordCountStep in a given segment of the source part of a given text unit.protected voidCharacterCountStep. removeFromMetrics(Segment seg, String metricName)protected voidCharacterCountStep. saveToMetrics(Segment seg, CharacterCounter.Counts count) -
Uses of Segment in net.sf.okapi.steps.wordcount.categorized.gmx
Methods in net.sf.okapi.steps.wordcount.categorized.gmx with parameters of type Segment Modifier and Type Method Description protected longGMXProtectedWordCountStep. count(Segment segment, LocaleId locale) -
Uses of Segment in net.sf.okapi.steps.wordcount.common
Methods in net.sf.okapi.steps.wordcount.common with parameters of type Segment Modifier and Type Method Description protected longAltAnnotationBasedCountStep. count(Segment segment, LocaleId locale)protected abstract longBaseCountStep. count(Segment segment, LocaleId locale)protected longTokenCharacterCountStep. count(Segment segment, LocaleId locale)protected longTokenCountStep. count(Segment segment, LocaleId locale)longBaseCounter. doGetCount(Segment segment)static longBaseCounter. getCount(Segment segment, String metricName)protected TokensTokenCountStep. getTokens(Segment segment, LocaleId locale)protected voidBaseCountStep. removeFromMetrics(Segment seg, String metricName)protected voidBaseCountStep. saveToMetrics(Segment seg, long count)
-