Package opennlp.tools.ml.maxent.io

# Class QNModelWriter

java.lang.Object
opennlp.tools.ml.model.AbstractModelWriter
opennlp.tools.ml.AbstractMLModelWriter
opennlp.tools.ml.maxent.io.GISModelWriter
opennlp.tools.ml.maxent.io.QNModelWriter

Direct Known Subclasses:
  `BinaryQNModelWriter`

public abstract class QNModelWriter extends GISModelWriter
The base class for writers of `models`.

It provides the `persist()` method which takes care of the structure of a stored document, and requires an extending class to define precisely how the data should be stored.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `QNModelWriter(AbstractModel model)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `persist()`
  Writes the `QN model`, using the `AbstractModelWriter.writeUTF(String)`, `AbstractModelWriter.writeDouble(double)`, or `AbstractModelWriter.writeInt(int)`} methods implemented by extending classes.

  ### Methods inherited from class opennlp.tools.ml.model.AbstractModelWriter

  `close, writeDouble, writeInt, writeUTF`

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

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

- ## Constructor Details

  - ### QNModelWriter

    public QNModelWriter(AbstractModel model)

- ## Method Details

  - ### persist

    public void persist() throws IOException
    Writes the `QN model`, using the `AbstractModelWriter.writeUTF(String)`, `AbstractModelWriter.writeDouble(double)`, or `AbstractModelWriter.writeInt(int)`} methods implemented by extending classes.

    If you wish to create a `QNModelWriter` which uses a different structure, it will be necessary to override the `#persist()` method in addition to implementing the `writeX(..)` methods.

    Overrides:
      `persist` in class `GISModelWriter`
    Throws:
      `IOException` - Thrown if IO errors occurred.