ChunkerME implements Chunker { @Deprecated public Sequence[] topKSequences(List<String> sentence, List<String> tags) { return topKSequences(sentence.toArray(new String[sentence.size()]), tags.toArray(new String[tags.size()])); } ChunkerME(ChunkerModel model, int beamSize, SequenceValidator<String> sequenceValidator,
      ChunkerContextGenerator contextGenerator);  ChunkerME(ChunkerModel model, int beamSize,
      SequenceValidator<String> sequenceValidator);  ChunkerME(ChunkerModel model, int beamSize);  ChunkerME(ChunkerModel model); @Deprecated  ChunkerME(MaxentModel mod); @Deprecated  ChunkerME(MaxentModel mod, ChunkerContextGenerator cg); @Deprecated  ChunkerME(MaxentModel mod, ChunkerContextGenerator cg, int beamSize); @Deprecated List<String> chunk(List<String> toks, List<String> tags); String[] chunk(String[] toks, String[] tags); Span[] chunkAsSpans(String[] toks, String[] tags); @Deprecated Sequence[] topKSequences(List<String> sentence, List<String> tags); Sequence[] topKSequences(String[] sentence, String[] tags); Sequence[] topKSequences(String[] sentence, String[] tags, double minSequenceScore); void probs(double[] probs); double[] probs(); static ChunkerModel train(String lang, ObjectStream<ChunkSample> in,
      TrainingParameters mlParams, ChunkerFactory factory); static ChunkerModel train(String lang, ObjectStream<ChunkSample> in, 
      ChunkerContextGenerator contextGenerator, TrainingParameters mlParams); static ChunkerModel train(String lang, ObjectStream<ChunkSample> in, 
      int cutoff, int iterations, ChunkerContextGenerator contextGenerator); @Deprecated static ChunkerModel train(String lang, ObjectStream<ChunkSample> in, int cutoff, int iterations); static final int DEFAULT_BEAM_SIZE; }
@Test public void testTokenProbList() throws Exception { @SuppressWarnings("deprecation") Sequence[] preds = chunker.topKSequences(Arrays.asList(toks1), Arrays.asList(tags1)); assertTrue(preds.length > 0); assertEquals(expect1.length, preds[0].getProbs().length); assertEquals(Arrays.asList(expect1), preds[0].getOutcomes()); assertNotSame(Arrays.asList(expect1), preds[1].getOutcomes()); }
@Test public void testTokenProbArray() throws Exception { Sequence[] preds = chunker.topKSequences(toks1, tags1); assertTrue(preds.length > 0); assertEquals(expect1.length, preds[0].getProbs().length); assertEquals(Arrays.asList(expect1), preds[0].getOutcomes()); assertNotSame(Arrays.asList(expect1), preds[1].getOutcomes()); }
@Test public void testTokenProbMinScore() throws Exception { Sequence[] preds = chunker.topKSequences(toks1, tags1, -5.55); assertTrue(preds.length == 4); assertEquals(expect1.length, preds[0].getProbs().length); assertEquals(Arrays.asList(expect1), preds[0].getOutcomes()); assertNotSame(Arrays.asList(expect1), preds[1].getOutcomes()); }