Package opennlp.tools.ml.naivebayes
Class BinaryNaiveBayesModelReader
- java.lang.Object
-
- opennlp.tools.ml.model.AbstractModelReader
-
- opennlp.tools.ml.naivebayes.NaiveBayesModelReader
-
- opennlp.tools.ml.naivebayes.BinaryNaiveBayesModelReader
-
public class BinaryNaiveBayesModelReader extends NaiveBayesModelReader
ANaiveBayesModelReaderthat reads models from a binary format.
-
-
Constructor Summary
Constructors Constructor Description BinaryNaiveBayesModelReader(DataInputStream dis)InstantiatesBinaryNaiveBayesModelReadervia aDataInputStreamcontaining the model contents.BinaryNaiveBayesModelReader(File f)InstantiatesBinaryNaiveBayesModelReadervia aFileand creates a reader for it.
-
Method Summary
-
Methods inherited from class opennlp.tools.ml.naivebayes.NaiveBayesModelReader
checkModelType, constructModel
-
Methods inherited from class opennlp.tools.ml.model.AbstractModelReader
getModel, readDouble, readInt, readUTF
-
-
-
-
Constructor Detail
-
BinaryNaiveBayesModelReader
public BinaryNaiveBayesModelReader(DataInputStream dis)
InstantiatesBinaryNaiveBayesModelReadervia aDataInputStreamcontaining the model contents.- Parameters:
dis- TheDataInputStreamcontaining the model information. It must be open and have bytes available.
-
BinaryNaiveBayesModelReader
public BinaryNaiveBayesModelReader(File f) throws IOException
InstantiatesBinaryNaiveBayesModelReadervia 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
-
-