Package opennlp.tools.models.classgraph

# Class ClassgraphModelFinder

java.lang.Object
opennlp.tools.models.AbstractClassPathModelFinder
opennlp.tools.models.classgraph.ClassgraphModelFinder

All Implemented Interfaces:
  `ClassPathModelFinder`

public class ClassgraphModelFinder extends AbstractClassPathModelFinder implements ClassPathModelFinder
Enables the detection of OpenNLP models in the classpath via classgraph. By default, this class will search for JAR files starting with "opennlp-models-*". This wildcard pattern can be adjusted by using the alternative constructor of this class.

- ## Field Summary

  ### Fields inherited from interface opennlp.tools.models.ClassPathModelFinder

  `OPENNLP_MODEL_JAR_PREFIX`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClassgraphModelFinder()`
  By default, it scans for "opennlp-models-*.jar".
  `ClassgraphModelFinder(String modelJarPrefix)`

- ## Method Summary

  ### Methods inherited from class opennlp.tools.models.AbstractClassPathModelFinder

  `findModels`

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

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

  ### Methods inherited from interface opennlp.tools.models.ClassPathModelFinder

  `findModels`

- ## Constructor Details

  - ### ClassgraphModelFinder

    public ClassgraphModelFinder()
    By default, it scans for "opennlp-models-*.jar".

  - ### ClassgraphModelFinder

    public ClassgraphModelFinder(String modelJarPrefix)
    Parameters:
      `modelJarPrefix` - The leafnames of the jars that should be canned (e.g. "opennlp.jar"). May contain a wildcard glob ("opennlp-*.jar"). It must not be `null`.