Package net.didion.jwnl.data
Class Word
- java.lang.Object
-
- net.didion.jwnl.data.PointerTarget
-
- net.didion.jwnl.data.Word
-
- All Implemented Interfaces:
Serializable
public class Word extends PointerTarget
AWord
represents the lexical information related to a specific sense of anIndexWord
.Word
's are linked byPointer
s into a network of lexically related words.getTargets
retrieves the targets of these links, andgetPointers
retrieves the pointers themselves.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
lexId
The lexicographer id that identifies this lemma.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
Two words are equal if their parent Synsets are equal and they have the same indexint
getIndex()
Gets the index of this word.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 wordPOS
getPOS()
Gets the part of speech of this word.Synset
getSynset()
Gets the synset associated with this word.int
hashCode()
void
setLexId(int lexId)
String
toString()
-
Methods inherited from class net.didion.jwnl.data.PointerTarget
getPointers, getTargets, getTargets
-
-
-
-
Method Detail
-
getLexId
public int getLexId()
-
setLexId
public void setLexId(int lexId)
-
equals
public boolean equals(Object object)
Two words are equal if their parent Synsets are equal and they have the same index- Overrides:
equals
in classPointerTarget
-
toString
public String toString()
- Specified by:
toString
in classPointerTarget
-
getSynset
public Synset getSynset()
Gets the synset associated with this word.- Returns:
- synset
-
getPOS
public POS 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
public String getLemma()
Gets the lemma of this word.- Returns:
- lemma
-
getPointers
public Pointer[] getPointers()
returns all the pointers of the synset that contains this word whose source is this word- Specified by:
getPointers
in classPointerTarget
-
-