Package opennlp.tools.tokenize.lattice
package opennlp.tools.tokenize.lattice
-
ClassDescriptionThe
char.defcode point to category mappings over the Unicode code point range.Collectschar.defmappings in file order and builds aCategoryTable, giving a later mapping precedence over an earlier one that covers the same code point, which is what direct indexing does for the BMP.One mapping line retained for validation after all categories have been read.The categories assigned to one code point, stored both in mapping order and as a mask over the dictionary's dense category ids.The lexicon as a double-array trie: one transition is one array read and one comparison.Builds the trie from sorted surface ranges.A surface range with children waiting to be placed.Dictionary-driven segmentation for languages written without spaces: a Viterbi search over the word lattice of aMecabDictionary, minimizing the sum of word costs and connection costs.One lattice node: a candidate morpheme with its best path cost so far.An immutable, in-memory dictionary in the MeCab directory format: lexicon entries from the*.csvfiles, connection costs frommatrix.def, character categories fromchar.def, and unknown-word templates fromunk.def, loaded from a user-supplied dictionary directory.One character category's unknown-word behavior fromchar.def.Receives one common-prefix match duringMecabDictionary.prefixMatches(java.lang.String, int, int, opennlp.tools.tokenize.lattice.MecabDictionary.PrefixMatchConsumer).One lexicon or unknown-word entry.Fetches and unpacks a MeCab-format dictionary archive into a local directory, so the dictionary is acquired by the user at install time and never ships with this library.One morpheme from lattice segmentation: theSpanit covers in the original text, its surface form, and the feature columns its dictionary entry carries.Frequency-driven segmentation for Chinese and similar scripts: a Viterbi search that maximizes the summed log-probability of the words in a user-supplied frequency lexicon, with unlisted characters falling back to single-character words.One immutable trie node: children are a sorted character array with a parallel node array, found by binary search, so a descent avoids boxing aCharacter.One mutable trie node during construction, copied into aUnigramSegmenter.WordTrie.One pending post-order traversal step.Splits a text into the maximal stretches that contain no whitespace, as judged byStringUtil.isWhitespace(char).Receives one whitespace-free stretch of a text.