Package opennlp.tools.util
Interface SequenceCodec<T>
- Type Parameters:
- T- The generic type for the elements to handle.
- All Known Implementing Classes:
- BilouCodec,- BioCodec
public interface SequenceCodec<T>
A codec for sequences of type 
SequenceCodec.
 Defines methods to en- or decode, and validate.- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionbooleanareOutcomesCompatible(String[] outcomes) Checks if theoutcomesof a model are compatible with thisSequenceCodec.Span[]T[]
- 
Field Details- 
DEFAULT_PREFIX- See Also:
 
 
- 
- 
Method Details- 
decode- Parameters:
- c- A list of- SequenceCodecto decode.
- Returns:
- A Spanarray encapsulating the decoded elements inc.
 
- 
encode- Parameters:
- names- A list of- elementsto encode.
- length- The length to respect.
- Returns:
- An array of SequenceCodecto encode.
 
- 
createSequenceValidatorSequenceValidator<T> createSequenceValidator()- Returns:
- A SequenceValidatorwhich can validate a sequence ofoutcomes.
 
- 
areOutcomesCompatibleChecks if theoutcomesof a model are compatible with thisSequenceCodec.- Parameters:
- outcomes- The possible model outcomes.
- Returns:
- trueif- outcomesare type compatible,- falseotherwise.
 
 
-