public class MlBreakEngine extends Object
| Constructor and Description |
|---|
MlBreakEngine(UnicodeSet digitOrOpenPunctuationOrAlphabetSet,
UnicodeSet closePunctuationSet)
Constructor for Chinese and Japanese phrase breaking.
|
| Modifier and Type | Method and Description |
|---|---|
int |
divideUpRange(CharacterIterator inText,
int startPos,
int endPos,
CharacterIterator inString,
int codePointLength,
int[] charPositions,
DictionaryBreakEngine.DequeI foundBreaks)
Divide up a range of characters handled by this break engine.
|
public MlBreakEngine(UnicodeSet digitOrOpenPunctuationOrAlphabetSet, UnicodeSet closePunctuationSet)
digitOrOpenPunctuationOrAlphabetSet - An unicode set with the digit and open punctuation
and alphabet.closePunctuationSet - An unicode set with the close punctuation.public int divideUpRange(CharacterIterator inText, int startPos, int endPos, CharacterIterator inString, int codePointLength, int[] charPositions, DictionaryBreakEngine.DequeI foundBreaks)
inText - An input text.startPos - The start index of the input text.endPos - The end index of the input text.inString - A input string normalized from inText from startPos to endPoscodePointLength - The number of code points of inStringcharPositions - A map that transforms inString's code point index to code unit index.foundBreaks - A list to store the breakpoint.