Package opennlp.tools.formats.masc

# Class MascSentenceSampleStream

java.lang.Object
opennlp.tools.util.FilterObjectStream<MascDocument,opennlp.tools.sentdetect.SentenceSample>
opennlp.tools.formats.masc.MascSentenceSampleStream

All Implemented Interfaces:
  `AutoCloseable`, `opennlp.tools.util.ObjectStream<opennlp.tools.sentdetect.SentenceSample>`

public class MascSentenceSampleStream extends opennlp.tools.util.FilterObjectStream<MascDocument,opennlp.tools.sentdetect.SentenceSample>

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MascSentenceSampleStream(opennlp.tools.util.ObjectStream<MascDocument> samples, int sentencesPerSample)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `opennlp.tools.sentdetect.SentenceSample`
  `read()`
  Reads a new `sample of sentences`.
  `void`
  `reset()`

  ### Methods inherited from class opennlp.tools.util.FilterObjectStream

  `close`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MascSentenceSampleStream

    public MascSentenceSampleStream(opennlp.tools.util.ObjectStream<MascDocument> samples, int sentencesPerSample) throws IOException
    Throws:
      `IOException`

- ## Method Details

  - ### read

    public opennlp.tools.sentdetect.SentenceSample read() throws IOException
    Reads a new `sample of sentences`.
    Returns:
      The `specified number of sentences`. If fewer left, then return whatever is left.
    Throws:
      `IOException` - Thrown if IO errors occurred during read operation.

  - ### reset

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