Package net.didion.jwnl.data
Class IndexWord
- java.lang.Object
-
- net.didion.jwnl.data.IndexWord
-
- All Implemented Interfaces:
Serializable,DictionaryElement
public class IndexWord extends Object implements DictionaryElement
AnIndexWordrepresents a line of the pos.indexfile. AnIndexWordis created or retrieved vialookupIndexWord.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)Returns true if the lemma and the part of speech both match.ObjectgetKey()Gets the lemma of this word.StringgetLemma()Return the word'slemma .POSgetPOS()Get the word's part-of-speech.SynsetgetSense(int index)Get a particular sense of this word.intgetSenseCount()Get the word's sense count.Synset[]getSenses()Get an array of all the senses of this word.long[]getSynsetOffsets()DictionaryElementTypegetType()Get the element's type.inthashCode()StringtoString()
-
-
-
Method Detail
-
getType
public DictionaryElementType getType()
Description copied from interface:DictionaryElementGet the element's type.- Specified by:
getTypein interfaceDictionaryElement
-
equals
public boolean equals(Object object)
Returns true if the lemma and the part of speech both match.
-
getPOS
public POS getPOS()
Get the word's part-of-speech.
-
getLemma
public String getLemma()
Return the word'slemma . Its lemma is its orthographic representation, for example"dog"or"get up".
-
getSynsetOffsets
public long[] getSynsetOffsets()
-
getKey
public Object getKey()
Gets the lemma of this word.- Specified by:
getKeyin interfaceDictionaryElement- Returns:
- lemma
-
getSenseCount
public int getSenseCount()
Get the word's sense count.
-
getSenses
public Synset[] getSenses() throws JWNLException
Get an array of all the senses of this word.- Throws:
JWNLException
-
getSense
public Synset getSense(int index) throws JWNLException
Get a particular sense of this word. Sense indices start at 1.- Throws:
JWNLException
-
-