Class BaseCounter
- java.lang.Object
-
- net.sf.okapi.steps.wordcount.common.BaseCounter
-
- Direct Known Subclasses:
CharacterCounter
,WordCounter
public abstract class BaseCounter extends Object
-
-
Constructor Summary
Constructors Constructor Description BaseCounter()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description long
doCount(Object text, LocaleId language)
protected abstract long
doCountImpl(String text, LocaleId language)
long
doGetCount(IWithAnnotations res)
long
doGetCount(Segment segment)
long
doGetCount(TextContainer tc)
static long
getCount(IWithAnnotations res, String metricName)
static long
getCount(Segment segment, String metricName)
static long
getCount(TextContainer tc, String metricName)
protected abstract String
getMetricNameForRetrieval()
-
-
-
Method Detail
-
getMetricNameForRetrieval
protected abstract String getMetricNameForRetrieval()
-
doGetCount
public long doGetCount(Segment segment)
-
getCount
public static long getCount(TextContainer tc, String metricName)
-
doGetCount
public long doGetCount(TextContainer tc)
-
getCount
public static long getCount(IWithAnnotations res, String metricName)
-
doGetCount
public long doGetCount(IWithAnnotations res)
-
-