|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cc.mallet.pipe.Pipe cc.mallet.pipe.SimpleTaggerSentence2TokenSequence
public class SimpleTaggerSentence2TokenSequence
Converts an external encoding of a sequence of elements with binary
features to a TokenSequence
. If target processing
is on (training or labeled test data), it extracts element labels
from the external encoding to create a target LabelSequence
.
Two external encodings are supported:
String
containing lines of whitespace-separated tokens.String
[][]
.
Field Summary | |
---|---|
protected boolean |
setTokensAsFeatures
|
Constructor Summary | |
---|---|
SimpleTaggerSentence2TokenSequence()
Creates a new SimpleTaggerSentence2TokenSequence instance. |
|
SimpleTaggerSentence2TokenSequence(boolean inc)
creates a new SimpleTaggerSentence2TokenSequence instance
which includes tokens as features iff the supplied argument is true. |
Method Summary | |
---|---|
protected java.lang.String |
makeText(java.lang.String[] in)
returns the first String in the array or "" if the array has length 0. |
protected java.lang.String[][] |
parseSentence(java.lang.String sentence)
Parses a string representing a sequence of rows of tokens into an array of arrays of tokens. |
Instance |
pipe(Instance carrier)
Takes an instance with data of type String or String[][] and creates an Instance of type TokenSequence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean setTokensAsFeatures
Constructor Detail |
---|
public SimpleTaggerSentence2TokenSequence()
SimpleTaggerSentence2TokenSequence
instance.
By default we include tokens as features.
public SimpleTaggerSentence2TokenSequence(boolean inc)
SimpleTaggerSentence2TokenSequence
instance
which includes tokens as features iff the supplied argument is true.
Method Detail |
---|
protected java.lang.String[][] parseSentence(java.lang.String sentence)
sentence
- a String
protected java.lang.String makeText(java.lang.String[] in)
public Instance pipe(Instance carrier)
pipe
in class Pipe
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |