net.didion.jwnl.data
Class IndexWord

java.lang.Object
  extended bynet.didion.jwnl.data.IndexWord
All Implemented Interfaces:
DictionaryElement, java.io.Serializable

public class IndexWord
extends java.lang.Object
implements DictionaryElement

An IndexWord represents a line of the pos.index file. An IndexWord is created or retrieved via lookupIndexWord.

See Also:
Serialized Form

Constructor Summary
IndexWord(java.lang.String lemma, POS pos, long[] synsetOffsets)
           
 
Method Summary
 boolean equals(java.lang.Object object)
           
 java.lang.Object getKey()
          Get a key that can be used to index this element.
 java.lang.String getLemma()
          Return the word's lemma.
 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()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexWord

public IndexWord(java.lang.String lemma,
                 POS pos,
                 long[] synsetOffsets)
Method Detail

getType

public DictionaryElementType getType()
Description copied from interface: DictionaryElement
Get the element's type.

Specified by:
getType in interface DictionaryElement

equals

public boolean equals(java.lang.Object object)

hashCode

public int hashCode()

toString

public java.lang.String toString()

getPOS

public POS getPOS()
Get the word's part-of-speech.


getLemma

public java.lang.String getLemma()
Return the word's lemma. Its lemma is its orthographic representation, for example "dog" or "get up".


getSynsetOffsets

public long[] getSynsetOffsets()

getKey

public java.lang.Object getKey()
Description copied from interface: DictionaryElement
Get a key that can be used to index this element.

Specified by:
getKey in interface DictionaryElement

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



JWNL homepage.