Package opennlp.tools.ml.maxent.io
Klasse BinaryQNModelWriter
java.lang.Object
opennlp.tools.ml.model.AbstractModelWriter
opennlp.tools.ml.AbstractMLModelWriter
opennlp.tools.ml.maxent.io.GISModelWriter
opennlp.tools.ml.maxent.io.QNModelWriter
opennlp.tools.ml.maxent.io.BinaryQNModelWriter
A
QNModelWriter
that writes models in a binary format.- Siehe auch:
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungBinaryQNModelWriter
(AbstractModel model, DataOutputStream dos) BinaryQNModelWriter
(AbstractModel model, File f) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
close()
Closes the underlyingDataOutputStream
.void
writeDouble
(double d) Writes a singledouble
to the underlyingDataOutputStream
.void
writeInt
(int i) Writes a singleint
to the underlyingDataOutputStream
.void
Writes aString
to the underlyingDataOutputStream
.Von Klasse geerbte Methoden opennlp.tools.ml.maxent.io.QNModelWriter
persist
-
Konstruktordetails
-
BinaryQNModelWriter
InstantiatesBinaryQNModelWriter
via anQN model
and aFile
.Prepares writing of a
model
to the file. Based on whether the file's suffix contains.gz
, it detects whether the file is gzipped or not.- Parameter:
model
- TheQN model
which is to be persisted.f
- TheFile
in which the model is to be persisted.- Löst aus:
IOException
- Thrown if IO errors occurred.- Siehe auch:
-
BinaryQNModelWriter
- Parameter:
model
- TheQN model
which is to be persisted.dos
- TheDataOutputStream
which is used to persist themodel
. Thedos
must be opened.- Siehe auch:
-
-
Methodendetails
-
writeUTF
Writes aString
to the underlyingDataOutputStream
.- Angegeben von:
writeUTF
in KlasseAbstractModelWriter
- Parameter:
s
- TheUTF encoded
characters.- Löst aus:
IOException
- Thrown if IO errors occurred.
-
writeInt
Writes a singleint
to the underlyingDataOutputStream
.- Angegeben von:
writeInt
in KlasseAbstractModelWriter
- Parameter:
i
- Theint
value.- Löst aus:
IOException
- Thrown if IO errors occurred.
-
writeDouble
Writes a singledouble
to the underlyingDataOutputStream
.- Angegeben von:
writeDouble
in KlasseAbstractModelWriter
- Parameter:
d
- Thedouble
value.- Löst aus:
IOException
- Thrown if IO errors occurred.
-
close
Closes the underlyingDataOutputStream
.- Angegeben von:
close
in KlasseAbstractModelWriter
- Löst aus:
IOException
- Thrown if IO errors occurred.
-