Package net.sf.okapi.steps.idaligner
Class IdBasedAlignerStep
- java.lang.Object
-
- net.sf.okapi.common.pipeline.BasePipelineStep
-
- net.sf.okapi.steps.idaligner.IdBasedAlignerStep
-
- All Implemented Interfaces:
AutoCloseable,Function<Stream<Event>,Stream<Event>>,IPipelineStep
public class IdBasedAlignerStep extends BasePipelineStep
Align twoTextUnits based on matching ids. The ids are taken from the name (TextUnit#getName) or id (TextUnit#getId) of eachTextUnit, depending on configuration. AnyIFilterthat produces a name for itsTextUnits will work with this aligner. Expects filteredEvents as input and returns a new (aligned) bi-lingualTextUnitEvent. Optionally produce a TMX file in the specified output path.- Author:
- Greg Perkins, HargraveJE
-
-
Constructor Summary
Constructors Constructor Description IdBasedAlignerStep()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()StringgetName()ParametersgetParameters()protected EventhandleEndBatch(Event event)protected EventhandleEndDocument(Event event)protected EventhandleStartBatch(Event event)protected EventhandleStartDocument(Event event)protected EventhandleTextUnit(Event sourceEvent)voidsetExecutionContext(ExecutionContext context)voidsetFilterConfigurationMapper(IFilterConfigurationMapper fcMapper)voidsetParameters(IParameters params)voidsetSecondInput(RawDocument secondInput)voidsetSourceLocale(LocaleId sourceLocale)voidsetTargetLocale(LocaleId targetLocale)-
Methods inherited from class net.sf.okapi.common.pipeline.BasePipelineStep
cancel, destroy, getHelpLocation, getSourceLocale, getTargetLocale, handleCustom, handleDocumentPart, handleEndBatchItem, handleEndGroup, handleEndSubDocument, handleEndSubfilter, handleEvent, handleMultiEvent, handlePipelineParameters, handleRawDocument, handleStartBatchItem, handleStartGroup, handleStartSubDocument, handleStartSubfilter, isDone, isLastOutputStep, setLastOutputStep
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.okapi.common.pipeline.IPipelineStep
apply, close, handleStream
-
-
-
-
Method Detail
-
setFilterConfigurationMapper
public void setFilterConfigurationMapper(IFilterConfigurationMapper fcMapper)
-
setSourceLocale
public void setSourceLocale(LocaleId sourceLocale)
- Specified by:
setSourceLocalein interfaceIPipelineStep- Overrides:
setSourceLocalein classBasePipelineStep
-
setTargetLocale
public void setTargetLocale(LocaleId targetLocale)
- Specified by:
setTargetLocalein interfaceIPipelineStep- Overrides:
setTargetLocalein classBasePipelineStep
-
setSecondInput
public void setSecondInput(RawDocument secondInput)
-
setExecutionContext
public void setExecutionContext(ExecutionContext context)
-
getDescription
public String getDescription()
-
getName
public String getName()
-
getParameters
public Parameters getParameters()
- Specified by:
getParametersin interfaceIPipelineStep- Overrides:
getParametersin classBasePipelineStep
-
setParameters
public void setParameters(IParameters params)
- Specified by:
setParametersin interfaceIPipelineStep- Overrides:
setParametersin classBasePipelineStep
-
handleStartBatch
protected Event handleStartBatch(Event event)
- Overrides:
handleStartBatchin classBasePipelineStep
-
handleEndBatch
protected Event handleEndBatch(Event event)
- Overrides:
handleEndBatchin classBasePipelineStep
-
handleStartDocument
protected Event handleStartDocument(Event event)
- Overrides:
handleStartDocumentin classBasePipelineStep
-
handleEndDocument
protected Event handleEndDocument(Event event)
- Overrides:
handleEndDocumentin classBasePipelineStep
-
handleTextUnit
protected Event handleTextUnit(Event sourceEvent)
- Overrides:
handleTextUnitin classBasePipelineStep
-
-