Class StatisticsTool
java.lang.Object
com.ibm.icu.dev.tool.charsetdet.sbcs.StatisticsTool
- All Implemented Interfaces:
NGramList.NGramKeyMapper
,NGramParser.NGramParserClient
public class StatisticsTool
extends Object
implements NGramParser.NGramParserClient, NGramList.NGramKeyMapper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncollectStatistics
(InputFile file) private NGramList
void
handleNGram
(String key) static void
private int
nextBuffer
(InputFile inputFileArg) char
nextChar()
private static void
usage()
private void
writeStatistics
(ArrayList keyList, boolean visual)
-
Field Details
-
usageString
- See Also:
-
BUFFER_SIZE
private static final int BUFFER_SIZE- See Also:
-
buffer
private char[] buffer -
bufIndex
private int bufIndex -
bufMax
private int bufMax -
inputFile
-
ngrams
-
allBytes
private static byte[] allBytes
-
-
Constructor Details
-
StatisticsTool
public StatisticsTool()
-
-
Method Details
-
usage
private static void usage() -
nextBuffer
-
nextChar
public char nextChar()- Specified by:
nextChar
in interfaceNGramParser.NGramParserClient
-
handleNGram
- Specified by:
handleNGram
in interfaceNGramParser.NGramParserClient
-
mapKey
- Specified by:
mapKey
in interfaceNGramList.NGramKeyMapper
-
dumpNGrams
-
writeStatistics
-
collectStatistics
-
main
-