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 Stringprivate Resolvableprivate Resolvablestatic final POSstatic final POSprivate static final Liststatic final POS(package private) static final longstatic final POS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAn instance of POS is equal to another iff they're underlying keys are equal.static ListgetKey()Gets the key for this POS.getLabel()Return a label intended for textual presentation.static POSgetPOSForKey(String key) Return thePOSwhose key matches key, or null if the key does not match any POS.static POSgetPOSForLabel(String label) Return thePOSwhose key matches label, or null if the label does not match any POS.inthashCode()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 thePOSwhose key matches label, or null if the label does not match any POS. -
getPOSForKey
Return thePOSwhose 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
-