Package opennlp.tools.ml.perceptron
Class BinaryPerceptronModelReader
- java.lang.Object
-
- opennlp.tools.ml.model.AbstractModelReader
-
- opennlp.tools.ml.perceptron.PerceptronModelReader
-
- opennlp.tools.ml.perceptron.BinaryPerceptronModelReader
-
public class BinaryPerceptronModelReader extends PerceptronModelReader
APerceptronModelReaderthat reads models from a binary format.
-
-
Constructor Summary
Constructors Constructor Description BinaryPerceptronModelReader(DataInputStream dis)InstantiatesBinaryPerceptronModelReadervia aDataInputStreamcontaining the model contents.BinaryPerceptronModelReader(File f)InstantiatesBinaryPerceptronModelReadervia aFileand creates a reader for it.
-
Method Summary
-
Methods inherited from class opennlp.tools.ml.perceptron.PerceptronModelReader
checkModelType, constructModel
-
Methods inherited from class opennlp.tools.ml.model.AbstractModelReader
getModel, readDouble, readInt, readUTF
-
-
-
-
Constructor Detail
-
BinaryPerceptronModelReader
public BinaryPerceptronModelReader(DataInputStream dis)
InstantiatesBinaryPerceptronModelReadervia aDataInputStreamcontaining the model contents.- Parameters:
dis- TheDataInputStreamcontaining the model information. It must be open and have bytes available.
-
BinaryPerceptronModelReader
public BinaryPerceptronModelReader(File f) throws IOException
InstantiatesBinaryPerceptronModelReadervia aFileand creates a reader for it. Based on whether the file's suffix contains.gz, it detects whether the file is gzipped or not.- Parameters:
f- TheFilethat references the model to be read.- Throws:
IOException
-
-