Package opennlp.tools.util.normalizer
Class BulletCharSequenceNormalizer
java.lang.Object
opennlp.tools.util.normalizer.BulletCharSequenceNormalizer
- All Implemented Interfaces:
Serializable,opennlp.tools.util.normalizer.CharSequenceNormalizer,opennlp.tools.util.normalizer.OffsetAwareNormalizer
public class BulletCharSequenceNormalizer
extends Object
implements opennlp.tools.util.normalizer.OffsetAwareNormalizer
A
CharSequenceNormalizer that replaces unambiguous list-bullet characters with a space,
so a bullet acts as a token separator rather than sticking to the following word.
Membership is an O(1) CharClass lookup and scanning is a single cursor pass with no
regular expression. The middle dot (U+00B7) is deliberately not included,
because it is a letter in Catalan (l..l) and other orthographies; only characters that
are unambiguously list bullets are replaced.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BulletCharSequenceNormalizerReturns the shared, stateless instance.normalize(CharSequence text) opennlp.tools.util.normalizer.AlignedTextnormalizeAligned(CharSequence text)
-
Constructor Details
-
BulletCharSequenceNormalizer
public BulletCharSequenceNormalizer()
-
-
Method Details
-
getInstance
Returns the shared, stateless instance.- Returns:
- the shared, stateless instance
-
normalize
- Specified by:
normalizein interfaceopennlp.tools.util.normalizer.CharSequenceNormalizer
-
normalizeAligned
- Specified by:
normalizeAlignedin interfaceopennlp.tools.util.normalizer.OffsetAwareNormalizer
-