Class MascNamedEntitySampleStream

java.lang.Object
opennlp.tools.util.FilterObjectStream<MascDocument, opennlp.tools.namefind.NameSample>
opennlp.tools.formats.masc.MascNamedEntitySampleStream
All Implemented Interfaces:
AutoCloseable, opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample>

public class MascNamedEntitySampleStream extends opennlp.tools.util.FilterObjectStream<MascDocument, opennlp.tools.namefind.NameSample>
  • Constructor Details

  • Method Details

    • read

      public opennlp.tools.namefind.NameSample read() throws IOException
      Reads the next sample of named entities.
      Returns:
      One sentence together with its named entity annotation.
      Throws:
      IOException - Thrown if the sample cannot be extracted
    • reset

      public void reset() throws IOException, UnsupportedOperationException
      Specified by:
      reset in interface opennlp.tools.util.ObjectStream<opennlp.tools.namefind.NameSample>
      Overrides:
      reset in class opennlp.tools.util.FilterObjectStream<MascDocument, opennlp.tools.namefind.NameSample>
      Throws:
      IOException
      UnsupportedOperationException