public class BioCodec extends Object implements SequenceLabelerCodec<String>
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTINUE |
static String |
OTHER |
static String |
START |
| Constructor and Description |
|---|
BioCodec() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areOutcomesCompatible(String[] outcomes)
Checks if the outcomes of the model are compatible with the codec.
|
SequenceLabelerSequenceValidator |
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[] sequences,
int length)
Encodes Span objects into a sequence of T objects.
|
static String |
extractSequenceType(String outcome) |
public static final String START
public static final String CONTINUE
public static final String OTHER
public Span[] decode(List<String> c)
SequenceLabelerCodecdecode in interface SequenceLabelerCodec<String>c - the sequence of objectspublic String[] encode(Span[] sequences, int length)
SequenceLabelerCodecencode in interface SequenceLabelerCodec<String>sequences - the sequenceslength - the lengthpublic SequenceLabelerSequenceValidator createSequenceValidator()
SequenceLabelerCodeccreateSequenceValidator in interface SequenceLabelerCodec<String>public boolean areOutcomesCompatible(String[] outcomes)
SequenceLabelerCodecareOutcomesCompatible in interface SequenceLabelerCodec<String>outcomes - all possible model outcomesCopyright © 2016 IXA pipes. All rights reserved.