Package opennlp.tools.ml.model
Interface SequenceClassificationModel<T>
- Type Parameters:
T
- The type of the object which is the source.
- All Known Implementing Classes:
BeamSearch
public interface SequenceClassificationModel<T>
A classification model that can label an input
Sequence
.-
Method Summary
Modifier and TypeMethodDescriptionbestSequence
(T[] sequence, Object[] additionalContext, BeamSearchContextGenerator<T> cg, SequenceValidator<T> validator) Finds theSequence
with the highest probability.Sequence[]
bestSequences
(int numSequences, T[] sequence, Object[] additionalContext, double minSequenceScore, BeamSearchContextGenerator<T> cg, SequenceValidator<T> validator) Finds the n most probablesequences
with the highest probability.Sequence[]
bestSequences
(int numSequences, T[] sequence, Object[] additionalContext, BeamSearchContextGenerator<T> cg, SequenceValidator<T> validator) Finds the n most probablesequences
with the highest probability.String[]
-
Method Details
-
bestSequence
Sequence bestSequence(T[] sequence, Object[] additionalContext, BeamSearchContextGenerator<T> cg, SequenceValidator<T> validator) Finds theSequence
with the highest probability.- Parameters:
sequence
- Thesequence
used as input.additionalContext
- An array that provides additional information (context).cg
- TheBeamSearchContextGenerator
to use.validator
- TheSequenceValidator
to validate with.- Returns:
- The
Sequence
with the highest probability.
-
bestSequences
Sequence[] bestSequences(int numSequences, T[] sequence, Object[] additionalContext, double minSequenceScore, BeamSearchContextGenerator<T> cg, SequenceValidator<T> validator) Finds the n most probablesequences
with the highest probability.- Parameters:
numSequences
- The number of sequences to compute.sequence
- Thesequence
used as input.additionalContext
- An array that provides additional information (context).minSequenceScore
- The minimum score to achieve.cg
- TheBeamSearchContextGenerator
to use.validator
- TheSequenceValidator
to validate with.- Returns:
- The
sequences
with the highest probability.
-
bestSequences
Sequence[] bestSequences(int numSequences, T[] sequence, Object[] additionalContext, BeamSearchContextGenerator<T> cg, SequenceValidator<T> validator) Finds the n most probablesequences
with the highest probability.- Parameters:
numSequences
- The number of sequences to compute.sequence
- Thesequence
used as input.additionalContext
- An array that provides additional information (context).cg
- TheBeamSearchContextGenerator
to use.validator
- TheSequenceValidator
to validate with.- Returns:
- The
sequences
with the highest probability.
-
getOutcomes
String[] getOutcomes()- Returns:
- Retrieves all possible outcomes.
-