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