Package opennlp.tools.ml.perceptron
Klasse BinaryPerceptronModelWriter
java.lang.Object
opennlp.tools.ml.model.AbstractModelWriter
opennlp.tools.ml.AbstractMLModelWriter
opennlp.tools.ml.perceptron.PerceptronModelWriter
opennlp.tools.ml.perceptron.BinaryPerceptronModelWriter
A
PerceptronModelWriter that writes models in a binary format.-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungBinaryPerceptronModelWriter(AbstractModel model, DataOutputStream dos) BinaryPerceptronModelWriter(AbstractModel model, File f) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidclose()Closes the underlyingDataOutputStream.voidwriteDouble(double d) Writes a singledoubleto the underlyingDataOutputStream.voidwriteInt(int i) Writes a singleintto the underlyingDataOutputStream.voidWrites aStringto the underlyingDataOutputStream.Von Klasse geerbte Methoden opennlp.tools.ml.perceptron.PerceptronModelWriter
persist
-
Konstruktordetails
-
BinaryPerceptronModelWriter
InstantiatesBinaryPerceptronModelWritervia anperceptron modeland aFile. Prepares writing of themodelto the file. Based on whether the file's suffix contains.gz, it detects whether the file is gzipped or not.- Parameter:
model- Theperceptron modelwhich is to be persisted.f- TheFilein which the model is to be persisted.- Löst aus:
IOException- Siehe auch:
-
BinaryPerceptronModelWriter
InstantiatesBinaryPerceptronModelWritervia anperceptron modeland aDataOutputStream. Prepares writing amodelto the file. Based on whether the file's suffix contains.gz, it detects whether the file is gzipped or not.- Parameter:
model- Theperceptron modelwhich is to be persisted.dos- TheDataOutputStreamwhich is used to persist themodel. Thedosmust be opened.
-
-
Methodendetails
-
writeUTF
Beschreibung aus Klasse kopiert:AbstractModelWriterWrites aStringto the underlyingDataOutputStream.- Angegeben von:
writeUTFin KlasseAbstractModelWriter- Parameter:
s- TheUTF encodedcharacters.- Löst aus:
IOException- Thrown if IO errors occurred.
-
writeInt
Beschreibung aus Klasse kopiert:AbstractModelWriterWrites a singleintto the underlyingDataOutputStream.- Angegeben von:
writeIntin KlasseAbstractModelWriter- Parameter:
i- Theintvalue.- Löst aus:
IOException- Thrown if IO errors occurred.
-
writeDouble
Beschreibung aus Klasse kopiert:AbstractModelWriterWrites a singledoubleto the underlyingDataOutputStream.- Angegeben von:
writeDoublein KlasseAbstractModelWriter- Parameter:
d- Thedoublevalue.- Löst aus:
IOException- Thrown if IO errors occurred.
-
close
Beschreibung aus Klasse kopiert:AbstractModelWriterCloses the underlyingDataOutputStream.- Angegeben von:
closein KlasseAbstractModelWriter- Löst aus:
IOException- Thrown if IO errors occurred.
-