edu.stanford.nlp.parser.lexparser
Class IntTaggedWord
java.lang.Object
edu.stanford.nlp.parser.lexparser.IntTaggedWord
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<IntTaggedWord>
public class IntTaggedWord
- extends java.lang.Object
- implements java.io.Serializable, java.lang.Comparable<IntTaggedWord>
Represents a WordTag (in the sense that equality is defined
on both components), where each half is represented by an
int indexed by a Numberer. In this representation, -1 is
used to represent the wildcard ANY value, and -2 is used
to represent a STOP value (i.e., no more dependents).
- Author:
- Dan Klein, Christopher Manning
- See Also:
- Serialized Form
Constructor Summary |
IntTaggedWord(int word,
int tag)
|
IntTaggedWord(java.lang.String s,
char splitChar)
Creates an IntTaggedWord given by the String representation
of the form <word>|<tag*gt; |
IntTaggedWord(java.lang.String wordString,
java.lang.String tagString)
Creates an IntTaggedWord given by the tagString and wordString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ANY_WORD_INT
public static final int ANY_WORD_INT
- See Also:
- Constant Field Values
ANY_TAG_INT
public static final int ANY_TAG_INT
- See Also:
- Constant Field Values
STOP_WORD_INT
public static final int STOP_WORD_INT
- See Also:
- Constant Field Values
STOP_TAG_INT
public static final int STOP_TAG_INT
- See Also:
- Constant Field Values
ANY
public static final java.lang.String ANY
- See Also:
- Constant Field Values
STOP
public static final java.lang.String STOP
- See Also:
- Constant Field Values
word
public int word
tag
public short tag
IntTaggedWord
public IntTaggedWord(int word,
int tag)
IntTaggedWord
public IntTaggedWord(java.lang.String s,
char splitChar)
- Creates an IntTaggedWord given by the String representation
of the form <word>|<tag*gt;
IntTaggedWord
public IntTaggedWord(java.lang.String wordString,
java.lang.String tagString)
- Creates an IntTaggedWord given by the tagString and wordString
setWordNumberer
public static void setWordNumberer(Numberer wordNumberer)
setTagNumberer
public static void setTagNumberer(Numberer tagNumberer)
tag
public int tag()
word
public int word()
wordString
public java.lang.String wordString()
tagString
public java.lang.String tagString()
tagLabel
public Label tagLabel()
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
compareTo
public int compareTo(IntTaggedWord that)
- Specified by:
compareTo
in interface java.lang.Comparable<IntTaggedWord>
toLexicalEntry
public java.lang.String toLexicalEntry()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
toString
public java.lang.String toString(java.lang.String arg)
toTaggedWord
public TaggedWord toTaggedWord()
Stanford NLP Group