DetokenizeSentenceSampleStream (Apache OpenNLP Tools 2.5.9 API)
Description: declaration: package: opennlp.tools.formats.letsmt, class: DetokenizeSentenceSampleStream

# Class DetokenizeSentenceSampleStream

java.lang.Object
opennlp.tools.util.FilterObjectStream<SentenceSample, SentenceSample>
opennlp.tools.formats.letsmt.DetokenizeSentenceSampleStream

All Implemented Interfaces:
  `AutoCloseable, ObjectStream<SentenceSample>`

public class DetokenizeSentenceSampleStream extends FilterObjectStream<SentenceSample, SentenceSample>

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DetokenizeSentenceSampleStream(Detokenizer detokenizer, ObjectStream<SentenceSample> samples)`
  Initializes a `DetokenizeSentenceSampleStream`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SentenceSample`
  `read()`
  Returns the next `T` object.

  ### Methods inherited from class FilterObjectStream

  `close, reset`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### DetokenizeSentenceSampleStream

    public DetokenizeSentenceSampleStream(Detokenizer detokenizer, ObjectStream<SentenceSample> samples)
    Initializes a `DetokenizeSentenceSampleStream`.
    Parameters:
      `detokenizer` - The `Detokenizer` to use. Must not be `null`.
      `samples` - The `samples` as input. Must not be `null`.
    Throws:
      `IllegalArgumentException` - Thrown if parameters are invalid.

- ## Method Details

  - ### read

    public SentenceSample read() throws IOException
    Description copied from interface: `ObjectStream`
    Returns the next `T` object. Calling this method repeatedly until it returns `null` will return each object from the underlying source exactly once.
    Returns:
      The next object or `null` to signal that the stream is exhausted.
    Throws:
      `IOException` - Thrown if there is an error during reading.