This module exposes functionality from Apache OpenNLP to Apache Lucene. The Apache OpenNLP library is a machine learning based toolkit for the processing of natural language text.

For an introduction to Lucene's analysis API, see the {@link org.apache.lucene.analysis} package documentation.

The OpenNLP Tokenizer behavior is similar to the WhiteSpaceTokenizer but is smart about inter-word punctuation. The term stream looks very much like the way you parse words and punctuation while reading. The major difference between this tokenizer and most other tokenizers shipped with Lucene is that punctuation is tokenized. This is required for the following taggers to operate properly.

The OpenNLP taggers annotate terms using the TypeAttribute.

Since the TypeAttribute is not stored in the index, it is recommended that one of these filters is used following OpenNLPFilter to enable search against the assigned tags: