Package opennlp.tools.util.normalizer
Class EllipsisCharSequenceNormalizer
java.lang.Object
opennlp.tools.util.normalizer.EllipsisCharSequenceNormalizer
- All Implemented Interfaces:
Serializable,opennlp.tools.util.normalizer.CharSequenceNormalizer,opennlp.tools.util.normalizer.OffsetAwareNormalizer
public class EllipsisCharSequenceNormalizer
extends Object
implements opennlp.tools.util.normalizer.OffsetAwareNormalizer
A
CharSequenceNormalizer that expands the ellipsis and leader characters to ASCII dots:
the horizontal ellipsis (U+2026) to "..." and the two-dot leader
(U+2025) to "..".
Scanning is a single O(1)-per-code-point cursor pass with no regular expression. ASCII dot runs are left unchanged.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the shared, stateless instance.normalize(CharSequence text) opennlp.tools.util.normalizer.AlignedTextnormalizeAligned(CharSequence text)
-
Constructor Details
-
EllipsisCharSequenceNormalizer
public EllipsisCharSequenceNormalizer()
-
-
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
-