Package opennlp.tools.util.normalizer
Class NfkcCharSequenceNormalizer
java.lang.Object
opennlp.tools.util.normalizer.NfkcCharSequenceNormalizer
- All Implemented Interfaces:
Serializable,opennlp.tools.util.normalizer.CharSequenceNormalizer
public class NfkcCharSequenceNormalizer
extends Object
implements opennlp.tools.util.normalizer.CharSequenceNormalizer
A
CharSequenceNormalizer that applies Unicode Normalization Form KC (compatibility
composition, UAX #15).
NFKC folds compatibility variants to their canonical form: fullwidth and halfwidth letters,
the U+FB01 ligature to fi, and super/subscript digits to plain digits. It is
more aggressive than NFC and is lossy (it can change a
character's appearance or meaning, e.g. a squared numeral to a plain one), so it is a deliberate
choice for search/recall rather than a safe default.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NfkcCharSequenceNormalizerReturns the shared, stateless instance.normalize(CharSequence text)
-
Constructor Details
-
NfkcCharSequenceNormalizer
public NfkcCharSequenceNormalizer()
-
-
Method Details
-
getInstance
Returns the shared, stateless instance.- Returns:
- the shared, stateless instance
-
normalize
- Specified by:
normalizein interfaceopennlp.tools.util.normalizer.CharSequenceNormalizer
-