public class IndexWord extends Object implements DictionaryElement
IndexWord
represents a line of the pos.index
file.
An IndexWord
is created or retrieved via lookupIndexWord
.Constructor and Description |
---|
IndexWord(String lemma,
POS pos,
long[] synsetOffsets) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object)
Returns true if the lemma and the part of speech both match.
|
Object |
getKey()
Gets the lemma of this word.
|
String |
getLemma()
Return the word's
|
POS |
getPOS()
Get the word's part-of-speech.
|
Synset |
getSense(int index)
Get a particular sense of this word.
|
int |
getSenseCount()
Get the word's sense count.
|
Synset[] |
getSenses()
Get an array of all the senses of this word.
|
long[] |
getSynsetOffsets() |
DictionaryElementType |
getType()
Get the element's type.
|
int |
hashCode() |
String |
toString() |
public DictionaryElementType getType()
DictionaryElement
getType
in interface DictionaryElement
public boolean equals(Object object)
public POS getPOS()
public String getLemma()
"dog"
or "get up"
.public long[] getSynsetOffsets()
public Object getKey()
getKey
in interface DictionaryElement
public int getSenseCount()
public Synset[] getSenses() throws JWNLException
JWNLException
public Synset getSense(int index) throws JWNLException
JWNLException
Copyright © 2023. All rights reserved.