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 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.StringreadUTF()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 IOExceptionImplement as needed for the format the model is stored in.- Throws:
IOException
-
readDouble
public double readDouble() throws IOExceptionImplement 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
-
-