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 voidcheckModelType()abstract AbstractModelconstructModel()AbstractModelgetModel()doublereadDouble()Implement as needed for the format the model is stored in.intreadInt()Implement as needed for the format the model is stored in.java.lang.StringreadUTF()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.IOExceptionImplement as needed for the format the model is stored in.- Throws:
java.io.IOException
-
readDouble
public double readDouble() throws java.io.IOExceptionImplement as needed for the format the model is stored in.- Throws:
java.io.IOException
-
readUTF
public java.lang.String readUTF() throws java.io.IOExceptionImplement 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
-
-