POSTaggerME implements POSTagger { public static Dictionary buildNGramDictionary(ObjectStream<POSSample> samples, int cutoff) throws IOException { NGramModel ngramModel = new NGramModel(); POSSample sample; while((sample = samples.read()) != null) { String[] words = sample.getSentence(); if (words.length > 0) ngramModel.add(new StringList(words), 1, 1); } ngramModel.cutoff(cutoff, Integer.MAX_VALUE); return ngramModel.toDictionary(true); } POSTaggerME(POSModel model, int beamSize, int cacheSize, SequenceValidator<String> sequenceValidator);  POSTaggerME(POSModel model, int beamSize, int cacheSize);  POSTaggerME(POSModel model); @Deprecated  POSTaggerME(AbstractModel model, TagDictionary tagdict); @Deprecated  POSTaggerME(AbstractModel model, Dictionary dict); @Deprecated  POSTaggerME(AbstractModel model, Dictionary dict, TagDictionary tagdict); @Deprecated  POSTaggerME(AbstractModel model, POSContextGenerator cg); @Deprecated  POSTaggerME(AbstractModel model, POSContextGenerator cg, TagDictionary tagdict); @Deprecated  POSTaggerME(int beamSize, AbstractModel model, POSContextGenerator cg, TagDictionary tagdict); int getNumTags(); @Deprecated List<String> tag(List<String> sentence); String[] tag(String[] sentence); String[] tag(String[] sentence, Object[] additionaContext); String[][] tag(int numTaggings, String[] sentence); @Deprecated Sequence[] topKSequences(List<String> sentence); Sequence[] topKSequences(String[] sentence); Sequence[] topKSequences(String[] sentence, Object[] additionaContext); void probs(double[] probs); double[] probs(); @Deprecated String tag(String sentence); String[] getOrderedTags(List<String> words, List<String> tags, int index); String[] getOrderedTags(List<String> words, List<String> tags, int index,double[] tprobs); static POSModel train(String languageCode,
      ObjectStream<POSSample> samples, TrainingParameters trainParams,
      POSTaggerFactory posFactory); static POSModel train(String languageCode, ObjectStream<POSSample> samples, TrainingParameters trainParams, 
      POSDictionary tagDictionary, Dictionary ngramDictionary); @Deprecated static POSModel train(String languageCode, ObjectStream<POSSample> samples, ModelType modelType, POSDictionary tagDictionary,
      Dictionary ngramDictionary, int cutoff, int iterations); static Dictionary buildNGramDictionary(ObjectStream<POSSample> samples, int cutoff); static void populatePOSDictionary(ObjectStream<POSSample> samples,
      MutableTagDictionary dict, int cutoff); static final int DEFAULT_BEAM_SIZE; }
@Test public void testBuildNGramDictionary() throws IOException { ObjectStream<POSSample> samples = createSampleStream(); POSTaggerME.buildNGramDictionary(samples, 0); }