# Package opennlp.tools.util

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

- 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> |
  DownloadUtil | This class facilitates the downloading of pretrained OpenNLP models.
  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 |

- Enum Summary
  Enum | Description
  --- | ---
  DownloadUtil.ModelType | The type of model.

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