Package opennlp.tools.ml.model
Class AbstractModelReader
- java.lang.Object
-
- opennlp.tools.ml.model.AbstractModelReader
-
- Direct Known Subclasses:
GenericModelReader
,GISModelReader
,NaiveBayesModelReader
,PerceptronModelReader
public abstract class AbstractModelReader extends Object
-
-
Constructor Summary
Constructors Constructor Description AbstractModelReader(File f)
AbstractModelReader(DataReader dataReader)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
checkModelType()
abstract AbstractModel
constructModel()
AbstractModel
getModel()
double
readDouble()
Implement as needed for the format the model is stored in.int
readInt()
Implement as needed for the format the model is stored in.String
readUTF()
Implement as needed for the format the model is stored in.
-
-
-
Constructor Detail
-
AbstractModelReader
public AbstractModelReader(File f) throws IOException
- Throws:
IOException
-
AbstractModelReader
public AbstractModelReader(DataReader dataReader)
-
-
Method Detail
-
readInt
public int readInt() throws IOException
Implement as needed for the format the model is stored in.- Throws:
IOException
-
readDouble
public double readDouble() throws IOException
Implement as needed for the format the model is stored in.- Throws:
IOException
-
readUTF
public String readUTF() throws IOException
Implement as needed for the format the model is stored in.- Throws:
IOException
-
getModel
public AbstractModel getModel() throws IOException
- Throws:
IOException
-
checkModelType
public abstract void checkModelType() throws IOException
- Throws:
IOException
-
constructModel
public abstract AbstractModel constructModel() throws IOException
- Throws:
IOException
-
-