Class NfcCharSequenceNormalizer

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

public class NfcCharSequenceNormalizer extends Object implements opennlp.tools.util.normalizer.CharSequenceNormalizer
A CharSequenceNormalizer that applies Unicode Normalization Form C (canonical composition, UAX #15).

NFC is the safe, lossless (under canonical equivalence) baseline for matching: precomposed and decomposed spellings of the same text (for example U+00E9 versus e plus a combining acute accent) become identical, so equal text compares equal regardless of how it was encoded. It changes no characters' meaning and is the W3C-recommended interchange form.

See Also:
  • Constructor Details

    • NfcCharSequenceNormalizer

      public NfcCharSequenceNormalizer()
  • Method Details

    • getInstance

      public static NfcCharSequenceNormalizer getInstance()
      Returns the shared, stateless instance.
      Returns:
      the shared, stateless instance
    • normalize

      public CharSequence normalize(CharSequence text)
      Specified by:
      normalize in interface opennlp.tools.util.normalizer.CharSequenceNormalizer