Class CaseFoldCharSequenceNormalizer

java.lang.Object
opennlp.tools.util.normalizer.CaseFoldCharSequenceNormalizer
All Implemented Interfaces:
Serializable, opennlp.tools.util.normalizer.CharSequenceNormalizer

public class CaseFoldCharSequenceNormalizer extends Object implements opennlp.tools.util.normalizer.CharSequenceNormalizer
A CharSequenceNormalizer that lower cases text for case-insensitive matching. It uses Locale.ROOT by default, so the result does not depend on the JVM's default locale.

Locale.ROOT avoids locale surprises such as the Turkish dotless-i mapping. A specific locale can be supplied through CaseFoldCharSequenceNormalizer(Locale) or getInstance(Locale) when a language's case rules are wanted (Turkish being the classic example). Full Unicode case folding (for example German eszett, U+00DF, to ss) is a distinct, heavier transform and is intentionally out of scope here.

See Also:
  • Constructor Details

    • CaseFoldCharSequenceNormalizer

      public CaseFoldCharSequenceNormalizer()
      Creates a normalizer that lower cases using Locale.ROOT.
    • CaseFoldCharSequenceNormalizer

      public CaseFoldCharSequenceNormalizer(Locale locale)
      Creates a normalizer that lower cases using the given locale.
      Parameters:
      locale - The locale whose case rules to apply.
  • Method Details