Class SimpleNormalizer
java.lang.Object
smile.nlp.normalizer.SimpleNormalizer
- All Implemented Interfaces:
Function<String,String>, UnaryOperator<String>, Normalizer
A baseline normalizer for processing Unicode text.
- Apply Unicode normalization form NFKC.
- Strip, trim, normalize, and compress whitespace.
- Remove control and formatting characters.
- Normalize dash, double and single quotes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleNormalizerReturns the singleton instance.Normalize the given string.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Normalizer
apply
-
Method Details
-
getInstance
Returns the singleton instance.- Returns:
- the singleton instance.
-
normalize
Description copied from interface:NormalizerNormalize the given string.- Specified by:
normalizein interfaceNormalizer- Parameters:
text- the text.- Returns:
- the normalized text.
-