LanguageDetectorEventStream (Apache OpenNLP Tools 1.9.5 API)
Date: 2026-06-18

opennlp.tools.langdetect

## Class LanguageDetectorEventStream

- java.lang.Object
- - opennlp.tools.util.AbstractEventStream<LanguageSample>
  - - opennlp.tools.langdetect.LanguageDetectorEventStream

- All Implemented Interfaces:
    AutoCloseable, ObjectStream<Event>

      public class LanguageDetectorEventStream
      extends AbstractEventStream<LanguageSample>

  Iterator-like class for modeling language detector events.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LanguageDetectorEventStream(ObjectStream<LanguageSample> data, LanguageDetectorContextGenerator contextGenerator)` Initializes the current instance via samples and feature generators.

  - ### Method Summary

    - ### Methods inherited from class opennlp.tools.util.AbstractEventStream

      `close, read, reset`

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

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

- - ### Constructor Detail

    - #### LanguageDetectorEventStream

          public LanguageDetectorEventStream(ObjectStream<LanguageSample> data,
                                             LanguageDetectorContextGenerator contextGenerator)

      Initializes the current instance via samples and feature generators.
      Parameters:
        `data` - `ObjectStream` of `LanguageSample`s

Copyright © 2026 The Apache Software Foundation. All rights reserved.