public enum Inflection extends Enum<Inflection>
An enumeration representing the different types of morphology patterns used by the basic morphology processor included with SimpleNLG. This enumeration is a way of informing the morphology processor which set of rules should be used when inflecting the word.
The pattern is recorded in the Feature.PATTERN feature and applies to
adjectives, nouns and verbs.
It should be noted that the morphology processor will use user-defined inflections or those found in a lexicon first before applying the supplied rules.
| Enum Constant and Description |
|---|
GRECO_LATIN_REGULAR
The morphology processor has simple rules for pluralising Greek and Latin
nouns.
|
INVARIANT
The value for words which are invariant, that is, are never inflected.
|
IRREGULAR
A word having an irregular pattern essentially means that none of the
supplied rules can be used to correctly inflect the word.
|
REGULAR
Regular patterns represent the default rules when dealing with
inflections.
|
REGULAR_DOUBLE
Regular double patterns apply to verbs where the last consonant is
duplicated before applying the new suffix.
|
UNCOUNT
The value for uncountable nouns, which are not inflected in their plural
form.
|
| Modifier and Type | Method and Description |
|---|---|
static Inflection |
getInflCode(String code)
convenience method: parses an inflectional code such as
"irreg|woman|women" to retrieve the first element, which is the code
itself, then maps it to the value of
Inflection. |
static Inflection |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Inflection[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Inflection GRECO_LATIN_REGULAR
public static final Inflection IRREGULAR
public static final Inflection REGULAR
public static final Inflection REGULAR_DOUBLE
public static final Inflection UNCOUNT
public static final Inflection INVARIANT
public static Inflection[] values()
for (Inflection c : Inflection.values()) System.out.println(c);
public static Inflection 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 static Inflection getInflCode(String code)
Inflection.code - -- the string representing the inflection. The strings are
those defined in the NIH Lexicon.Copyright © 2020. All Rights Reserved.