Package com.ibm.icu.impl.breakiter
Class CjkBreakEngine
java.lang.Object
com.ibm.icu.impl.breakiter.DictionaryBreakEngine
com.ibm.icu.impl.breakiter.CjkBreakEngine
- All Implemented Interfaces:
LanguageBreakEngine
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ibm.icu.impl.breakiter.DictionaryBreakEngine
DictionaryBreakEngine.DequeI, DictionaryBreakEngine.PossibleWord -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate UnicodeSetprivate DictionaryMatcherprivate UnicodeSetprivate UnicodeSetprivate MlBreakEngineprivate booleanprivate static final intprivate static final intprivate static final intprivate static final intFields inherited from class com.ibm.icu.impl.breakiter.DictionaryBreakEngine
fSet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdivideUpDictionaryRange(CharacterIterator inText, int startPos, int endPos, DictionaryBreakEngine.DequeI foundBreaks, boolean isPhraseBreaking) Divide up a range of known dictionary characters handled by this break engine.booleanprivate static intgetKatakanaCost(int wordlength) private StringgetPatternFromText(CharacterIterator text, StringBuffer sb, int start, int length) inthashCode()private voidprivate static booleanisKatakana(int value) private voidprivate voidMethods inherited from class com.ibm.icu.impl.breakiter.DictionaryBreakEngine
findBreaks, handles, setCharacters
-
Field Details
-
fHangulWordSet
-
fDigitOrOpenPunctuationOrAlphabetSet
-
fClosePunctuationSet
-
fDictionary
-
fSkipSet
-
fMlBreakEngine
-
isCj
private boolean isCj -
kMaxKatakanaLength
private static final int kMaxKatakanaLength- See Also:
-
kMaxKatakanaGroupLength
private static final int kMaxKatakanaGroupLength- See Also:
-
maxSnlp
private static final int maxSnlp- See Also:
-
kint32max
private static final int kint32max- See Also:
-
-
Constructor Details
-
CjkBreakEngine
- Throws:
IOException
-
-
Method Details
-
initializeJapanesePhraseParamater
private void initializeJapanesePhraseParamater() -
loadJapaneseExtensions
private void loadJapaneseExtensions() -
loadHiragana
private void loadHiragana() -
equals
-
hashCode
public int hashCode() -
getKatakanaCost
private static int getKatakanaCost(int wordlength) -
isKatakana
private static boolean isKatakana(int value) -
divideUpDictionaryRange
public int divideUpDictionaryRange(CharacterIterator inText, int startPos, int endPos, DictionaryBreakEngine.DequeI foundBreaks, boolean isPhraseBreaking) Description copied from class:DictionaryBreakEngineDivide up a range of known dictionary characters handled by this break engine.
- Specified by:
divideUpDictionaryRangein classDictionaryBreakEngine- Parameters:
inText- A UText representing the textstartPos- The start of the range of dictionary charactersendPos- The end of the range of dictionary charactersfoundBreaks- Output of break positions. Positions are pushed. Pre-existing contents of the output stack are unaltered.- Returns:
- The number of breaks found
-
getPatternFromText
-