public enum LexicalCategory extends Enum<LexicalCategory> implements ElementCategory
This enumeration defines the different lexical components. The categories define the well understood role each word takes in language. For example, dog is a noun, chase is a verb, the is a determiner, and so on.
| Enum Constant and Description |
|---|
ADJECTIVE
An adjective element.
|
ADVERB
An adverb element.
|
ANY
A default value, indicating an unspecified category.
|
AUXILIARY
An auxiliary verb element.
|
COMPLEMENTISER
A complementiser element.
|
CONJUNCTION
A conjunction element.
|
DETERMINER
A determiner element often referred to as a specifier.
|
MODAL
A modal element.
|
NOUN
A noun element.
|
PREPOSITION
A preposition element.
|
PRONOUN
A pronoun element.
|
SYMBOL
The element represents a symbol.
|
VERB
A verb element.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equalTo(Object checkObject)
Checks to see if the given object is equal to this lexical category.
|
static LexicalCategory |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LexicalCategory[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LexicalCategory ANY
public static final LexicalCategory SYMBOL
public static final LexicalCategory NOUN
public static final LexicalCategory ADJECTIVE
public static final LexicalCategory ADVERB
public static final LexicalCategory VERB
public static final LexicalCategory DETERMINER
public static final LexicalCategory PRONOUN
public static final LexicalCategory CONJUNCTION
public static final LexicalCategory PREPOSITION
public static final LexicalCategory COMPLEMENTISER
public static final LexicalCategory MODAL
public static final LexicalCategory AUXILIARY
public static LexicalCategory[] values()
for (LexicalCategory c : LexicalCategory.values()) System.out.println(c);
public static LexicalCategory valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic boolean equalTo(Object checkObject)
Checks to see if the given object is equal to this lexical category.
This is done by checking the enumeration if the object is of the type
LexicalCategory or by converting the object and this
category to strings and comparing the strings.
For example, LexicalCategory.NOUN will match another
LexicalCategory.NOUN but will also match the string
"noun" as well.
equalTo in interface ElementCategorycheckObject - the object to be checked against.true if the object matches, false
otherwise.Copyright © 2020. All Rights Reserved.