opennlp.tools.lemmatizer

## Class LemmaSampleEventStream

- java.lang.Object
- - opennlp.tools.util.AbstractEventStream<LemmaSample>
  - - opennlp.tools.lemmatizer.LemmaSampleEventStream

- All Implemented Interfaces:
    AutoCloseable, ObjectStream<Event>

      public class LemmaSampleEventStream
      extends AbstractEventStream<LemmaSample>

  Class for creating an event stream out of data files for training a probabilistic lemmatizer.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LemmaSampleEventStream(ObjectStream<LemmaSample> d, LemmatizerContextGenerator cg)` Creates a new event stream based on the specified data stream using the specified context generator.

  - ### 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

    - #### LemmaSampleEventStream

          public LemmaSampleEventStream(ObjectStream<LemmaSample> d,
                                        LemmatizerContextGenerator cg)

      Creates a new event stream based on the specified data stream using the specified context generator.
      Parameters:
        `d` - The data stream for this event stream.
        `cg` - The context generator which should be used in the creation of events for this event stream.

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