Package net.didion.jwnl.data
Class Word
java.lang.Object
net.didion.jwnl.data.PointerTarget
net.didion.jwnl.data.Word
- All Implemented Interfaces:
Serializable
A
Word
represents the lexical information related to a specific sense of an IndexWord
.
Word
's are linked by Pointer
s into a network of lexically related words.
getTargets
retrieves the targets of these links, and
getPointers
retrieves the pointers themselves.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private int
This word's index within the synset.private String
The string representation of the word.private Synset
The Synset to which this word belongs.protected int
The lexicographer id that identifies this lemma.private static final long
The serialization id. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Two words are equal if their parent Synsets are equal and they have the same indexint
getIndex()
Gets the index of this word.getLemma()
Gets the lemma of this word.int
getLexId()
Pointer[]
returns all the pointers of the synset that contains this word whose source is this wordgetPOS()
Gets the part of speech of this word.Gets the synset associated with this word.int
hashCode()
void
setLexId
(int lexId) toString()
Methods inherited from class net.didion.jwnl.data.PointerTarget
getPointers, getTargets, getTargets
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDThe serialization id.- See Also:
-
_synset
The Synset to which this word belongs. -
_index
private int _indexThis word's index within the synset. -
_lemma
The string representation of the word. -
lexId
protected int lexIdThe lexicographer id that identifies this lemma. -
_cachedToString
-
-
Constructor Details
-
Word
Constructs a word tied to a synset, it's position within the synset, and the lemma.- Parameters:
synset
- - the synset this word is contained inindex
- - the position of the word in the synset (usage)lemma
- - the lemma of this word
-
-
Method Details
-
getLexId
public int getLexId() -
setLexId
public void setLexId(int lexId) -
equals
Two words are equal if their parent Synsets are equal and they have the same index- Overrides:
equals
in classPointerTarget
-
hashCode
public int hashCode() -
toString
- Specified by:
toString
in classPointerTarget
-
getSynset
Gets the synset associated with this word.- Returns:
- synset
-
getPOS
Gets the part of speech of this word.- Specified by:
getPOS
in classPointerTarget
- Returns:
- part of speech
-
getIndex
public int getIndex()Gets the index of this word.- Returns:
- index
-
getLemma
Gets the lemma of this word.- Returns:
- lemma
-
getPointers
returns all the pointers of the synset that contains this word whose source is this word- Specified by:
getPointers
in classPointerTarget
-