@Test(expected = InvalidFormatException.class) public void testFromInvalidFileMissingCount() throws Exception { InputStream stream = getClass().getResourceAsStream("/opennlp/tools/ngram/ngram-model-no-count.xml"); NGramModel ngramModel = new NGramModel(stream); stream.close(); ngramModel.toDictionary(true); }
public Dictionary toDictionary() { return toDictionary(false); }
NGramModel implements Iterable<StringList> { public Dictionary toDictionary() { return toDictionary(false); } }
NGramModel implements Iterable<StringList> { public Dictionary toDictionary() { return toDictionary(false); } NGramModel();  NGramModel(InputStream in); }
NGramModel implements Iterable<StringList> { public Dictionary toDictionary() { return toDictionary(false); } NGramModel();  NGramModel(InputStream in); int getCount(StringList ngram); void setCount(StringList ngram, int count); void add(StringList ngram); void add(StringList ngram, int minLength, int maxLength); void add(CharSequence chars, int minLength, int maxLength); void remove(StringList tokens); boolean contains(StringList tokens); int size(); @Override Iterator<StringList> iterator(); int numberOfGrams(); void cutoff(int cutoffUnder, int cutoffOver); Dictionary toDictionary(); Dictionary toDictionary(boolean caseSensitive); void serialize(OutputStream out); @Override boolean equals(Object obj); @Override String toString(); @Override int hashCode(); }
NGramModel implements Iterable<StringList> { public Dictionary toDictionary() { return toDictionary(false); } NGramModel();  NGramModel(InputStream in); int getCount(StringList ngram); void setCount(StringList ngram, int count); void add(StringList ngram); void add(StringList ngram, int minLength, int maxLength); void add(CharSequence chars, int minLength, int maxLength); void remove(StringList tokens); boolean contains(StringList tokens); int size(); @Override Iterator<StringList> iterator(); int numberOfGrams(); void cutoff(int cutoffUnder, int cutoffOver); Dictionary toDictionary(); Dictionary toDictionary(boolean caseSensitive); void serialize(OutputStream out); @Override boolean equals(Object obj); @Override String toString(); @Override int hashCode();  }