Java opennlp.tools.ngram NGramModel fields, constructors, methods, implement or subclass

Example usage for Java opennlp.tools.ngram NGramModel fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for opennlp.tools.ngram NGramModel.

The text is from its open source code.

Constructor

NGramModel()
Initializes an empty instance.

Method

voidadd(StringList ngram)
Adds one NGram, if it already exists the count increase by one.
voidadd(StringList ngram, int minLength, int maxLength)
Adds NGrams up to the specified length to the current instance.
voidadd(CharSequence chars, int minLength, int maxLength)
Adds character NGrams to the current instance.
booleancontains(StringList tokens)
Checks fit he given tokens are contained by the current instance.
voidcutoff(int cutoffUnder, int cutoffOver)
Deletes all ngram which do appear less than the cutoffUnder value and more often than the cutoffOver value.
intgetCount(StringList ngram)
Retrieves the count of the given ngram.
intnumberOfGrams()
Retrieves the total count of all Ngrams.
voidremove(StringList tokens)
Removes the specified tokens form the NGram model, they are just dropped.
voidserialize(OutputStream out)
Writes the ngram instance to the given OutputStream .
intsize()
Retrieves the number of StringList entries in the current instance.
DictionarytoDictionary()
Creates a dictionary which contain all StringList which are in the current NGramModel .
DictionarytoDictionary(boolean caseSensitive)
Creates a dictionary which contains all StringList s which are in the current NGramModel .