Class WhitespaceRuns

java.lang.Object
opennlp.tools.tokenize.lattice.WhitespaceRuns

final class WhitespaceRuns extends Object
Splits a text into the maximal stretches that contain no whitespace, as judged by StringUtil.isWhitespace(char).
  • Constructor Details

    • WhitespaceRuns

      private WhitespaceRuns()
  • Method Details

    • forEachNonWhitespaceRun

      static void forEachNonWhitespaceRun(String text, WhitespaceRuns.RunHandler handler)
      Passes each whitespace-free stretch of text to handler, in text order.
      Parameters:
      text - The text to split.
      handler - Receives each stretch.