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 aClassPathModel
from aClassPathModelEntry
-
Constructor Details
-
ClassPathModelLoader
public ClassPathModelLoader()
-
-
Method Details
-
load
Loads aClassPathModel
from aClassPathModelEntry
- Parameters:
entry
- A validClassPathModelEntry
, it must not benull
. Moreover, it is validated that thebinary data
andmeta-data
are notnull
.- Returns:
- A
ClassPathModel
containing the model resources. - Throws:
IOException
- Thrown if something went wrong during reading resources from the classpath.
-