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
AWordrepresents the lexical information related to a specific sense of anIndexWord.Word's are linked byPointers into a network of lexically related words.getTargetsretrieves the targets of these links, andgetPointersretrieves the pointers themselves.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intlexIdThe lexicographer id that identifies this lemma.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)Two words are equal if their parent Synsets are equal and they have the same indexintgetIndex()Gets the index of this word.StringgetLemma()Gets the lemma of this word.intgetLexId()Pointer[]getPointers()returns all the pointers of the synset that contains this word whose source is this wordPOSgetPOS()Gets the part of speech of this word.SynsetgetSynset()Gets the synset associated with this word.inthashCode()voidsetLexId(int lexId)StringtoString()-
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:
equalsin classPointerTarget
-
toString
public String toString()
- Specified by:
toStringin 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:
getPOSin 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:
getPointersin classPointerTarget
-
-