|
||||||||||
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.grmm.learning.GenericAcrfData2TokenSequence
public class GenericAcrfData2TokenSequence
Generic pipe that takes a linegroup of the form:
LABEL1 LABEL2 ... LABELk word feature1 feature2 ... featurenand converts it into an input FeatureVectorSequence and target LabelsSequence.
If the number of labels at each sequence position could vary, then use this format instead:
LABEL1 LABEL2 ... LABELk ---- word feature1 feature2 ... featurenThe four dashes ---- must be there to separate the features from the labels. Whitespace is ignored. The difference between this pipe and
edu.umass.cs.iesl.casutton.experiments.dcrf.GenericDcrfPipe
is that this pipe
allows for a different number of labels at each sequence position.
Explicitly specifying which word is the token allows the use of the HTML output from the extract package. Created: Aug 22, 2005
Constructor Summary | |
---|---|
GenericAcrfData2TokenSequence()
|
|
GenericAcrfData2TokenSequence(int numLabels)
|
Method Summary | |
---|---|
boolean |
getFeaturesIncludeToken()
|
LabelAlphabet |
getLabelAlphabet(int lvl)
|
boolean |
isLabelsAtEnd()
|
int |
numLevels()
|
Instance |
pipe(Instance carrier)
Really this should be 'protected', but isn't for historical reasons. |
void |
setFeaturesIncludeToken(boolean featuresIncludeToken)
If true, then the first feature in the list is considered to be the token's text. |
void |
setIncludeTokenText(boolean includeTokenText)
|
void |
setLabelsAtEnd(boolean labelsAtEnd)
|
void |
setTextFeaturePrefix(java.lang.String textFeaturePrefix)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenericAcrfData2TokenSequence()
public GenericAcrfData2TokenSequence(int numLabels)
Method Detail |
---|
public void setIncludeTokenText(boolean includeTokenText)
public void setFeaturesIncludeToken(boolean featuresIncludeToken)
featuresIncludeToken
- public boolean getFeaturesIncludeToken()
public void setTextFeaturePrefix(java.lang.String textFeaturePrefix)
public LabelAlphabet getLabelAlphabet(int lvl)
public int numLevels()
public Instance pipe(Instance carrier)
Pipe
pipe
in class Pipe
public boolean isLabelsAtEnd()
public void setLabelsAtEnd(boolean labelsAtEnd)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |