Package opennlp.tools.namefind
Class BioCodec
- java.lang.Object
-
- opennlp.tools.namefind.BioCodec
-
- All Implemented Interfaces:
SequenceCodec<String>
public class BioCodec extends Object implements SequenceCodec<String>
-
-
Constructor Summary
Constructors Constructor Description BioCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
areOutcomesCompatible(String[] outcomes)
Checks if the outcomes of the model are compatible with the codec.NameFinderSequenceValidator
createSequenceValidator()
Creates a sequence validator which can validate a sequence of outcomes.Span[]
decode(List<String> c)
Decodes a sequence T objects into Span objects.String[]
encode(Span[] names, int length)
Encodes Span objects into a sequence of T objects.
-
-
-
Field Detail
-
START
public static final String START
- See Also:
- Constant Field Values
-
CONTINUE
public static final String CONTINUE
- See Also:
- Constant Field Values
-
OTHER
public static final String OTHER
- See Also:
- Constant Field Values
-
-
Method Detail
-
decode
public Span[] decode(List<String> c)
Description copied from interface:SequenceCodec
Decodes a sequence T objects into Span objects.- Specified by:
decode
in interfaceSequenceCodec<String>
- Returns:
-
encode
public String[] encode(Span[] names, int length)
Description copied from interface:SequenceCodec
Encodes Span objects into a sequence of T objects.- Specified by:
encode
in interfaceSequenceCodec<String>
- Returns:
-
createSequenceValidator
public NameFinderSequenceValidator 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
public boolean areOutcomesCompatible(String[] outcomes)
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:
-
-