ClassPathModelLoader (Apache OpenNLP :: Core :: Model Resolver 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.models, class: ClassPathModelLoader

Package opennlp.tools.models

# Class ClassPathModelLoader

java.lang.Object
opennlp.tools.models.ClassPathModelLoader

public class ClassPathModelLoader extends Object
Responsible for loading OpenNLP models from the classpath via `entries`. If models could be loaded successfully, those are provided as `model references` or as instances of the specified `ModelType`.

See Also:
  - `ClassPathModel`
  - `ClassPathModelEntry`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClassPathModelLoader()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ClassPathModel`
  `load(opennlp.tools.models.ClassPathModelEntry entry)`
  Loads a `ClassPathModel` from a `ClassPathModelEntry`

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

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

- ## Constructor Details

  - ### ClassPathModelLoader

    public ClassPathModelLoader()

- ## Method Details

  - ### load

    public ClassPathModel load(opennlp.tools.models.ClassPathModelEntry entry) throws IOException
    Loads a `ClassPathModel` from a `ClassPathModelEntry`
    Parameters:
      `entry` - A valid `ClassPathModelEntry`, it must not be `null`. Moreover, it is validated that the `binary data` and `meta-data` are not `null`.
    Returns:
      A `ClassPathModel` containing the model resources.
    Throws:
      `IOException` - Thrown if something went wrong during reading resources from the classpath.