Class TokenCharacterCountStep
- java.lang.Object
-
- net.sf.okapi.common.pipeline.BasePipelineStep
-
- net.sf.okapi.steps.wordcount.common.BaseCountStep
-
- net.sf.okapi.steps.wordcount.common.TokenCountStep
-
- net.sf.okapi.steps.wordcount.common.TokenCharacterCountStep
-
- All Implemented Interfaces:
AutoCloseable
,Function<Stream<Event>,Stream<Event>>
,IPipelineStep
- Direct Known Subclasses:
GMXAlphanumericOnlyTextUnitCharacterCountStep
,GMXMeasurementOnlyTextUnitCharacterCountStep
,GMXNumericOnlyTextUnitCharacterCountStep
public abstract class TokenCharacterCountStep extends TokenCountStep
-
-
Constructor Summary
Constructors Constructor Description TokenCharacterCountStep()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected long
count(Segment segment, LocaleId locale)
protected long
count(TextContainer textContainer, LocaleId locale)
static long
countTokenChars(Tokens tokens, LocaleId locale)
Return the total character count (calculated perGMX.TotalCharacterCount
) of all supplied tokens.-
Methods inherited from class net.sf.okapi.steps.wordcount.common.TokenCountStep
countInTextUnit, filterTokens, getTokenNames, getTokens, getTokens
-
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
-
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
-
count
protected long count(Segment segment, LocaleId locale)
- Overrides:
count
in classTokenCountStep
-
count
protected long count(TextContainer textContainer, LocaleId locale)
- Overrides:
count
in classTokenCountStep
-
countTokenChars
public static long countTokenChars(Tokens tokens, LocaleId locale)
Return the total character count (calculated perGMX.TotalCharacterCount
) of all supplied tokens.
-
-