List of usage examples for opennlp.tools.ngram NGramModel numberOfGrams
public int numberOfGrams()
From source file:opennlp.tools.ngram.NGramModelTest.java
@Test public void testNumberOfGrams() throws Exception { NGramModel ngramModel = new NGramModel(); StringList tokens = new StringList("the", "bro", "wn"); ngramModel.add(tokens, 1, 3);//from www . j ava2s.c om Assert.assertEquals(6, ngramModel.numberOfGrams()); }