Package opennlp.tools.namefind
Class BioCodec
java.lang.Object
opennlp.tools.namefind.BioCodec
- All Implemented Interfaces:
SequenceCodec<String>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
areOutcomesCompatible
(String[] outcomes) Checks if the outcomes of the model are compatible with the codec.Creates a sequence validator which can validate a sequence of outcomes.Span[]
Decodes a sequence T objects into Span objects.String[]
Encodes Span objects into a sequence of T objects.
-
Field Details
-
START
- See Also:
-
CONTINUE
- See Also:
-
OTHER
- See Also:
-
-
Constructor Details
-
BioCodec
public BioCodec()
-
-
Method Details
-
decode
Description copied from interface:SequenceCodec
Decodes a sequence T objects into Span objects.- Specified by:
decode
in interfaceSequenceCodec<String>
- Parameters:
c
-- Returns:
-
encode
Description copied from interface:SequenceCodec
Encodes Span objects into a sequence of T objects.- Specified by:
encode
in interfaceSequenceCodec<String>
- Parameters:
names
-length
-- Returns:
-
createSequenceValidator
Description copied from interface:SequenceCodec
Creates a sequence validator which can validate a sequence of outcomes.- Specified by:
createSequenceValidator
in interfaceSequenceCodec<String>
- Returns:
-
areOutcomesCompatible
Description copied from interface:SequenceCodec
Checks if the outcomes of the model are compatible with the codec.- Specified by:
areOutcomesCompatible
in interfaceSequenceCodec<String>
- Parameters:
outcomes
- all possible model outcomes- Returns:
-