edu.brandeis.cs.steele.wn
Class POS

java.lang.Object
  extended by edu.brandeis.cs.steele.wn.POS

public class POS
extends java.lang.Object

Instances of this class enumerate the possible major syntactic categories, or part's of speech. Each POS has a human-readable label that can be used to print it, and a key by which it can be looked up.

Author:
Oliver Steele, steele@cs.brandeis.edu

Field Summary
static POS ADJ
           
static POS ADV
           
static POS[] CATS
          A list of all POSs.
protected  java.lang.String key
           
protected  java.lang.String label
           
static POS NOUN
           
static POS VERB
           
 
Constructor Summary
protected POS(java.lang.String label, java.lang.String key)
           
 
Method Summary
 boolean equals(java.lang.Object object)
           
 java.lang.String getLabel()
          Return a label intended for textual presentation.
 int hashCode()
           
static POS lookup(java.lang.String key)
          Return the PointerType whose key matches key.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NOUN

public static final POS NOUN

VERB

public static final POS VERB

ADJ

public static final POS ADJ

ADV

public static final POS ADV

CATS

public static final POS[] CATS
A list of all POSs.


label

protected java.lang.String label

key

protected java.lang.String key
Constructor Detail

POS

protected POS(java.lang.String label,
              java.lang.String key)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

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

getLabel

public java.lang.String getLabel()
Return a label intended for textual presentation.


lookup

public static POS lookup(java.lang.String key)
Return the PointerType whose key matches key.

Throws:
java.util.NoSuchElementException - If key doesn't name any POS.