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.


Field Summary
 
Fields inherited from class edu.stanford.nlp.trees.Word
EMPTY, EMPTYSTRING
 
Constructor Summary
TypedTaggedWord()
           
TypedTaggedWord(Label oldLabel)
           
TypedTaggedWord(String word)
           
TypedTaggedWord(String word, int type)
           
TypedTaggedWord(String word, String tag, int type)
           
 
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).
 
Methods inherited from class edu.stanford.nlp.trees.TaggedWord
factory, labelFactory, 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

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)
Method Detail

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