Class JapaneseContextAnalysis
- java.lang.Object
-
- org.mozilla.universalchardet.prober.contextanalysis.JapaneseContextAnalysis
-
- Direct Known Subclasses:
EUCJPContextAnalysis,SJISContextAnalysis
public abstract class JapaneseContextAnalysis extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classJapaneseContextAnalysis.Order
-
Field Summary
Fields Modifier and Type Field Description private booleandonestatic floatDONT_KNOWstatic intENOUGH_REL_THRESHOLDprotected static byte[][]jp2CharContextprivate intlastCharOrderstatic intMAX_REL_THRESHOLDstatic intMINIMUM_DATA_THRESHOLDprivate intneedToSkipCharNumstatic intNUM_OF_CATEGORYprivate int[]relSampleprivate JapaneseContextAnalysis.OrdertmpOrderprivate inttotalRel
-
Constructor Summary
Constructors Constructor Description JapaneseContextAnalysis()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description floatgetConfidence()protected abstract intgetOrder(byte[] buf, int offset)protected abstract voidgetOrder(JapaneseContextAnalysis.Order order, byte[] buf, int offset)booleangotEnoughData()voidhandleData(byte[] buf, int offset, int length)voidhandleOneChar(byte[] buf, int offset, int charLength)voidreset()voidsetOption()
-
-
-
Field Detail
-
NUM_OF_CATEGORY
public static final int NUM_OF_CATEGORY
- See Also:
- Constant Field Values
-
ENOUGH_REL_THRESHOLD
public static final int ENOUGH_REL_THRESHOLD
- See Also:
- Constant Field Values
-
MAX_REL_THRESHOLD
public static final int MAX_REL_THRESHOLD
- See Also:
- Constant Field Values
-
MINIMUM_DATA_THRESHOLD
public static final int MINIMUM_DATA_THRESHOLD
- See Also:
- Constant Field Values
-
DONT_KNOW
public static final float DONT_KNOW
- See Also:
- Constant Field Values
-
relSample
private final int[] relSample
-
totalRel
private int totalRel
-
lastCharOrder
private int lastCharOrder
-
needToSkipCharNum
private int needToSkipCharNum
-
done
private boolean done
-
tmpOrder
private final JapaneseContextAnalysis.Order tmpOrder
-
jp2CharContext
protected static final byte[][] jp2CharContext
-
-
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 void getOrder(JapaneseContextAnalysis.Order order, byte[] buf, int offset)
-
getOrder
protected abstract int getOrder(byte[] buf, int offset)
-
-