Package opennlp.tools.ml.model
Interface SequenceClassificationModel<T>
-
- Type Parameters:
T
-
- All Known Implementing Classes:
BeamSearch
public interface SequenceClassificationModel<T>
A classification model that can label an input sequence.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Sequence
bestSequence(T[] sequence, Object[] additionalContext, BeamSearchContextGenerator<T> cg, SequenceValidator<T> validator)
Finds the sequence with the highest probability.Sequence[]
bestSequences(int numSequences, T[] sequence, Object[] additionalContext, double minSequenceScore, BeamSearchContextGenerator<T> cg, SequenceValidator<T> validator)
Finds the n most probable sequences.Sequence[]
bestSequences(int numSequences, T[] sequence, Object[] additionalContext, BeamSearchContextGenerator<T> cg, SequenceValidator<T> validator)
Finds the n most probable sequences.String[]
getOutcomes()
Returns all possible outcomes.
-
-
-
Method Detail
-
bestSequence
Sequence bestSequence(T[] sequence, Object[] additionalContext, BeamSearchContextGenerator<T> cg, SequenceValidator<T> validator)
Finds the sequence with the highest probability.- Parameters:
sequence
-additionalContext
-cg
-validator
-- Returns:
-
bestSequences
Sequence[] bestSequences(int numSequences, T[] sequence, Object[] additionalContext, double minSequenceScore, BeamSearchContextGenerator<T> cg, SequenceValidator<T> validator)
Finds the n most probable sequences.- Parameters:
sequence
-additionalContext
-cg
-validator
-- Returns:
-
bestSequences
Sequence[] bestSequences(int numSequences, T[] sequence, Object[] additionalContext, BeamSearchContextGenerator<T> cg, SequenceValidator<T> validator)
Finds the n most probable sequences.- Parameters:
sequence
-additionalContext
-cg
-validator
-- Returns:
-
getOutcomes
String[] getOutcomes()
Returns all possible outcomes.- Returns:
-
-