Class GenericModelReader
java.lang.Object
opennlp.tools.ml.model.AbstractModelReader
opennlp.tools.ml.model.GenericModelReader
An generic
AbstractModelReader implementation.- See Also:
-
Field Summary
FieldsFields inherited from class AbstractModelReader
dataReader, MAX_ENTRIES, MAX_ENTRIES_PROPERTY, NUM_PREDS -
Constructor Summary
ConstructorsConstructorDescriptionInitializes aGenericModelReadervia aFile.GenericModelReader(DataReader dataReader) Initializes aGenericModelReadervia aDataReader. -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks the model type via the the underlyingDataReader.Constructs amodel.Methods inherited from class AbstractModelReader
getModel, getOutcomePatterns, getOutcomes, getParameters, getPredicates, readDouble, readInt, readUTF
-
Field Details
-
delegateModelReader
-
-
Constructor Details
-
GenericModelReader
Initializes aGenericModelReadervia aFile.- Parameters:
f- TheFilethat references the model to be read.- Throws:
IOException- Thrown if IO errors occurred.
-
GenericModelReader
Initializes aGenericModelReadervia aDataReader.- Parameters:
dataReader- TheDataReaderthat references the model to be read.
-
-
Method Details
-
checkModelType
Description copied from class:AbstractModelReaderChecks the model type via the the underlyingDataReader.- Specified by:
checkModelTypein classAbstractModelReader- Throws:
IOException- Thrown if IO errors occurred checking the model type.
-
constructModel
Description copied from class:AbstractModelReaderConstructs amodel.- Specified by:
constructModelin classAbstractModelReader- Returns:
- A
AbstractModelreconstructed from a model's (read) attributes. - Throws:
IOException- Thrown if IO errors occurred during (re-)construction.
-