PlainTextNaiveBayesModelReader (Apache OpenNLP :: Core :: ML :: Naive Bayes 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.ml.naivebayes, class: PlainTextNaiveBayesModelReader

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

public class PlainTextNaiveBayesModelReader extends NaiveBayesModelReader
A `NaiveBayesModelReader` that reads models from a plain text format.

See Also:
  - `NaiveBayesModelReader`

- ## Field Summary

  ### Fields inherited from class opennlp.tools.ml.model.AbstractModelReader

  `MAX_ENTRIES_PROPERTY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PlainTextNaiveBayesModelReader(BufferedReader br)`
  Instantiates `PlainTextNaiveBayesModelReader` via a `BufferedReader` containing the model contents.
  `PlainTextNaiveBayesModelReader(File f)`
  Instantiates `PlainTextNaiveBayesModelReader` via a `File` and 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`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PlainTextNaiveBayesModelReader

    public PlainTextNaiveBayesModelReader(BufferedReader br)
    Instantiates `PlainTextNaiveBayesModelReader` via a `BufferedReader` containing the model contents.
    Parameters:
      `br` - The `BufferedReader` containing the model information. It must be open and have bytes available.

  - ### PlainTextNaiveBayesModelReader

    public PlainTextNaiveBayesModelReader(File f) throws IOException
    Instantiates `PlainTextNaiveBayesModelReader` via a `File` and 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` - The `File` that references the model to be read.
    Throws:
      `IOException`