public class IndexWord extends BaseDictionaryElement
IndexWord represents a line of the pos.index file.
An IndexWord is created or retrieved via lookupIndexWord.dictionary| Modifier | Constructor and Description |
|---|---|
protected |
IndexWord(Dictionary dictionary,
java.lang.String lemma,
POS pos) |
|
IndexWord(Dictionary dictionary,
java.lang.String lemma,
POS pos,
long[] synsetOffsets) |
|
IndexWord(Dictionary dictionary,
java.lang.String lemma,
POS pos,
Synset synset) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
Returns true if the lemma and the part of speech both match.
|
java.lang.Object |
getKey()
Returns the lemma of this word.
|
java.lang.String |
getLemma()
Return the word's lemma.
|
POS |
getPOS()
Returns the word's part-of-speech.
|
java.util.List<Synset> |
getSenses()
Returns the senses of this word.
|
long[] |
getSynsetOffsets() |
DictionaryElementType |
getType()
Returns the element's type.
|
int |
hashCode() |
int |
sortSenses()
Sorts senses according to their use count.
|
java.lang.String |
toString() |
getDictionary, setDictionaryprotected IndexWord(Dictionary dictionary, java.lang.String lemma, POS pos) throws JWNLException
JWNLExceptionpublic IndexWord(Dictionary dictionary, java.lang.String lemma, POS pos, Synset synset) throws JWNLException
JWNLExceptionpublic IndexWord(Dictionary dictionary, java.lang.String lemma, POS pos, long[] synsetOffsets) throws JWNLException
JWNLExceptionpublic DictionaryElementType getType()
DictionaryElementpublic java.lang.Object getKey()
public POS getPOS()
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getLemma()
"dog" or "get up".public long[] getSynsetOffsets()
public java.util.List<Synset> getSenses()
public int sortSenses()