|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.nlp.trees.AbstractLabel | +--edu.stanford.nlp.trees.StringLabel | +--edu.stanford.nlp.trees.Word | +--edu.stanford.nlp.trees.TaggedWord | +--edu.stanford.nlp.trees.WeightedFollowedTaggedWord
A WeightedFollowedTaggedWord
object contains a word and its
tag, but it also records what text follows the token. This can be
used to reconstruct the original source text. It also stores a
weight for the token, so that one can do token feature weighting.
The value()
of a TaggedWord is the Word. The tag
and other attributes are secondary.
Field Summary |
Fields inherited from class edu.stanford.nlp.trees.Word |
EMPTY, EMPTYSTRING |
Constructor Summary | |
WeightedFollowedTaggedWord()
|
|
WeightedFollowedTaggedWord(Label oldLabel)
|
|
WeightedFollowedTaggedWord(Label word,
Label tag)
|
|
WeightedFollowedTaggedWord(String word)
|
|
WeightedFollowedTaggedWord(String word,
String tag)
|
|
WeightedFollowedTaggedWord(String word,
String tag,
String follow,
double weight)
|
Method Summary | |
String |
follow()
Return the follow value of the label (or null if none). |
LabelFactory |
labelFactory()
Returns a factory that makes WeightedFollowedTaggedWords |
void |
setFollow(String follow)
Set the follow value for the label (if one is stored). |
void |
setWeight(double weight)
Set the weight of this thing |
String |
toString()
Return a string representation of the label. |
double |
weight()
Return the weight of this thing |
Methods inherited from class edu.stanford.nlp.trees.TaggedWord |
factory, setFromString, setTag, tag |
Methods inherited from class edu.stanford.nlp.trees.Word |
setWord, word |
Methods inherited from class edu.stanford.nlp.trees.StringLabel |
setValue, value |
Methods inherited from class edu.stanford.nlp.trees.AbstractLabel |
compareTo, equals, hashCode |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public WeightedFollowedTaggedWord()
public WeightedFollowedTaggedWord(String word)
public WeightedFollowedTaggedWord(String word, String tag)
public WeightedFollowedTaggedWord(String word, String tag, String follow, double weight)
public WeightedFollowedTaggedWord(Label oldLabel)
public WeightedFollowedTaggedWord(Label word, Label tag)
Method Detail |
public String follow()
HasFollow
follow
in interface HasFollow
public void setFollow(String follow)
HasFollow
setFollow
in interface HasFollow
follow
- The follow value for the labelpublic double weight()
Weighted
weight
in interface Weighted
public void setWeight(double weight)
Weighted
setWeight
in interface Weighted
weight
- the weightpublic String toString()
AbstractLabel
value()
if it is non-null
,
and the empty string otherwise.
toString
in interface Label
toString
in class TaggedWord
public LabelFactory labelFactory()
labelFactory
in interface Label
labelFactory
in class TaggedWord
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |