@Test public void testTokenProbMinScore() throws Exception { Sequence[] preds = chunker.topKSequences(toks1, tags1, -5.55); Assert.assertEquals(4, preds.length); Assert.assertEquals(expect1.length, preds[0].getProbs().length); Assert.assertEquals(Arrays.asList(expect1), preds[0].getOutcomes()); Assert.assertNotSame(Arrays.asList(expect1), preds[1].getOutcomes()); }
public Sequence[] topKSequences(String[] sentence, String[] tags) { TokenTag[] tuples = TokenTag.create(sentence, tags); return model.bestSequences(DEFAULT_BEAM_SIZE, tuples, new Object[] { }, contextGenerator, sequenceValidator); }
ChunkerME implements Chunker { public Sequence[] topKSequences(String[] sentence, String[] tags) { TokenTag[] tuples = TokenTag.create(sentence, tags); return model.bestSequences(DEFAULT_BEAM_SIZE, tuples, new Object[] { }, contextGenerator, sequenceValidator); } }
ChunkerME implements Chunker { public Sequence[] topKSequences(String[] sentence, String[] tags) { TokenTag[] tuples = TokenTag.create(sentence, tags); return model.bestSequences(DEFAULT_BEAM_SIZE, tuples, new Object[] { }, contextGenerator, sequenceValidator); } @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 Sequence[] topKSequences(String[] sentence, String[] tags) { TokenTag[] tuples = TokenTag.create(sentence, tags); return model.bestSequences(DEFAULT_BEAM_SIZE, tuples, new Object[] { }, contextGenerator, sequenceValidator); } @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 Sequence[] topKSequences(String[] sentence, String[] tags) { TokenTag[] tuples = TokenTag.create(sentence, tags); return model.bestSequences(DEFAULT_BEAM_SIZE, tuples, new Object[] { }, contextGenerator, sequenceValidator); } @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; }