Package cc.mallet.pipe.tsf
Class Target2BIOFormat
- java.lang.Object
-
- cc.mallet.pipe.Pipe
-
- cc.mallet.pipe.tsf.Target2BIOFormat
-
- All Implemented Interfaces:
AlphabetCarrying
,java.io.Serializable
public class Target2BIOFormat extends Pipe implements java.io.Serializable
Creates aLabelSequence
out of aTokenSequence
that is the target of anInstance
. Labels are constructed out of each Token in the TokenSequence to conform with BIO format (Begin, Inside, Outside of Segment). Prepends a "B-" to Tokens that leave a background state and an "I-" to tags that have the same label as the previous Token. NOTE: This class assumes that subsequent identical tags belong to the same Segment. This means that you cannot have B B I, only B I I.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Target2BIOFormat()
Target2BIOFormat(java.lang.String background)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instance
pipe(Instance carrier)
Really this should be 'protected', but isn't for historical reasons.-
Methods inherited from class cc.mallet.pipe.Pipe
alphabetsMatch, getAlphabet, getAlphabets, getDataAlphabet, getInstanceId, getTargetAlphabet, instanceFrom, instancesFrom, instancesFrom, isDataAlphabetSet, isTargetProcessing, newIteratorFrom, preceedingPipeDataAlphabetNotification, preceedingPipeTargetAlphabetNotification, precondition, readResolve, setDataAlphabet, setOrCheckDataAlphabet, setOrCheckTargetAlphabet, setTargetAlphabet, setTargetProcessing
-
-