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