Java Access to WordNet

danbikel.wordnet
Class WNWord

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

public class WNWord
extends Object
implements Serializable

Representation of a lemma that is a member of a particular synset.

See Also:
Serialized Form

Field Summary
protected  int[] frame
          The verb frames of this lemma (used only for verbs).
protected  int senseNum
          The sense number of this lemma as determined by its index entry.
protected  int synset
          The synset of the lemma-synset pair represented by this object.
protected  String syntacticMarker
          The syntactic marker of this lemma (an appendage that is optionally used only for adjectives.
protected  String word
          The lemma of the lemma-synset pair represented by this object.
 
Method Summary
 boolean equals(Object o)
          Returns true if the object o is of type WNWord and is equal to ths object.
 int[] getFrames()
          Gets the verb frames of this lemma (used only for verbs).
static String getFrameText(int i)
          Gets the verb frame gloss for the specified verb frame.
 int getSenseNum()
          Gets the sense number of this lemma as determined by its index entry.
 String getSyntacticMarker()
          Gets the syntactic marker of this lemma (an appendage that is optionally used only for adjectives.
 String getWord()
          Gets the lemma of the lemma-synset pair represented by this object.
 String getWordLC()
          Gets the lower-case version of the lemma of this object.
 int hashCode()
           
static boolean isIntransitiveFrame(int fnum)
          Returns true if the verb frame specified by fnum is intransitive, which is to say a frame for which isTransitiveFrame(int) would return false.
static boolean isTransitiveFrame(int fnum)
          Returns true if the verb frame specified by fnum is transitive.
static int maxFrameNum()
          Gets the maximum index of a verb frame.
 void setFrames(int[] frame)
          Sets the verb frames for this object (used only for verbs).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

word

protected String word
The lemma of the lemma-synset pair represented by this object.


syntacticMarker

protected String syntacticMarker
The syntactic marker of this lemma (an appendage that is optionally used only for adjectives.


senseNum

protected int senseNum
The sense number of this lemma as determined by its index entry.


synset

protected int synset
The synset of the lemma-synset pair represented by this object.


frame

protected int[] frame
The verb frames of this lemma (used only for verbs).

Method Detail

getWord

public String getWord()
Gets the lemma of the lemma-synset pair represented by this object.


getWordLC

public String getWordLC()
Gets the lower-case version of the lemma of this object.


getSyntacticMarker

public String getSyntacticMarker()
Gets the syntactic marker of this lemma (an appendage that is optionally used only for adjectives.


getSenseNum

public int getSenseNum()
Gets the sense number of this lemma as determined by its index entry.


getFrames

public int[] getFrames()
Gets the verb frames of this lemma (used only for verbs).


getFrameText

public static String getFrameText(int i)
Gets the verb frame gloss for the specified verb frame.

Parameters:
i - the index of a verb frame

maxFrameNum

public static final int maxFrameNum()
Gets the maximum index of a verb frame.


isTransitiveFrame

public static boolean isTransitiveFrame(int fnum)
Returns true if the verb frame specified by fnum is transitive. The indices of frames defined to be transitive are: 5, 6, 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 30 and 31. N.B.: Frames 24, 25 and 30 are only transitive in that they take a complement that contains a surface DP/NP with the noun in the Accusative; technically, these frames denote verbs taking sentential complements, where it is believed (by certain syntactic theories) that the subject of the embedded IP is assigned Accusative Case by the matrix verb (or a prepositional complementizer, as in I want for him to leave).


isIntransitiveFrame

public static boolean isIntransitiveFrame(int fnum)
Returns true if the verb frame specified by fnum is intransitive, which is to say a frame for which isTransitiveFrame(int) would return false.


setFrames

public void setFrames(int[] frame)
Sets the verb frames for this object (used only for verbs).


equals

public boolean equals(Object o)
Returns true if the object o is of type WNWord and is equal to ths object. Two WNWord objects are equal if they have the same word, the same syntactic makrer, the same sense number and the same synset.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Java Access to WordNet

Author: Dan Bikel