Package opennlp.tools.util.normalizer
Enum Class Dimension
- All Implemented Interfaces:
Serializable,Comparable<Dimension>,Constable
A layer of the
Term normalization stack, in increasing order of aggressiveness. The
declaration order is the canonical application order, because the transforms do not commute.
Each character-level dimension carries its default CharSequenceNormalizer, resolved
lazily on first request.
ORIGINAL is the source token and is always present. STEM and LEMMA
are token-level and have no default normalizer; they require a
Stemmer or Lemmatizer on the
analyzer (LEMMA also a part-of-speech tag).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDiacritic and accent folding; lossy, script gated, and language-wrong for some languages.Case folding; lossy and locale sensitive.Confusable (homoglyph) skeleton folding per UTS #39; lossy, for matching only.Unicode dashes folded to the ASCII hyphen-minus.Emoji folded to ASCII emoticons where a mapping exists; lossy, for matching only.Unicode full case folding (UTS #21); lossy and expanding (sharp s to ss, the ligatures).Lemmatization through a configuredLemmatizer.Unicode canonical composition (NFC); lossless under canonical equivalence.Unicode compatibility composition (NFKC); lossy (for example superscripts to digits).The original token text, the source of truth.Stemming through a configuredStemmer.Unicode whitespace folded to ASCII spaces. -
Method Summary
Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
ORIGINAL
The original token text, the source of truth. -
NFC
Unicode canonical composition (NFC); lossless under canonical equivalence. -
NFKC
Unicode compatibility composition (NFKC); lossy (for example superscripts to digits). -
WHITESPACE
Unicode whitespace folded to ASCII spaces. -
DASH
Unicode dashes folded to the ASCII hyphen-minus. -
CASE_FOLD
Case folding; lossy and locale sensitive. -
FULL_CASE_FOLD
Unicode full case folding (UTS #21); lossy and expanding (sharp s to ss, the ligatures). -
ACCENT_FOLD
Diacritic and accent folding; lossy, script gated, and language-wrong for some languages. -
EMOJI_FOLD
Emoji folded to ASCII emoticons where a mapping exists; lossy, for matching only. -
CONFUSABLE_FOLD
Confusable (homoglyph) skeleton folding per UTS #39; lossy, for matching only. -
STEM
Stemming through a configuredStemmer. -
LEMMA
Lemmatization through a configuredLemmatizer.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
defaultNormalizer
public opennlp.tools.util.normalizer.CharSequenceNormalizer defaultNormalizer()
-