Java Access to WordNet

danbikel.wordnet
Class WNPointer

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

public class WNPointer
extends Object
implements Serializable

Container of all information about a pointer in the WordNet database.

See Also:
Serialized Form

Field Summary
static String alsoSee
          A pointer type of the same name.
static String antonym
          A pointer type of the same name.
static String attribute
          A pointer type of the same name.
static String cause
          A pointer type of the same name.
static String derivedFromAdjective
          A pointer type of the same name.
static String entailment
          A pointer type of the same name.
static String hypernym
          A pointer type of the same name.
static String hyponym
          A pointer type of the same name.
static String memberHolonym
          A pointer type of the same name.
static String memberMeronym
          A pointer type of the same name.
static String partHolonym
          A pointer type of the same name.
static String participle
          A pointer type of the same name.
static String partMeronym
          A pointer type of the same name.
static String pertainym
          A pointer type of the same name.
protected  String pos
          The part of speech of the source and target of this pointer.
static String similarTo
          A pointer type of the same name.
protected  short sourceWord
          The source word of this pointer.
static String substanceHolonym
          A pointer type of the same name.
static String substanceMeronym
          A pointer type of the same name.
protected  int synset
          The source synset of this pointer.
protected  int targetSynset
          The target synset of this pointer.
protected  short targetWord
          The target word of this pointer.
protected  String type
          The type of this pointer.
static String verbGroup
          A pointer type of the same name.
 
Method Summary
 boolean equals(Object o)
          Returns true if the object o is of type WNPointer and if it is equal to this object.
static String getCanonical(String ptr, int posIdx)
           
static String getCanonical(String ptr, String pos)
           
 String getPos()
          Gets the part of speech of the source and target of this pointer.
 int getSourceWordIdx()
          Gets the index of the source word of this pointer, or 0 if this pointer has the entire source synset as its source.
 int getSynset()
          Gets the source synset of this pointer.
 int getTargetSynset()
          Gets the target synset of this pointer.
 int getTargetWordIdx()
          Gets the index of the target word of this pointer, or 0 if this poitner has the entire target synset as its target.
 String getType()
          Gets the type of this pointer.
 int hashCode()
           
 boolean isChildPointer()
          Returns true if this pointer is a hyponym.
 boolean isLexicalRelation()
          Returns true if either the source of the target of this pointer is a lemma, making this pointer a lexical relation, in WordNet parlance.
 boolean isParentPointer()
          Returns true if this pointer is a hypernym.
 boolean isSemanticRelation()
          Returns true if this pointer's source is the entire source synset and if this pointer's target is the entire target synset, making this a semantic relation, in WordNet parlance.
 String toString()
          Returns a string representation of this pointer.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

antonym

public static final String antonym
A pointer type of the same name.

See Also:
Constant Field Values

hypernym

public static final String hypernym
A pointer type of the same name.

See Also:
Constant Field Values

hyponym

public static final String hyponym
A pointer type of the same name.

See Also:
Constant Field Values

memberMeronym

public static final String memberMeronym
A pointer type of the same name.

See Also:
Constant Field Values

substanceMeronym

public static final String substanceMeronym
A pointer type of the same name.

See Also:
Constant Field Values

partMeronym

public static final String partMeronym
A pointer type of the same name.

See Also:
Constant Field Values

memberHolonym

public static final String memberHolonym
A pointer type of the same name.

See Also:
Constant Field Values

substanceHolonym

public static final String substanceHolonym
A pointer type of the same name.

See Also:
Constant Field Values

partHolonym

public static final String partHolonym
A pointer type of the same name.

See Also:
Constant Field Values

attribute

public static final String attribute
A pointer type of the same name.

See Also:
Constant Field Values

entailment

public static final String entailment
A pointer type of the same name.

See Also:
Constant Field Values

cause

public static final String cause
A pointer type of the same name.

See Also:
Constant Field Values

alsoSee

public static final String alsoSee
A pointer type of the same name.

See Also:
Constant Field Values

verbGroup

public static final String verbGroup
A pointer type of the same name.

See Also:
Constant Field Values

similarTo

public static final String similarTo
A pointer type of the same name.

See Also:
Constant Field Values

participle

public static final String participle
A pointer type of the same name.

See Also:
Constant Field Values

pertainym

public static final String pertainym
A pointer type of the same name.

See Also:
Constant Field Values

derivedFromAdjective

public static final String derivedFromAdjective
A pointer type of the same name.

See Also:
Constant Field Values

synset

protected int synset
The source synset of this pointer.


pos

protected String pos
The part of speech of the source and target of this pointer.


type

protected String type
The type of this pointer.


targetSynset

protected int targetSynset
The target synset of this pointer.


sourceWord

protected short sourceWord
The source word of this pointer. A value of 0 means the entire synset is the source.


targetWord

protected short targetWord
The target word of this pointer. A value of 0 means the entire synset is the target.

Method Detail

getCanonical

public static final String getCanonical(String ptr,
                                        String pos)

getCanonical

public static final String getCanonical(String ptr,
                                        int posIdx)

getSynset

public int getSynset()
Gets the source synset of this pointer.


getTargetSynset

public int getTargetSynset()
Gets the target synset of this pointer.


getPos

public String getPos()
Gets the part of speech of the source and target of this pointer.


getType

public String getType()
Gets the type of this pointer.


getSourceWordIdx

public int getSourceWordIdx()
Gets the index of the source word of this pointer, or 0 if this pointer has the entire source synset as its source.


getTargetWordIdx

public int getTargetWordIdx()
Gets the index of the target word of this pointer, or 0 if this poitner has the entire target synset as its target.


isSemanticRelation

public boolean isSemanticRelation()
Returns true if this pointer's source is the entire source synset and if this pointer's target is the entire target synset, making this a semantic relation, in WordNet parlance.


isLexicalRelation

public boolean isLexicalRelation()
Returns true if either the source of the target of this pointer is a lemma, making this pointer a lexical relation, in WordNet parlance.


isChildPointer

public boolean isChildPointer()
Returns true if this pointer is a hyponym.


isParentPointer

public boolean isParentPointer()
Returns true if this pointer is a hypernym.


toString

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

Overrides:
toString in class Object

equals

public boolean equals(Object o)
Returns true if the object o is of type WNPointer and if it is equal to this object. Two WNPointer objects are equal if they have the same synset, the same part of speech, the same type, the same target synset the same source word and the same target word.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Java Access to WordNet

Author: Dan Bikel