Package opennlp.tools.formats.masc

# Class MascTokenSampleStream

java.lang.Object
opennlp.tools.util.FilterObjectStream<MascDocument,opennlp.tools.tokenize.TokenSample>
opennlp.tools.formats.masc.MascTokenSampleStream

All Implemented Interfaces:
  `AutoCloseable`, `opennlp.tools.util.ObjectStream<opennlp.tools.tokenize.TokenSample>`

public class MascTokenSampleStream extends opennlp.tools.util.FilterObjectStream<MascDocument,opennlp.tools.tokenize.TokenSample>

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MascTokenSampleStream(opennlp.tools.util.ObjectStream<MascDocument> samples)`
  Initializes a `MascTokenSampleStream`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `opennlp.tools.tokenize.TokenSample`
  `read()`
  `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

  - ### MascTokenSampleStream

    public MascTokenSampleStream(opennlp.tools.util.ObjectStream<MascDocument> samples) throws IOException
    Initializes a `MascTokenSampleStream`.
    Parameters:
      `samples` - The `opennlp.tools.util.ObjectStream<MascDocument>` samples to process.
    Throws:
      `IOException` - Thrown if non of the `documents` had Penn tokenization.

- ## Method Details

  - ### read

    public opennlp.tools.tokenize.TokenSample read() throws IOException
    Throws:
      `IOException`

  - ### reset

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