edu.stanford.nlp.parser.lexparser
Class IntTaggedWord
java.lang.Object
edu.stanford.nlp.parser.lexparser.IntTaggedWord
- All Implemented Interfaces:
- Serializable, Comparable<IntTaggedWord>
public class IntTaggedWord
- extends Object
- implements Serializable, 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(String s,
char splitChar)
Creates an IntTaggedWord given by the String representation
of the form <word>|<tag*gt; |
IntTaggedWord(String wordString,
String tagString)
Creates an IntTaggedWord given by the tagString and wordString |
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 String ANY
- See Also:
- Constant Field Values
STOP
public static final 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(String s,
char splitChar)
- Creates an IntTaggedWord given by the String representation
of the form <word>|<tag*gt;
IntTaggedWord
public IntTaggedWord(String wordString,
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 String wordString()
tagString
public String tagString()
tagLabel
public Label tagLabel()
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
compareTo
public int compareTo(IntTaggedWord that)
- Specified by:
compareTo
in interface Comparable<IntTaggedWord>
toLexicalEntry
public String toLexicalEntry()
toString
public String toString()
- Overrides:
toString
in class Object
toString
public String toString(String arg)
toTaggedWord
public TaggedWord toTaggedWord()
Stanford NLP Group