Class ADSentenceStream

java.lang.Object
opennlp.tools.util.FilterObjectStream<String, ADSentenceStream.Sentence>
opennlp.tools.formats.ad.ADSentenceStream
All Implemented Interfaces:
AutoCloseable, opennlp.tools.util.ObjectStream<ADSentenceStream.Sentence>

@Internal public class ADSentenceStream extends opennlp.tools.util.FilterObjectStream<String, ADSentenceStream.Sentence>
Stream filter which merges text lines into sentences, following the Arvores Deitadas syntax.

Information about the format:
Susana Afonso. "Árvores deitadas: Descrição do formato e das opções de análise na Floresta Sintáctica".
12 de Fevereiro de 2006.

Whitespace in the markup and the tree lines is the Unicode White_Space property, see StringUtil.isUnicodeWhitespace(char), independent of the whitespace mode.

Note: Do not use this class, internal use only!

  • Constructor Details

    • ADSentenceStream

      public ADSentenceStream(opennlp.tools.util.ObjectStream<String> lineStream)
  • Method Details

    • read

      public ADSentenceStream.Sentence read() throws IOException
      Reads the next sentence.
      Returns:
      The next ADSentenceStream.Sentence, or null at the end of the input. A sentence cut off before the closing tag is returned with the lines read so far; an opening tag with no lines after it at the end of the input yields no sentence.
      Throws:
      IOException - Thrown if the line stream cannot be read.