Package opennlp.tools.ml.model
Class AbstractModelReader
- java.lang.Object
-
- opennlp.tools.ml.model.AbstractModelReader
-
- Direct Known Subclasses:
GenericModelReader
,GISModelReader
,PerceptronModelReader
public abstract class AbstractModelReader extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AbstractModelReader(java.io.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.java.lang.String
readUTF()
Implement as needed for the format the model is stored in.
-
-
-
Constructor Detail
-
AbstractModelReader
public AbstractModelReader(java.io.File f) throws java.io.IOException
- Throws:
java.io.IOException
-
AbstractModelReader
public AbstractModelReader(DataReader dataReader)
-
-
Method Detail
-
readInt
public int readInt() throws java.io.IOException
Implement as needed for the format the model is stored in.- Throws:
java.io.IOException
-
readDouble
public double readDouble() throws java.io.IOException
Implement as needed for the format the model is stored in.- Throws:
java.io.IOException
-
readUTF
public java.lang.String readUTF() throws java.io.IOException
Implement as needed for the format the model is stored in.- Throws:
java.io.IOException
-
getModel
public AbstractModel getModel() throws java.io.IOException
- Throws:
java.io.IOException
-
checkModelType
public abstract void checkModelType() throws java.io.IOException
- Throws:
java.io.IOException
-
constructModel
public abstract AbstractModel constructModel() throws java.io.IOException
- Throws:
java.io.IOException
-
-