LeipzigLanguageSampleStream (Apache OpenNLP :: Core :: Formats 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.formats.leipzig, class: LeipzigLanguageSampleStream

Package opennlp.tools.formats.leipzig

# Class LeipzigLanguageSampleStream

java.lang.Object
opennlp.tools.formats.leipzig.LeipzigLanguageSampleStream

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

public class LeipzigLanguageSampleStream extends Object implements opennlp.tools.util.ObjectStream<opennlp.tools.langdetect.LanguageSample>

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LeipzigLanguageSampleStream(File leipzigFolder, int sentencesPerSample, int samplesPerLanguage)`
  Initializes a `LeipzigLanguageSampleStream`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `opennlp.tools.langdetect.LanguageSample`
  `read()`
  `void`
  `reset()`

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

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

  ### Methods inherited from interface opennlp.tools.util.ObjectStream

  `close`

- ## Constructor Details

  - ### LeipzigLanguageSampleStream

    public LeipzigLanguageSampleStream(File leipzigFolder, int sentencesPerSample, int samplesPerLanguage) throws IOException
    Initializes a `LeipzigLanguageSampleStream`.
    Parameters:
      `leipzigFolder` - The `directory` which contains files to process.
      `sentencesPerSample` - The number of sentences per sample.
      `samplesPerLanguage` - The number of samples per language to process at maximum.
    Throws:
      `IOException` - Thrown if IO errors occurred.

- ## Method Details

  - ### read

    public opennlp.tools.langdetect.LanguageSample read() throws IOException
    Specified by:
      `read` in interface `opennlp.tools.util.ObjectStream<opennlp.tools.langdetect.LanguageSample>`
    Throws:
      `IOException`

  - ### reset

    public void reset() throws IOException
    Specified by:
      `reset` in interface `opennlp.tools.util.ObjectStream<opennlp.tools.langdetect.LanguageSample>`
    Throws:
      `IOException`