@Test public void testChunkAsArray() throws Exception { String[] preds = chunker.chunk(toks1, tags1); Assert.assertArrayEquals(expect1, preds); }
public String[] chunk(String[] toks, String[] tags) { TokenTag[] tuples = TokenTag.create(toks, tags); bestSequence = model.bestSequence(tuples, new Object[] {}, contextGenerator, sequenceValidator); List<String> c = bestSequence.getOutcomes(); return c.toArray(new String[c.size()]); }
ChunkerME implements Chunker { public String[] chunk(String[] toks, String[] tags) { TokenTag[] tuples = TokenTag.create(toks, tags); bestSequence = model.bestSequence(tuples, new Object[] {}, contextGenerator, sequenceValidator); List<String> c = bestSequence.getOutcomes(); return c.toArray(new String[c.size()]); } }
ChunkerME implements Chunker { public String[] chunk(String[] toks, String[] tags) { TokenTag[] tuples = TokenTag.create(toks, tags); bestSequence = model.bestSequence(tuples, new Object[] {}, contextGenerator, sequenceValidator); List<String> c = bestSequence.getOutcomes(); return c.toArray(new String[c.size()]); } @Deprecated private  ChunkerME(ChunkerModel model, int beamSize, SequenceValidator<TokenTag> sequenceValidator,
      ChunkerContextGenerator contextGenerator); @Deprecated private  ChunkerME(ChunkerModel model, int beamSize);  ChunkerME(ChunkerModel model); }
ChunkerME implements Chunker { public String[] chunk(String[] toks, String[] tags) { TokenTag[] tuples = TokenTag.create(toks, tags); bestSequence = model.bestSequence(tuples, new Object[] {}, contextGenerator, sequenceValidator); List<String> c = bestSequence.getOutcomes(); return c.toArray(new String[c.size()]); } @Deprecated private  ChunkerME(ChunkerModel model, int beamSize, SequenceValidator<TokenTag> sequenceValidator,
      ChunkerContextGenerator contextGenerator); @Deprecated private  ChunkerME(ChunkerModel model, int beamSize);  ChunkerME(ChunkerModel model); String[] chunk(String[] toks, String[] tags); Span[] chunkAsSpans(String[] toks, 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); }
ChunkerME implements Chunker { public String[] chunk(String[] toks, String[] tags) { TokenTag[] tuples = TokenTag.create(toks, tags); bestSequence = model.bestSequence(tuples, new Object[] {}, contextGenerator, sequenceValidator); List<String> c = bestSequence.getOutcomes(); return c.toArray(new String[c.size()]); } @Deprecated private  ChunkerME(ChunkerModel model, int beamSize, SequenceValidator<TokenTag> sequenceValidator,
      ChunkerContextGenerator contextGenerator); @Deprecated private  ChunkerME(ChunkerModel model, int beamSize);  ChunkerME(ChunkerModel model); String[] chunk(String[] toks, String[] tags); Span[] chunkAsSpans(String[] toks, 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 final int DEFAULT_BEAM_SIZE; }