Java Access to WordNet

danbikel.wordnet
Class WNIndexEntry

java.lang.Object
  |
  +--danbikel.wordnet.WNIndexEntry
All Implemented Interfaces:
Serializable

public class WNIndexEntry
extends Object
implements Serializable

Container of all information associated with a lemma's index entry in WordNet. Note that there are no public constructors for this class, as instances are only meant to be obtained by calling WordNet.getIndexEntry(java.lang.String, java.lang.String).

See Also:
Serialized Form

Field Summary
protected  boolean good
          Indicator of whether the parse of the line of the index file used to contruct this object was successful.
protected  int poly_cnt
          The polysemy of this lemma.
protected  String pos
          The part of speech of the lemma of this index entry.
protected  String[] ptr_types
          The pointer types from or to this lemma or its synsets.
protected  int[] synsets
          The synsets of which this lemma is a member.
protected  int tagsense_cnt
          The number of tagged senses of this lemma.
protected  String word
          The word (lemma) of this index entry.
 
Method Summary
 boolean equals(Object o)
          Returns whether the WNIndexEntry object o is equal to this object.
 int getNumSenses()
          Gets the number of synsets of which this lemma is a member.
 int getPolyCnt()
          Gets the polysemy of the lemma of this index entry.
 String getPos()
          Gets the part of speech of the lemma of this index entry.
 String[] getPtrTypes()
          Gets the pointers from or to this lemma or its synsets.
 int[] getSynsets()
          Gets the synsets of which this lemma is a member.
 String getWord()
          Gets the word (lemma) of this index entry.
 boolean good()
          Returns whether the parse of the line of the index.pos file used to construct this object was successful.
 void setSynsets(int[] synsets)
          Sets the synsets for this index entry.
 String toString()
          Returns a string representation of this index entry.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

word

protected String word
The word (lemma) of this index entry.


pos

protected String pos
The part of speech of the lemma of this index entry.


poly_cnt

protected int poly_cnt
The polysemy of this lemma.


ptr_types

protected String[] ptr_types
The pointer types from or to this lemma or its synsets.


tagsense_cnt

protected int tagsense_cnt
The number of tagged senses of this lemma.


synsets

protected int[] synsets
The synsets of which this lemma is a member.


good

protected boolean good
Indicator of whether the parse of the line of the index file used to contruct this object was successful.

Method Detail

good

public boolean good()
Returns whether the parse of the line of the index.pos file used to construct this object was successful.


getWord

public String getWord()
Gets the word (lemma) of this index entry.


getPos

public String getPos()
Gets the part of speech of the lemma of this index entry.


getPolyCnt

public int getPolyCnt()
Gets the polysemy of the lemma of this index entry.


getPtrTypes

public String[] getPtrTypes()
Gets the pointers from or to this lemma or its synsets.


getSynsets

public int[] getSynsets()
Gets the synsets of which this lemma is a member.


getNumSenses

public int getNumSenses()
Gets the number of synsets of which this lemma is a member.


setSynsets

public void setSynsets(int[] synsets)
Sets the synsets for this index entry.


toString

public String toString()
Returns a string representation of this index entry.

Overrides:
toString in class Object

equals

public boolean equals(Object o)
Returns whether the WNIndexEntry object o is equal to this object. Two WNIndexEntry objects are equal if they contain the same word and the same part of speech.

Overrides:
equals in class Object

Java Access to WordNet

Author: Dan Bikel