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 class
JapaneseContextAnalysis.Order
-
Field Summary
Fields Modifier and Type Field Description private boolean
done
static float
DONT_KNOW
static int
ENOUGH_REL_THRESHOLD
protected static byte[][]
jp2CharContext
private int
lastCharOrder
static int
MAX_REL_THRESHOLD
static int
MINIMUM_DATA_THRESHOLD
private int
needToSkipCharNum
static int
NUM_OF_CATEGORY
private int[]
relSample
private JapaneseContextAnalysis.Order
tmpOrder
private int
totalRel
-
Constructor Summary
Constructors Constructor Description JapaneseContextAnalysis()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description float
getConfidence()
protected abstract int
getOrder(byte[] buf, int offset)
protected abstract void
getOrder(JapaneseContextAnalysis.Order order, 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()
-
-
-
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)
-
-