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[]
static final int
private int
static final int
static final float
static final float
private int
protected float
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
protected abstract int
getOrder
(byte[] buf, int offset) boolean
void
handleData
(byte[] buf, int offset, int length) void
handleOneChar
(byte[] buf, int offset, int charLength) final void
reset()
void
-
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
-
-
Constructor Details
-
CharDistributionAnalysis
public CharDistributionAnalysis()
-
-
Method Details
-
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 final void reset() -
setOption
public void setOption() -
gotEnoughData
public boolean gotEnoughData() -
getOrder
protected abstract int getOrder(byte[] buf, int offset)
-