org.mozilla.universalchardet.prober.distributionanalysis
Class CharDistributionAnalysis

java.lang.Object
  extended by org.mozilla.universalchardet.prober.distributionanalysis.CharDistributionAnalysis
Direct Known Subclasses:
Big5DistributionAnalysis, EUCKRDistributionAnalysis, EUCTWDistributionAnalysis, GB2312DistributionAnalysis, JISDistributionAnalysis

public abstract class CharDistributionAnalysis
extends java.lang.Object


Field Summary
protected  int[] charToFreqOrder
           
protected  boolean done
           
static int ENOUGH_DATA_THRESHOLD
           
static int MINIMUM_DATA_THRESHOLD
           
static float SURE_NO
           
static float SURE_YES
           
protected  float typicalDistributionRatio
           
 
Constructor Summary
CharDistributionAnalysis()
           
 
Method Summary
 float getConfidence()
           
protected abstract  int getOrder(byte[] buf, int offset)
           
 boolean gotEnoughData()
           
 void handleData(byte[] buf, int offset, int length)
           
 void handleOneChar(byte[] buf, int offset, int charLength)
           
 void reset()
           
 void setOption()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SURE_NO

public static final float SURE_NO
See Also:
Constant Field Values

SURE_YES

public static final float SURE_YES
See Also:
Constant Field Values

ENOUGH_DATA_THRESHOLD

public static final int ENOUGH_DATA_THRESHOLD
See Also:
Constant Field Values

MINIMUM_DATA_THRESHOLD

public static final int MINIMUM_DATA_THRESHOLD
See Also:
Constant Field Values

charToFreqOrder

protected int[] charToFreqOrder

typicalDistributionRatio

protected float typicalDistributionRatio

done

protected boolean done
Constructor Detail

CharDistributionAnalysis

public CharDistributionAnalysis()
Method Detail

handleData

public void handleData(byte[] buf,
                       int offset,
                       int length)

handleOneChar

public void handleOneChar(byte[] buf,
                          int offset,
                          int charLength)

getConfidence

public float getConfidence()

reset

public void reset()

setOption

public void setOption()

gotEnoughData

public boolean gotEnoughData()

getOrder

protected abstract int getOrder(byte[] buf,
                                int offset)


Copyright © 2013. All Rights Reserved.