Package opennlp.tools.util.normalizer
Class NumberCharSequenceNormalizer
java.lang.Object
opennlp.tools.util.normalizer.NumberCharSequenceNormalizer
- All Implemented Interfaces:
Serializable,opennlp.tools.util.normalizer.CharSequenceNormalizer
public class NumberCharSequenceNormalizer
extends Object
implements opennlp.tools.util.normalizer.CharSequenceNormalizer
A
CharSequenceNormalizer implementation that normalizes text in terms of numbers:
every maximal run of ASCII digits (0 to 9), that is the longest unbroken
stretch of consecutive digits, is replaced by a single space. For example, "a1234b56"
becomes "a b ". Non-ASCII digits, for example Arabic-Indic or fullwidth digits, are
not treated as digits and are left unchanged.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NumberCharSequenceNormalizerReturns the shared, stateless instance.normalize(CharSequence text)
-
Constructor Details
-
NumberCharSequenceNormalizer
public NumberCharSequenceNormalizer()
-
-
Method Details
-
getInstance
Returns the shared, stateless instance.- Returns:
- the shared, stateless instance
-
normalize
- Specified by:
normalizein interfaceopennlp.tools.util.normalizer.CharSequenceNormalizer
-