Class Checker

java.lang.Object
com.ibm.icu.dev.tool.charsetdet.sbcs.Checker
All Implemented Interfaces:
NGramParser.NGramParserClient

public class Checker extends Object implements NGramParser.NGramParserClient
  • Field Details

    • ngrams

      private NGramList ngrams
    • totalNGrams

      private int totalNGrams
    • totalHits

      private int totalHits
    • language

      private String language
    • encoding

      private String encoding
    • histogram

      private int[] histogram
    • BUFFER_SIZE

      private static final int BUFFER_SIZE
      See Also:
    • buffer

      private char[] buffer
    • bufIndex

      private int bufIndex
    • bufMax

      private int bufMax
    • parser

      private NGramParser parser
  • Constructor Details

    • Checker

      public Checker(NGramList list, InputFile dataFile)
      TODO This should take cumulative percent and the name...
  • Method Details

    • handleNGram

      public void handleNGram(String key)
      Specified by:
      handleNGram in interface NGramParser.NGramParserClient
    • resetCounts

      private void resetCounts()
    • resetHistogram

      private void resetHistogram()
    • exceptionError

      private static void exceptionError(Exception e)
    • languageName

      private static String languageName(String filename)
    • nextBuffer

      private boolean nextBuffer(InputFile inputFile)
    • parseBuffer

      private void parseBuffer()
    • nextChar

      public char nextChar()
      Specified by:
      nextChar in interface NGramParser.NGramParserClient
    • getLanguage

      public String getLanguage()
    • setMapper

      public void setMapper(InputFile file)
    • checkBuffer

      public int checkBuffer(char[] theBuffer, int charCount)
    • check

      public void check(InputFile dataFile)