Package opennlp.tools.ml.perceptron
Class PerceptronModelWriter
- java.lang.Object
-
- opennlp.tools.ml.model.AbstractModelWriter
-
- opennlp.tools.ml.perceptron.PerceptronModelWriter
-
- Direct Known Subclasses:
BinaryPerceptronModelWriter
public abstract class PerceptronModelWriter extends AbstractModelWriter
The base class forPerceptronModelwriters.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.- See Also:
PerceptronModel,AbstractModelWriter
-
-
Constructor Summary
Constructors Constructor Description PerceptronModelWriter(AbstractModel model)Initializes aPerceptronModelWriterfor aperceptron model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpersist()Writes theperceptron model, using theAbstractModelWriter.writeUTF(String),AbstractModelWriter.writeDouble(double), orAbstractModelWriter.writeInt(int)} methods implemented by extending classes.-
Methods inherited from class opennlp.tools.ml.model.AbstractModelWriter
close, writeDouble, writeInt, writeUTF
-
-
-
-
Constructor Detail
-
PerceptronModelWriter
public PerceptronModelWriter(AbstractModel model)
Initializes aPerceptronModelWriterfor aperceptron model.- Parameters:
model- Theperceptron modelto be written.
-
-
Method Detail
-
persist
public void persist() throws IOExceptionWrites theperceptron model, using theAbstractModelWriter.writeUTF(String),AbstractModelWriter.writeDouble(double), orAbstractModelWriter.writeInt(int)} methods implemented by extending classes.If you wish to create a
PerceptronModelWriterwhich uses a different structure, it will be necessary to override the#persist()method in addition to implementing thewriteX(..)methods.- Specified by:
persistin classAbstractModelWriter- Throws:
IOException- Thrown if IO errors occurred.
-
-