public class CharacterCounter extends BaseCounter
| Modifier and Type | Class and Description |
|---|---|
static class |
CharacterCounter.Counts |
| Constructor and Description |
|---|
CharacterCounter() |
| Modifier and Type | Method and Description |
|---|---|
static long |
count(Object text,
LocaleId language) |
protected long |
doCountImpl(String text,
LocaleId language) |
CharacterCounter.Counts |
doFullCount(Object text,
LocaleId language) |
protected CharacterCounter.Counts |
doFullCountImpl(String text,
LocaleId language) |
static CharacterCounter.Counts |
fullCount(Object text,
LocaleId language) |
static long |
getCount(ITextUnit tu)
Returns the character count information stored by CharacterCountStep in the source part of a given text unit.
|
static long |
getCount(ITextUnit tu,
int segIndex)
Returns the character count information stored by CharacterCountStep in a given segment of the source part of a given text unit.
|
static long |
getCount(Segment segment)
Returns the character count information stored by CharacterCountStep in a given segment of the source part of a given text unit.
|
protected String |
getMetricNameForRetrieval() |
static void |
setCount(IWithAnnotations res,
long count) |
doCount, doGetCount, doGetCount, doGetCount, getCount, getCount, getCountpublic CharacterCounter.Counts doFullCount(Object text, LocaleId language)
protected long doCountImpl(String text, LocaleId language)
doCountImpl in class BaseCounterprotected CharacterCounter.Counts doFullCountImpl(String text, LocaleId language)
public static void setCount(IWithAnnotations res, long count)
protected String getMetricNameForRetrieval()
getMetricNameForRetrieval in class BaseCounterpublic static CharacterCounter.Counts fullCount(Object text, LocaleId language)
public static long getCount(ITextUnit tu)
tu - the given text unitpublic static long getCount(ITextUnit tu, int segIndex)
tu - the given tusegIndex - index of the segment in the sourcepublic static long getCount(Segment segment)
segment - the given segmentCopyright © 2022. All rights reserved.