edu.stanford.nlp.ie.hmm
Class TypedTaggedWord
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.ie.hmm.TypedTaggedWord
- All Implemented Interfaces:
- Comparable, HasTag, HasType, HasWord, Label
- public class TypedTaggedWord
- extends TaggedWord
- implements HasType
A TypedTaggedWord
object contains a word, it's tag, and it's type.
The value()
of a TypedTaggedWord is its Word. The tag and type are
secondary.
Method Summary |
void |
setType(int type)
Set the type value for the label (if one is stored). |
String |
toString()
Returns a String representing this TypedTaggedWord of the form "word/tag (type)". |
int |
type()
Return the type value of the label (or null if none). |
TypedTaggedWord
public TypedTaggedWord()
TypedTaggedWord
public TypedTaggedWord(Label oldLabel)
TypedTaggedWord
public TypedTaggedWord(String word)
TypedTaggedWord
public TypedTaggedWord(String word,
int type)
TypedTaggedWord
public TypedTaggedWord(String word,
String tag,
int type)
type
public int type()
- Description copied from interface:
HasType
- Return the type value of the label (or null if none).
- Specified by:
type
in interface HasType
- Returns:
- int the type value for the label
setType
public void setType(int type)
- Description copied from interface:
HasType
- Set the type value for the label (if one is stored).
- Specified by:
setType
in interface HasType
- Parameters:
type
- The type value for the label
toString
public String toString()
- Returns a String representing this TypedTaggedWord of the form "word/tag (type)".
- Specified by:
toString
in interface Label
- Overrides:
toString
in class TaggedWord
- Returns:
- the string representation
Stanford NLP Group