Package opennlp.tools.namefind
Class BilouCodec
- java.lang.Object
-
- opennlp.tools.namefind.BilouCodec
-
- All Implemented Interfaces:
SequenceCodec<String>
public class BilouCodec extends Object implements SequenceCodec<String>
-
-
Constructor Summary
Constructors Constructor Description BilouCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanareOutcomesCompatible(String[] outcomes)B requires CL or L C requires BL L requires B O requires any valid combo/unit U requires noneSequenceValidator<String>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
-
LAST
public static final String LAST
- See Also:
- Constant Field Values
-
UNIT
public static final String UNIT
- 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:SequenceCodecDecodes a sequence T objects into Span objects.- Specified by:
decodein interfaceSequenceCodec<String>- Returns:
-
encode
public String[] encode(Span[] names, int length)
Description copied from interface:SequenceCodecEncodes Span objects into a sequence of T objects.- Specified by:
encodein interfaceSequenceCodec<String>- Returns:
-
createSequenceValidator
public SequenceValidator<String> createSequenceValidator()
Description copied from interface:SequenceCodecCreates a sequence validator which can validate a sequence of outcomes.- Specified by:
createSequenceValidatorin interfaceSequenceCodec<String>- Returns:
-
areOutcomesCompatible
public boolean areOutcomesCompatible(String[] outcomes)
B requires CL or L C requires BL L requires B O requires any valid combo/unit U requires none- Specified by:
areOutcomesCompatiblein interfaceSequenceCodec<String>- Parameters:
outcomes- all possible model outcomes- Returns:
- true, if model outcomes are compatible
-
-