Class TokenCountStep
- java.lang.Object
-
- net.sf.okapi.common.pipeline.BasePipelineStep
-
- net.sf.okapi.steps.wordcount.common.BaseCountStep
-
- net.sf.okapi.steps.wordcount.common.TokenCountStep
-
- All Implemented Interfaces:
IPipelineStep
- Direct Known Subclasses:
GMXAlphanumericOnlyTextUnitWordCountStep,GMXMeasurementOnlyTextUnitWordCountStep,GMXNumericOnlyTextUnitWordCountStep,TokenCharacterCountStep,WordCountStep
public abstract class TokenCountStep extends BaseCountStep
-
-
Constructor Summary
Constructors Constructor Description TokenCountStep()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected longcount(Segment segment, LocaleId locale)protected longcount(TextContainer textContainer, LocaleId locale)protected longcountInTextUnit(ITextUnit textUnit)protected TokensfilterTokens(Tokens allTokens)protected abstract String[]getTokenNames()protected TokensgetTokens(Segment segment, LocaleId locale)protected TokensgetTokens(TextContainer textContainer, LocaleId locale)-
Methods inherited from class net.sf.okapi.steps.wordcount.common.BaseCountStep
countOnlyTranslatable, getBatchCount, getBatchItemCount, getDescription, getDocumentCount, getGroupCount, getMetric, getName, getSource, getSubDocumentCount, handleEndBatch, handleEndBatchItem, handleEndDocument, handleEndGroup, handleEndSubDocument, handleStartBatch, handleStartBatchItem, handleStartDocument, handleStartGroup, handleStartSubDocument, handleTextUnit, removeFromMetrics, removeFromMetrics, removeFromMetrics, saveCount, saveToMetrics, saveToMetrics, saveToMetrics
-
Methods inherited from class net.sf.okapi.common.pipeline.BasePipelineStep
cancel, destroy, getHelpLocation, getParameters, getSourceLocale, getTargetLocale, handleCustom, handleDocumentPart, handleEndSubfilter, handleEvent, handleMultiEvent, handlePipelineParameters, handleRawDocument, handleStartSubfilter, isDone, isLastOutputStep, setLastOutputStep, setParameters, setSourceLocale, setTargetLocale
-
-
-
-
Method Detail
-
getTokenNames
protected abstract String[] getTokenNames()
-
getTokens
protected Tokens getTokens(TextContainer textContainer, LocaleId locale)
-
count
protected long count(TextContainer textContainer, LocaleId locale)
- Specified by:
countin classBaseCountStep
-
count
protected long count(Segment segment, LocaleId locale)
- Specified by:
countin classBaseCountStep
-
countInTextUnit
protected long countInTextUnit(ITextUnit textUnit)
- Specified by:
countInTextUnitin classBaseCountStep
-
-