Package org.predict4all.nlp.ngram.dictionary
-
Class Summary Class Description AbstractNGramDictionary<T extends AbstractNGramTrieNode<T>> Represent an ngram dictionary in an abstract way : dictionary can be static or dynamic.
Each type of dictionary can or can't support operation, such as dictionary saving, or updating probabilities.
The dictionary has aAbstractNGramDictionary.maxOrder
that represents the max order gram that can be found in the dictionary.DynamicNGramDictionary Represent aTrainingNGramDictionary
that can also be opened to be trained again.
This type of dictionary is useful when using a dynamic user model : the dynamic user dictionary is loaded and trained during each session, and then saved to be used in the next sessions.StaticNGramTrieDictionary Represent a static ngram dictionary where trie node are loaded "on demand" while browsing through the nodes.
This dictionary is read only and cannot be updated or saved : methods likeStaticNGramTrieDictionary.updateProbabilities(double[])
,StaticNGramTrieDictionary.putAndIncrementBy(int[], int)
are not supported by this dictionary.TrainingNGramDictionary Represent a training dictionary : a ngram dictionary used while training an ngram model.
This dictionary is useful because it supports dynamic insertion and probabilities computing...