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 and Description
    `OpenNLPOpsFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and 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 String` | `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 Detail

    - #### OpenNLPOpsFactory

          public OpenNLPOpsFactory()

  - ### Method Detail

    - #### 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 String 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()

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.