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

opennlp.tools.doccat

## Class DocumentCategorizerEventStream

- java.lang.Object
- - opennlp.tools.util.AbstractEventStream<DocumentSample>
  - - opennlp.tools.doccat.DocumentCategorizerEventStream

- All Implemented Interfaces:
    AutoCloseable, ObjectStream<Event>

      public class DocumentCategorizerEventStream
      extends AbstractEventStream<DocumentSample>

  Iterator-like class for modeling document classification events.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DocumentCategorizerEventStream(ObjectStream<DocumentSample> samples)` Initializes the current instance.
    `DocumentCategorizerEventStream(ObjectStream<DocumentSample> data, FeatureGenerator... featureGenerators)` 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

    - #### DocumentCategorizerEventStream

          public DocumentCategorizerEventStream(ObjectStream<DocumentSample> data,
                                                FeatureGenerator... featureGenerators)

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

    - #### DocumentCategorizerEventStream

          public DocumentCategorizerEventStream(ObjectStream<DocumentSample> samples)

      Initializes the current instance.
      Parameters:
        `samples` - `ObjectStream` of `DocumentSample`s

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