Class ADSentenceStream

All Implemented Interfaces:
AutoCloseable, ObjectStream<ADSentenceStream.Sentence>

@Internal public class ADSentenceStream extends 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.

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

  • Field Details

    • SENT_START

      private static final Pattern SENT_START
    • SENT_END

      private static final Pattern SENT_END
    • EXT_END

      private static final Pattern EXT_END
    • TITLE_START

      private static final Pattern TITLE_START
    • TITLE_END

      private static final Pattern TITLE_END
    • BOX_START

      private static final Pattern BOX_START
    • BOX_END

      private static final Pattern BOX_END
    • PARA_START

      private static final Pattern PARA_START
    • TEXT_START

      private static final Pattern TEXT_START
    • parser

      private final ADSentenceStream.SentenceParser parser
    • paraID

      private int paraID
    • isTitle

      private boolean isTitle
    • isBox

      private boolean isBox
  • Constructor Details

  • 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.