Class SentenceAligner
- java.lang.Object
-
- net.sf.okapi.steps.sentencealigner.SentenceAligner
-
public class SentenceAligner extends Object
SentenceAligner aligns source and target (paragraph)TextUnits.- Version:
- 1.47.0 FIX: Preserves inter-segment whitespace during alignment by: 1. Copying target container structure FIRST (all segments + inter-segment parts) 2. Then updating segment IDs and merging as needed 3. Never clearing containers after initial copy
-
-
Constructor Summary
Constructors Constructor Description SentenceAligner(List<net.sf.okapi.steps.gcaligner.AlignmentScorer<net.sf.okapi.common.resource.Segment>> scorerList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description net.sf.okapi.common.resource.ITextUnitalign(net.sf.okapi.common.resource.ITextUnit bilingualParagraph, net.sf.okapi.common.LocaleId srcLocale, net.sf.okapi.common.LocaleId trgLocale, boolean outputOneTOneMatchesOnly)net.sf.okapi.common.resource.ITextUnitalign(net.sf.okapi.common.resource.ITextUnit sourceParagraph, net.sf.okapi.common.resource.ITextUnit targetParagraph, net.sf.okapi.common.LocaleId srcLocale, net.sf.okapi.common.LocaleId trgLocale, boolean outputOneTOneMatchesOnly)
-
-
-
Constructor Detail
-
SentenceAligner
public SentenceAligner(List<net.sf.okapi.steps.gcaligner.AlignmentScorer<net.sf.okapi.common.resource.Segment>> scorerList)
-
-
Method Detail
-
align
public net.sf.okapi.common.resource.ITextUnit align(net.sf.okapi.common.resource.ITextUnit sourceParagraph, net.sf.okapi.common.resource.ITextUnit targetParagraph, net.sf.okapi.common.LocaleId srcLocale, net.sf.okapi.common.LocaleId trgLocale, boolean outputOneTOneMatchesOnly)
-
align
public net.sf.okapi.common.resource.ITextUnit align(net.sf.okapi.common.resource.ITextUnit bilingualParagraph, net.sf.okapi.common.LocaleId srcLocale, net.sf.okapi.common.LocaleId trgLocale, boolean outputOneTOneMatchesOnly)
-
-