edu.gwu.wordnet
Class Synset

java.lang.Object
  extended byedu.gwu.wordnet.Synset
All Implemented Interfaces:
PointerTarget

public class Synset
extends java.lang.Object
implements PointerTarget

A Synset, or synonym set, represents a line of a WordNet pos.data file. A Synset represents a concept, and contains a set of Words, each of which has a sense that names that concept (and each of which is therefore synonymous with the other words in the Synset). Synset's are linked by Pointers into a network of related concepts; this is the Net in WordNet. getTarget retrieves the targets of these links, and getPointer retrieves the pointers themselves.

See Also:
Word, Pointer

Field Summary
protected  FileBackedDictionary dictionary
           
protected  java.lang.String gloss
           
protected  boolean isAdjectiveCluster
           
protected  long offset
           
protected  Pointer[] pointers
           
protected  POS pos
           
protected  Word[] words
           
 
Method Summary
protected static PointerTarget[] collectTargets(Pointer[] pointers)
           
 boolean equals(java.lang.Object object)
           
 java.lang.String getDescription()
          Return a description of the target.
 java.lang.String getGloss()
           
 java.lang.String getLongDescription()
          Return the long description of the target.
 Pointer[] getPointers()
          Return the outgoing Pointers from the target -- those Pointers that have this object as their source.
 Pointer[] getPointers(PointerType type)
          Return the outgoing Pointers of type type.
 POS getPOS()
           
 PointerTarget[] getTargets()
          Return the targets of the outgoing Pointers.
 PointerTarget[] getTargets(PointerType type)
          Return the targets of the outgoing Pointers that have type type.
 Word getWord(int index)
           
 Word[] getWords()
           
 int hashCode()
           
 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

isAdjectiveCluster

protected boolean isAdjectiveCluster

words

protected Word[] words

pointers

protected Pointer[] pointers

gloss

protected java.lang.String gloss
Method Detail

equals

public boolean equals(java.lang.Object object)

hashCode

public int hashCode()

toString

public java.lang.String toString()

getPOS

public POS getPOS()
Specified by:
getPOS in interface PointerTarget

getGloss

public java.lang.String getGloss()

getWords

public Word[] getWords()

getWord

public Word getWord(int index)

getDescription

public java.lang.String getDescription()
Description copied from interface: PointerTarget
Return a description of the target. For a Word, this is it's lemma; for a Synset, it's the concatenated lemma's of its Words.

Specified by:
getDescription in interface PointerTarget

getLongDescription

public java.lang.String getLongDescription()
Description copied from interface: PointerTarget
Return the long description of the target. This is its description, appended by, if it exists, a dash and it's gloss.

Specified by:
getLongDescription in interface PointerTarget

collectTargets

protected static PointerTarget[] collectTargets(Pointer[] pointers)

getPointers

public Pointer[] getPointers()
Description copied from interface: PointerTarget
Return the outgoing Pointers from the target -- those Pointers that have this object as their source.

Specified by:
getPointers in interface PointerTarget

getPointers

public Pointer[] getPointers(PointerType type)
Description copied from interface: PointerTarget
Return the outgoing Pointers of type type.

Specified by:
getPointers in interface PointerTarget

getTargets

public PointerTarget[] getTargets()
Description copied from interface: PointerTarget
Return the targets of the outgoing Pointers.

Specified by:
getTargets in interface PointerTarget

getTargets

public PointerTarget[] getTargets(PointerType type)
Description copied from interface: PointerTarget
Return the targets of the outgoing Pointers that have type type.

Specified by:
getTargets in interface PointerTarget