Example usage for Java opennlp.tools.ngram NGramModel fields, constructors, methods, implement or subclass
The text is from its open source code.
NGramModel() Initializes an empty instance. |
void | add(StringList ngram) Adds one NGram, if it already exists the count increase by one. |
void | add(StringList ngram, int minLength, int maxLength) Adds NGrams up to the specified length to the current instance. |
void | add(CharSequence chars, int minLength, int maxLength) Adds character NGrams to the current instance. |
boolean | contains(StringList tokens) Checks fit he given tokens are contained by the current instance. |
void | cutoff(int cutoffUnder, int cutoffOver) Deletes all ngram which do appear less than the cutoffUnder value and more often than the cutoffOver value. |
int | getCount(StringList ngram) Retrieves the count of the given ngram. |
int | numberOfGrams() Retrieves the total count of all Ngrams. |
void | remove(StringList tokens) Removes the specified tokens form the NGram model, they are just dropped. |
void | serialize(OutputStream out) Writes the ngram instance to the given OutputStream . |
int | size() Retrieves the number of StringList entries in the current instance. |
Dictionary | toDictionary() Creates a dictionary which contain all StringList which are in the current NGramModel . |
Dictionary | toDictionary(boolean caseSensitive) Creates a dictionary which contains all StringList s which are in the current NGramModel . |