NLPLemmatizerOp (Lucene 10.5.0 opennlp API)
Description: declaration: package: org.apache.lucene.analysis.opennlp.tools, class: NLPLemmatizerOp

Package org.apache.lucene.analysis.opennlp.tools

# Class NLPLemmatizerOp

java.lang.Object
org.apache.lucene.analysis.opennlp.tools.NLPLemmatizerOp

public class NLPLemmatizerOp extends Object
Supply OpenNLP Lemmatizer tools.

Both a dictionary-based lemmatizer and a MaxEnt lemmatizer are supported. If both are configured, the dictionary-based lemmatizer is tried first, and then the MaxEnt lemmatizer is consulted for out-of-vocabulary tokens.

The MaxEnt implementation requires binary models from OpenNLP project on SourceForge.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NLPLemmatizerOp(opennlp.tools.lemmatizer.DictionaryLemmatizer dictionaryLemmatizer, opennlp.tools.lemmatizer.LemmatizerModel lemmatizerModel)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String[]`
  `lemmatize(String[] words, String[] postags)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### NLPLemmatizerOp

    public NLPLemmatizerOp(opennlp.tools.lemmatizer.DictionaryLemmatizer dictionaryLemmatizer, opennlp.tools.lemmatizer.LemmatizerModel lemmatizerModel) throws IOException
    Throws:
      `IOException`

- ## Method Details

  - ### lemmatize

    public String[] lemmatize(String[] words, String[] postags)