Package opennlp.tools.models
Class ClassPathModelLoader
java.lang.Object
opennlp.tools.models.ClassPathModelLoader
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionload(ClassPathModelEntry entry) Loads aClassPathModelfrom aClassPathModelEntry
-
Constructor Details
-
ClassPathModelLoader
public ClassPathModelLoader()
-
-
Method Details
-
load
Loads aClassPathModelfrom aClassPathModelEntry- Parameters:
entry- A validClassPathModelEntry, it must not benull. Moreover, it is validated that thebinary dataandmeta-dataare notnull.- Returns:
- A
ClassPathModelcontaining the model resources. - Throws:
IOException- Thrown if something went wrong during reading resources from the classpath.
-