Package net.didion.jwnl.data
Class POS
java.lang.Object
net.didion.jwnl.data.POS
- All Implemented Interfaces:
Serializable
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.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private Resolvable
private Resolvable
static final POS
static final POS
private static final List
static final POS
(package private) static final long
static final POS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
An instance of POS is equal to another iff they're underlying keys are equal.static List
getKey()
Gets the key for this POS.getLabel()
Return a label intended for textual presentation.static POS
getPOSForKey
(String key) Return thePOS
whose key matches key, or null if the key does not match any POS.static POS
getPOSForLabel
(String label) Return thePOS
whose key matches label, or null if the label does not match any POS.int
hashCode()
Returns the underlying pos key's hashcode.toString()
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
-
NOUN
-
VERB
-
ADJECTIVE
-
ADVERB
-
ALL_POS
-
_label
-
_key
-
_cachedToString
-
-
Constructor Details
-
POS
-
-
Method Details
-
getAllPOS
-
getPOSForLabel
Return thePOS
whose key matches label, or null if the label does not match any POS. -
getPOSForKey
Return thePOS
whose key matches key, or null if the key does not match any POS. -
toString
-
hashCode
public int hashCode()Returns the underlying pos key's hashcode. -
equals
An instance of POS is equal to another iff they're underlying keys are equal. -
getLabel
Return a label intended for textual presentation. -
getKey
Gets the key for this POS.- Returns:
- key
-