Package opennlp.tools.ml.model
Klasse GenericModelWriter
java.lang.Object
opennlp.tools.ml.model.AbstractModelWriter
opennlp.tools.ml.model.GenericModelWriter
An generic
AbstractModelWriter
implementation.- Siehe auch:
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungGenericModelWriter
(AbstractModel model, DataOutputStream dos) Initializes aGenericModelWriter
for anAbstractModel
with an associatedDataOutputStream
the model shall be written to.GenericModelWriter
(AbstractModel model, File file) Initializes aGenericModelWriter
for anAbstractModel
with an associatedFile
the model shall be written to. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
close()
Closes the underlyingDataOutputStream
.void
persist()
Serializes themodel
using theAbstractModelWriter.writeUTF(String)
,AbstractModelWriter.writeDouble(double)
, orAbstractModelWriter.writeInt(int)
} methods implemented by extending classes.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
.
-
Konstruktordetails
-
GenericModelWriter
Initializes aGenericModelWriter
for anAbstractModel
with an associatedFile
the model shall be written to.- Parameter:
model
- Themodel
to write out.file
- TheFile
that used to be written to.- Löst aus:
IOException
- Thrown if IO errors occurred.
-
GenericModelWriter
Initializes aGenericModelWriter
for anAbstractModel
with an associatedDataOutputStream
the model shall be written to.- Parameter:
model
- Themodel
to write out.dos
- TheDataOutputStream
that used to be written to.
-
-
Methodendetails
-
close
Beschreibung aus Klasse kopiert:AbstractModelWriter
Closes the underlyingDataOutputStream
.- Angegeben von:
close
in KlasseAbstractModelWriter
- Löst aus:
IOException
- Thrown if IO errors occurred.
-
persist
Beschreibung aus Klasse kopiert:AbstractModelWriter
Serializes themodel
using theAbstractModelWriter.writeUTF(String)
,AbstractModelWriter.writeDouble(double)
, orAbstractModelWriter.writeInt(int)
} methods implemented by extending classes.- Angegeben von:
persist
in KlasseAbstractModelWriter
- Löst aus:
IOException
- Thrown if IO errors occurred.
-
writeDouble
Beschreibung aus Klasse kopiert:AbstractModelWriter
Writes a singledouble
to the underlyingDataOutputStream
.- Angegeben von:
writeDouble
in KlasseAbstractModelWriter
- Parameter:
d
- Thedouble
value.- Löst aus:
IOException
- Thrown if IO errors occurred.
-
writeInt
Beschreibung aus Klasse kopiert:AbstractModelWriter
Writes a singleint
to the underlyingDataOutputStream
.- Angegeben von:
writeInt
in KlasseAbstractModelWriter
- Parameter:
i
- Theint
value.- Löst aus:
IOException
- Thrown if IO errors occurred.
-
writeUTF
Beschreibung aus Klasse kopiert:AbstractModelWriter
Writes aString
to the underlyingDataOutputStream
.- Angegeben von:
writeUTF
in KlasseAbstractModelWriter
- Parameter:
s
- TheUTF encoded
characters.- Löst aus:
IOException
- Thrown if IO errors occurred.
-