public class Word extends PointerTarget
Word represents the lexical information related to a specific sense of an IndexWord.
Word's are linked by Pointers into a network of lexically related words.
getTargets retrieves the targets of these links, and
getPointers retrieves the pointers themselves.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
_cachedToString |
private int |
_index
This word's index within the synset.
|
private java.lang.String |
_lemma
The string representation of the word.
|
private Synset |
_synset
The Synset to which this word belongs.
|
protected int |
lexId
The lexicographer id that identifies this lemma.
|
private static long |
serialVersionUID
The serialization id.
|
| Constructor and Description |
|---|
Word(Synset synset,
int index,
java.lang.String lemma)
Constructs a word tied to a synset, it's position within the synset, and the lemma.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
Two words are equal if their parent Synsets are equal and they have the same index
|
int |
getIndex()
Gets the index of this word.
|
java.lang.String |
getLemma()
Gets the lemma of this word.
|
int |
getLexId() |
Pointer[] |
getPointers()
returns all the pointers of the synset that contains this word whose source is this word
|
POS |
getPOS()
Gets the part of speech of this word.
|
Synset |
getSynset()
Gets the synset associated with this word.
|
int |
hashCode() |
void |
setLexId(int lexId) |
java.lang.String |
toString() |
getPointers, getTargets, getTargetsprivate static final long serialVersionUID
private Synset _synset
private int _index
private java.lang.String _lemma
protected int lexId
private transient java.lang.String _cachedToString
public Word(Synset synset, int index, java.lang.String lemma)
synset - - the synset this word is contained inindex - - the position of the word in the synset (usage)lemma - - the lemma of this wordpublic int getLexId()
public void setLexId(int lexId)
public boolean equals(java.lang.Object object)
equals in class PointerTargetpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class PointerTargetpublic Synset getSynset()
public POS getPOS()
getPOS in class PointerTargetpublic int getIndex()
public java.lang.String getLemma()
public Pointer[] getPointers()
getPointers in class PointerTarget