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 Details

    • EllipsisCharSequenceNormalizer

      public EllipsisCharSequenceNormalizer()
  • Method Details

    • getInstance

      public static EllipsisCharSequenceNormalizer getInstance()
      Returns the shared, stateless instance.
      Returns:
      the shared, stateless instance
    • normalize

      public CharSequence normalize(CharSequence text)
      Specified by:
      normalize in interface opennlp.tools.util.normalizer.CharSequenceNormalizer
    • normalizeAligned

      public opennlp.tools.util.normalizer.AlignedText normalizeAligned(CharSequence text)
      Specified by:
      normalizeAligned in interface opennlp.tools.util.normalizer.OffsetAwareNormalizer