Additional top-level class in compilation unit: ModelIndex.
| Modifier and Type | Field and Description |
|---|---|
| private UnicodeSet | |
| private UnicodeSet | |
| private List | |
| private int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public | MlBreakEngine(UnicodeSet
An unicode set with the digit and open punctuation
and alphabet. digitOrOpenPunctuationOrAlphabetSet, UnicodeSet An unicode set with the close punctuation. closePunctuationSet)Constructor for Chinese and Japanese phrase breaking. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The number of breakpointsAn input text. inText, int The start index of the input text. startPos, int The end index of the input text. endPos, CharacterIterator A input string normalized from inText from startPos to endPos inString, int The number of code points of inString codePointLength, int[] A map that transforms inString's code point index to code unit index. charPositions, DictionaryBreakEngine.A list to store the breakpoint. foundBreaksDivide up a range of characters handled by this break engine. |
| private void | evaluateBreakpoint(String
An input string to be segmented. inputStr, int[] A code unit index list of the inputStr. indexList, int The start index of the indexList. startIdx, int The current code unit boundary of the indexList. numCodeUnits, ArrayList<Integer> A list including the index of the breakpoint. boundary)Evaluate whether the breakpointIdx is a potential breakpoint. |
| private int | Returns: The number of the code units of the first six characters in inString.An input string to be segmented. inString, int[] A code unit index list of the inString. indexList, int The number of code points of the input string codePointLength)Initialize the index list from the input string. |
| private void | initKeyValue(UResourceBundle
A RedouceBundle corresponding to the model file. rb, String The kay name in the model file. keyName, String The value name in the model file. valueName, HashMap<String, Integer> A HashMap to store the pairs of the feature and its score. map)In the machine learning's model file, specify the name of the key and value to load the corresponding feature and its score. |
| private void | |
| private String |
| fClosePunctuationSet | back to summary |
|---|---|
| private UnicodeSet fClosePunctuationSet | |
| fDigitOrOpenPunctuationOrAlphabetSet | back to summary |
|---|---|
| private UnicodeSet fDigitOrOpenPunctuationOrAlphabetSet | |
| fModel | back to summary |
|---|---|
| private List<HashMap<String, Integer>> fModel | |
| fNegativeSum | back to summary |
|---|---|
| private int fNegativeSum | |
| MAX_FEATURE | back to summary |
|---|---|
| private static final int MAX_FEATURE | |
| MlBreakEngine | back to summary |
|---|---|
| public MlBreakEngine(UnicodeSet digitOrOpenPunctuationOrAlphabetSet, UnicodeSet closePunctuationSet) Constructor for Chinese and Japanese phrase breaking.
| |
| divideUpRange | back to summary |
|---|---|
| public int divideUpRange(CharacterIterator inText, int startPos, int endPos, CharacterIterator inString, int codePointLength, int[] charPositions, DictionaryBreakEngine. Divide up a range of characters handled by this break engine.
| |
| evaluateBreakpoint | back to summary |
|---|---|
| private void evaluateBreakpoint(String inputStr, int[] indexList, int startIdx, int numCodeUnits, ArrayList<Integer> boundary) Evaluate whether the breakpointIdx is a potential breakpoint. | |
| initIndexList | back to summary |
|---|---|
| private int initIndexList(CharacterIterator inString, int[] indexList, int codePointLength) Initialize the index list from the input string.
| |
| initKeyValue | back to summary |
|---|---|
| private void initKeyValue(UResourceBundle rb, String keyName, String valueName, HashMap<String, Integer> map) In the machine learning's model file, specify the name of the key and value to load the corresponding feature and its score. | |
| loadMLModel | back to summary |
|---|---|
| private void loadMLModel() Load the machine learning's model file. | |
| transform | back to summary |
|---|---|
| private String transform(CharacterIterator inString) Transform a CharacterIterator into a String. | |