Class CharDistributionAnalysis
java.lang.Object
org.mozilla.universalchardet.prober.distributionanalysis.CharDistributionAnalysis
- Direct Known Subclasses:
Big5DistributionAnalysis, EUCKRDistributionAnalysis, EUCTWDistributionAnalysis, GB2312DistributionAnalysis, JISDistributionAnalysis
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int[]protected booleanstatic final intprivate int/////////////////////////////////////////////////////////////static final intstatic final float/////////////////////////////////////////////////////////////static final floatprivate intprotected float -
Constructor Summary
ConstructorsConstructorDescription///////////////////////////////////////////////////////////// -
Method Summary
Modifier and TypeMethodDescriptionfloatprotected abstract intgetOrder(byte[] buf, int offset) booleanvoidhandleOneChar(byte[] buf, int offset, int charLength) voidreset()
-
Field Details
-
SURE_NO
public static final float SURE_NO/////////////////////////////////////////////////////////////- See Also:
-
SURE_YES
public static final float SURE_YES- See Also:
-
ENOUGH_DATA_THRESHOLD
public static final int ENOUGH_DATA_THRESHOLD- See Also:
-
MINIMUM_DATA_THRESHOLD
public static final int MINIMUM_DATA_THRESHOLD- See Also:
-
freqChars
private int freqChars///////////////////////////////////////////////////////////// -
totalChars
private int totalChars -
charToFreqOrder
protected int[] charToFreqOrder -
typicalDistributionRatio
protected float typicalDistributionRatio -
done
protected boolean done
-
-
Constructor Details
-
CharDistributionAnalysis
public CharDistributionAnalysis()/////////////////////////////////////////////////////////////
-
-
Method Details
-
handleOneChar
public void handleOneChar(byte[] buf, int offset, int charLength) -
getConfidence
public float getConfidence() -
reset
public void reset() -
gotEnoughData
public boolean gotEnoughData() -
getOrder
protected abstract int getOrder(byte[] buf, int offset)
-