|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.ling.ValueLabel
edu.stanford.nlp.ling.StringLabel
edu.stanford.nlp.ling.Word
edu.stanford.nlp.ling.LabeledWord
public class LabeledWord
A LabeledWord object contains a word and its tag.
The value() of a TaggedWord is the Word. The tag
is, and is a Label instead of a String
| Field Summary |
|---|
| Fields inherited from class edu.stanford.nlp.ling.Word |
|---|
EMPTY, EMPTYSTRING |
| Constructor Summary | |
|---|---|
LabeledWord()
Create a new TaggedWord. |
|
LabeledWord(Label word,
Label tag)
|
|
LabeledWord(java.lang.String word)
Create a new TaggedWord. |
|
LabeledWord(java.lang.String word,
Label tag)
Create a new TaggedWord. |
|
| Method Summary | |
|---|---|
static LabelFactory |
factory()
Return a factory for this kind of label. |
LabelFactory |
labelFactory()
Return a factory for this kind of label (i.e., TaggedWord). |
void |
setTag(Label tag)
|
Label |
tag()
|
java.lang.String |
toString()
Return a string representation of the label. |
java.lang.String |
toString(java.lang.String divider)
|
| Methods inherited from class edu.stanford.nlp.ling.Word |
|---|
setWord, word |
| Methods inherited from class edu.stanford.nlp.ling.StringLabel |
|---|
beginPosition, endPosition, setBeginPosition, setEndPosition, setFromString, setValue, value |
| Methods inherited from class edu.stanford.nlp.ling.ValueLabel |
|---|
compareTo, equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LabeledWord()
TaggedWord.
It will have null for its content fields.
public LabeledWord(java.lang.String word)
TaggedWord.
word - The word, which will have a null tag
public LabeledWord(java.lang.String word,
Label tag)
TaggedWord.
word - The wordtag - The tag
public LabeledWord(Label word,
Label tag)
| Method Detail |
|---|
public Label tag()
public void setTag(Label tag)
public java.lang.String toString()
ValueLabelvalue() if it is non-null,
and the empty string otherwise.
toString in interface LabeltoString in class StringLabelpublic java.lang.String toString(java.lang.String divider)
public LabelFactory labelFactory()
TaggedWord).
The factory returned is always the same one (a singleton).
labelFactory in interface LabellabelFactory in class Wordpublic static LabelFactory factory()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||