WhitespaceTokenStream (Apache OpenNLP :: Core :: Runtime 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.tokenize, class: WhitespaceTokenStream

Package opennlp.tools.tokenize

# Class WhitespaceTokenStream

java.lang.Object
opennlp.tools.util.FilterObjectStream<opennlp.tools.tokenize.TokenSample,String>
opennlp.tools.tokenize.WhitespaceTokenStream

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

public class WhitespaceTokenStream extends FilterObjectStream<opennlp.tools.tokenize.TokenSample,String>
This stream formats `ObjectStream` of `samples` into whitespace separated token strings.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WhitespaceTokenStream(opennlp.tools.util.ObjectStream<opennlp.tools.tokenize.TokenSample> tokens)`
  Initializes a `WhitespaceTokenStream`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `read()`

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

  `close, reset`

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

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

- ## Constructor Details

  - ### WhitespaceTokenStream

    public WhitespaceTokenStream(opennlp.tools.util.ObjectStream<opennlp.tools.tokenize.TokenSample> tokens)
    Initializes a `WhitespaceTokenStream`.
    Parameters:
      `tokens` - The `stream` of tokens to be separated.

- ## Method Details

  - ### read

    public String read() throws IOException
    Throws:
      `IOException`