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 Details

    • BulletCharSequenceNormalizer

      public BulletCharSequenceNormalizer()
  • Method Details

    • getInstance

      public static BulletCharSequenceNormalizer 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