POSTaggerME implements POSTagger { @Deprecated public List<String> tag(List<String> sentence) { bestSequence = beam.bestSequence(sentence.toArray(new String[sentence.size()]), null); return bestSequence.getOutcomes(); } 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 testPOSTagger() throws IOException { POSModel posModel = trainPOSModel(ModelType.MAXENT); POSTagger tagger = new POSTaggerME(posModel); String tags[] = tagger.tag(new String[] { "The", "driver", "got", "badly", "injured", "."}); assertEquals(6, tags.length); assertEquals("DT", tags[0]); assertEquals("NN", tags[1]); assertEquals("VBD", tags[2]); assertEquals("RB", tags[3]); assertEquals("VBN", tags[4]); assertEquals(".", tags[5]); }