edu.brandeis.cs.steele.wn
Class Word

java.lang.Object
  extended by edu.brandeis.cs.steele.wn.Word
All Implemented Interfaces:
PointerTarget

public class Word
extends java.lang.Object
implements PointerTarget

A Word represents the lexical information related to a specific sense of an IndexWord. Word's are linked by Pointers into a network of lexically related words. getTarget retrieves the targets of these links, and parsePointer retrieves the pointers themselves.

Author:
Oliver Steele, steele@cs.brandeis.edu
See Also:
Pointer, Synset

Field Summary
static int ATTRIBUTIVE
           
protected  int flags
           
static int IMMEDIATE_POSTNOMINAL
           
protected  int index
           
protected  java.lang.String lemma
           
static int NONE
           
static int PREDICATIVE
           
protected  Synset synset
           
protected  long verbFrameFlags
           
 
Constructor Summary
Word(Synset synset, int index, java.lang.String lemma, int flags)
           
 
Method Summary
 boolean equals(java.lang.Object object)
           
 java.lang.String getDescription()
          Return a description of the target.
 long getFlags()
           
 int getIndex()
           
 java.lang.String getLemma()
           
 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.
 java.util.List<Pointer> getPointersList()
          Return the outgoing Pointers from the target -- those Pointers that have this object as their source.
 java.util.List<Pointer> getPointersList(PointerType type)
          Return the outgoing Pointers of type type.
 POS getPOS()
           
 Synset getSynset()
           
 PointerTarget[] getTargets()
          Return the targets of the outgoing Pointers.
 PointerTarget[] getTargets(PointerType type)
          Return the targets of the outgoing Pointers that have type type.
 java.util.List<PointerTarget> getTargetsList()
          Return the targets of the outgoing Pointers.
 java.util.List<PointerTarget> getTargetsList(PointerType type)
          Return the targets of the outgoing Pointers that have type type.
 long getVerbFrameFlags()
           
 int hashCode()
           
protected  Pointer[] restrictPointers(Pointer[] source)
           
protected  java.util.List<Pointer> restrictPointersList(java.util.List<Pointer> source)
           
(package private)  void setVerbFrameFlag(int fnum)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
See Also:
Constant Field Values

PREDICATIVE

public static final int PREDICATIVE
See Also:
Constant Field Values

ATTRIBUTIVE

public static final int ATTRIBUTIVE
See Also:
Constant Field Values

IMMEDIATE_POSTNOMINAL

public static final int IMMEDIATE_POSTNOMINAL
See Also:
Constant Field Values

synset

protected Synset synset

index

protected int index

lemma

protected java.lang.String lemma

flags

protected int flags

verbFrameFlags

protected long verbFrameFlags
Constructor Detail

Word

public Word(Synset synset,
            int index,
            java.lang.String lemma,
            int flags)
Method Detail

setVerbFrameFlag

void setVerbFrameFlag(int fnum)

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

getSynset

public Synset getSynset()

getPOS

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

getIndex

public int getIndex()

getLemma

public java.lang.String getLemma()

getFlags

public long getFlags()

getVerbFrameFlags

public long getVerbFrameFlags()

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

restrictPointers

protected Pointer[] restrictPointers(Pointer[] source)

restrictPointersList

protected java.util.List<Pointer> restrictPointersList(java.util.List<Pointer> source)

getPointersList

public java.util.List<Pointer> getPointersList()
Description copied from interface: PointerTarget
Return the outgoing Pointers from the target -- those Pointers that have this object as their source.

Specified by:
getPointersList in interface PointerTarget

getPointersList

public java.util.List<Pointer> getPointersList(PointerType type)
Description copied from interface: PointerTarget
Return the outgoing Pointers of type type.

Specified by:
getPointersList in interface PointerTarget

getTargetsList

public java.util.List<PointerTarget> getTargetsList()
Description copied from interface: PointerTarget
Return the targets of the outgoing Pointers.

Specified by:
getTargetsList in interface PointerTarget

getTargetsList

public java.util.List<PointerTarget> getTargetsList(PointerType type)
Description copied from interface: PointerTarget
Return the targets of the outgoing Pointers that have type type.

Specified by:
getTargetsList in interface PointerTarget

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