# Package opennlp.tools.util

Package containing utility data structures and algorithms used by multiple other packages.

See: Description

- Interface Summary
  Interface | Description
  --- | ---
  BeamSearchContextGenerator<T> | Interface for context generators used with a sequence beam search.
  InputStreamFactory | Allows repeated reads through a stream for certain types of model building.
  ObjectStream<T> | Reads `Object`s from a stream.
  ResetableIterator<E> | This interface makes an `Iterator` resetable.
  SequenceCodec<T> |
  SequenceValidator<T> |

- Class Summary
  Class | Description
  --- | ---
  AbstractEventStream<T> |
  AbstractObjectStream<T> |
  BaseToolFactory | Base class for all tool factories.
  Cache<K,V> | Provides fixed size, pre-allocated, least recently used replacement cache.
  CollectionObjectStream<E> |
  EventTraceStream |
  FilterObjectStream<S,T> | Abstract base class for filtering `ObjectStream`s.
  MarkableFileInputStreamFactory | A factory that creates `MarkableFileInputStream` from a `File`
  MutableInt | This is a non-thread safe mutable int.
  ObjectStreamUtils |
  ParagraphStream | Stream filter which merges text lines into paragraphs.
  PlainTextByLineStream | Reads a plain text file and return each line as a `String` object.
  ReverseListIterator<T> | An iterator for a list which returns values in the opposite order as the typical list iterator.
  Sequence | Represents a weighted sequence of outcomes.
  Span | Class for storing start and end integer offsets.
  StringList | The `StringList` is an immutable list of `String`s.
  StringUtil |
  TokenTag |
  TrainingParameters |
  Version | The `Version` class represents the OpenNlp Tools library version.
  XmlUtil |

- Exception Summary
  Exception | Description
  --- | ---
  InsufficientTrainingDataException | This exception indicates that the provided training data is insufficient to train the desired model.
  InvalidFormatException | This exception indicates that a resource violates the expected data format.

## Package opennlp.tools.util Description

Package containing utility data structures and algorithms used by multiple other packages.

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