Package opennlp.tools.ml.naivebayes
Class PlainTextNaiveBayesModelReader
java.lang.Object
opennlp.tools.ml.model.AbstractModelReader
opennlp.tools.ml.naivebayes.NaiveBayesModelReader
opennlp.tools.ml.naivebayes.PlainTextNaiveBayesModelReader
A
NaiveBayesModelReader that reads models from a plain text format.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiatesPlainTextNaiveBayesModelReadervia aBufferedReadercontaining the model contents.InstantiatesPlainTextNaiveBayesModelReadervia aFileand creates a reader for it. -
Method Summary
Methods inherited from class opennlp.tools.ml.naivebayes.NaiveBayesModelReader
checkModelType, constructModelMethods inherited from class opennlp.tools.ml.model.AbstractModelReader
getModel, readDouble, readInt, readUTF
-
Constructor Details
-
PlainTextNaiveBayesModelReader
InstantiatesPlainTextNaiveBayesModelReadervia aBufferedReadercontaining the model contents.- Parameters:
br- TheBufferedReadercontaining the model information. It must be open and have bytes available.
-
PlainTextNaiveBayesModelReader
InstantiatesPlainTextNaiveBayesModelReadervia 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
-