edu.brandeis.cs.steele.wn
Class IndexWord

java.lang.Object
  extended by edu.brandeis.cs.steele.wn.IndexWord

public class IndexWord
extends java.lang.Object

An IndexWord represents a line of the pos.index file. An IndexWord is created retrieved or retrieved via DictionaryDatabase.lookupIndexWord(edu.brandeis.cs.steele.wn.POS, java.lang.String), and has a lemma, a pos, and a set of senses, which are of type Synset.

Author:
Oliver Steele, steele@cs.brandeis.edu

Field Summary
protected  FileBackedDictionary dictionary
           
protected  java.lang.String lemma
           
protected  long offset
           
protected  POS pos
           
protected  PointerType[] ptrTypes
           
protected  long[] synsetOffsets
           
protected  Synset[] synsets
          This is null until getSenses has been called.
protected  int taggedSenseCount
           
 
Constructor Summary
IndexWord(FileBackedDictionary dictionary)
           
 
Method Summary
 boolean equals(java.lang.Object object)
           
 java.lang.String getLemma()
          Return the word's lemma.
 PointerType[] getPointerTypes()
          The pointer types available for this indexed word.
 POS getPOS()
           
 Synset[] getSenses()
           
 int getTaggedSenseCount()
           
 int hashCode()
           
(package private)  IndexWord initializeFrom(java.lang.String line)
           
(package private) static IndexWord parseIndexWord(FileBackedDictionary dictionary, java.lang.String line)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

dictionary

protected FileBackedDictionary dictionary

pos

protected POS pos

offset

protected long offset

lemma

protected java.lang.String lemma

taggedSenseCount

protected int taggedSenseCount

synsetOffsets

protected long[] synsetOffsets

synsets

protected Synset[] synsets
This is null until getSenses has been called.


ptrTypes

protected PointerType[] ptrTypes
Constructor Detail

IndexWord

IndexWord(FileBackedDictionary dictionary)
Method Detail

initializeFrom

IndexWord initializeFrom(java.lang.String line)

parseIndexWord

static IndexWord parseIndexWord(FileBackedDictionary dictionary,
                                java.lang.String line)

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPOS

public POS getPOS()

getPointerTypes

public PointerType[] getPointerTypes()
The pointer types available for this indexed word. May not apply to all senses of the word.


getLemma

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


getTaggedSenseCount

public int getTaggedSenseCount()

getSenses

public Synset[] getSenses()