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

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

# Class OpenNLPOpsFactory

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

public class OpenNLPOpsFactory extends Object
Supply OpenNLP Named Entity Recognizer Cache model file objects. Assumes model files are thread-safe.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OpenNLPOpsFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `clearModels()`
  `static NLPChunkerOp`
  `getChunker(String modelName)`
  `static opennlp.tools.chunker.ChunkerModel`
  `getChunkerModel(String modelName, ResourceLoader loader)`
  `static NLPLemmatizerOp`
  `getLemmatizer(String dictionaryFile, String lemmatizerModelFile)`
  `static opennlp.tools.lemmatizer.DictionaryLemmatizer`
  `getLemmatizerDictionary(String dictionaryFile, ResourceLoader loader)`
  `static opennlp.tools.lemmatizer.LemmatizerModel`
  `getLemmatizerModel(String modelName, ResourceLoader loader)`
  `static NLPNERTaggerOp`
  `getNERTagger(String modelName)`
  `static opennlp.tools.namefind.TokenNameFinderModel`
  `getNERTaggerModel(String modelName, ResourceLoader loader)`
  `static NLPPOSTaggerOp`
  `getPOSTagger(String modelName)`
  `static opennlp.tools.postag.POSModel`
  `getPOSTaggerModel(String modelName, ResourceLoader loader)`
  `static NLPSentenceDetectorOp`
  `getSentenceDetector(String modelName)`
  `static opennlp.tools.sentdetect.SentenceModel`
  `getSentenceModel(String modelName, ResourceLoader loader)`
  `static NLPTokenizerOp`
  `getTokenizer(String modelName)`
  `static opennlp.tools.tokenize.TokenizerModel`
  `getTokenizerModel(String modelName, ResourceLoader loader)`

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

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

- ## Constructor Details

  - ### OpenNLPOpsFactory

    public OpenNLPOpsFactory()

- ## Method Details

  - ### getSentenceDetector

    public static NLPSentenceDetectorOp getSentenceDetector(String modelName) throws IOException
    Throws:
      `IOException`

  - ### getSentenceModel

    public static opennlp.tools.sentdetect.SentenceModel getSentenceModel(String modelName, ResourceLoader loader) throws IOException
    Throws:
      `IOException`

  - ### getTokenizer

    public static NLPTokenizerOp getTokenizer(String modelName) throws IOException
    Throws:
      `IOException`

  - ### getTokenizerModel

    public static opennlp.tools.tokenize.TokenizerModel getTokenizerModel(String modelName, ResourceLoader loader) throws IOException
    Throws:
      `IOException`

  - ### getPOSTagger

    public static NLPPOSTaggerOp getPOSTagger(String modelName) throws IOException
    Throws:
      `IOException`

  - ### getPOSTaggerModel

    public static opennlp.tools.postag.POSModel getPOSTaggerModel(String modelName, ResourceLoader loader) throws IOException
    Throws:
      `IOException`

  - ### getChunker

    public static NLPChunkerOp getChunker(String modelName) throws IOException
    Throws:
      `IOException`

  - ### getChunkerModel

    public static opennlp.tools.chunker.ChunkerModel getChunkerModel(String modelName, ResourceLoader loader) throws IOException
    Throws:
      `IOException`

  - ### getNERTagger

    public static NLPNERTaggerOp getNERTagger(String modelName) throws IOException
    Throws:
      `IOException`

  - ### getNERTaggerModel

    public static opennlp.tools.namefind.TokenNameFinderModel getNERTaggerModel(String modelName, ResourceLoader loader) throws IOException
    Throws:
      `IOException`

  - ### getLemmatizer

    public static NLPLemmatizerOp getLemmatizer(String dictionaryFile, String lemmatizerModelFile) throws IOException
    Throws:
      `IOException`

  - ### getLemmatizerDictionary

    public static opennlp.tools.lemmatizer.DictionaryLemmatizer getLemmatizerDictionary(String dictionaryFile, ResourceLoader loader) throws IOException
    Throws:
      `IOException`

  - ### getLemmatizerModel

    public static opennlp.tools.lemmatizer.LemmatizerModel getLemmatizerModel(String modelName, ResourceLoader loader) throws IOException
    Throws:
      `IOException`

  - ### clearModels

    public static void clearModels()