ChunkerME implements Chunker { public Span[] chunkAsSpans(String[] toks, String[] tags) { String[] preds = chunk(toks, tags); return ChunkSample.phrasesAsSpanList(toks, tags, preds); } 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 testChunkAsSpan() throws Exception { Span[] preds = chunker.chunkAsSpans(toks1, tags1); System.out.println(Arrays.toString(preds)); assertEquals(10, preds.length); assertEquals(new Span(0, 1, "NP"), preds[0]); assertEquals(new Span(1, 2, "VP"), preds[1]); assertEquals(new Span(2, 4, "NP"), preds[2]); assertEquals(new Span(4, 5, "VP"), preds[3]); assertEquals(new Span(5, 6, "SBAR"), preds[4]); assertEquals(new Span(6, 7, "NP"), preds[5]); assertEquals(new Span(7, 9, "VP"), preds[6]); assertEquals(new Span(9, 13, "NP"), preds[7]); assertEquals(new Span(13, 14, "PP"), preds[8]); assertEquals(new Span(14, 16, "NP"), preds[9]); }