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 aGenericModelWriterfor anAbstractModelwith an associatedDataOutputStreamthe model shall be written to.GenericModelWriter(AbstractModel model, File file) Initializes aGenericModelWriterfor anAbstractModelwith an associatedFilethe model shall be written to. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidclose()Closes the underlyingDataOutputStream.voidpersist()Serializes themodelusing theAbstractModelWriter.writeUTF(String),AbstractModelWriter.writeDouble(double), orAbstractModelWriter.writeInt(int)} methods implemented by extending classes.voidwriteDouble(double d) Writes a singledoubleto the underlyingDataOutputStream.voidwriteInt(int i) Writes a singleintto the underlyingDataOutputStream.voidWrites aStringto the underlyingDataOutputStream.
-
Konstruktordetails
-
GenericModelWriter
Initializes aGenericModelWriterfor anAbstractModelwith an associatedFilethe model shall be written to.- Parameter:
model- Themodelto write out.file- TheFilethat used to be written to.- Löst aus:
IOException- Thrown if IO errors occurred.
-
GenericModelWriter
Initializes aGenericModelWriterfor anAbstractModelwith an associatedDataOutputStreamthe model shall be written to.- Parameter:
model- Themodelto write out.dos- TheDataOutputStreamthat used to be written to.
-
-
Methodendetails
-
close
Beschreibung aus Klasse kopiert:AbstractModelWriterCloses the underlyingDataOutputStream.- Angegeben von:
closein KlasseAbstractModelWriter- Löst aus:
IOException- Thrown if IO errors occurred.
-
persist
Beschreibung aus Klasse kopiert:AbstractModelWriterSerializes themodelusing theAbstractModelWriter.writeUTF(String),AbstractModelWriter.writeDouble(double), orAbstractModelWriter.writeInt(int)} methods implemented by extending classes.- Angegeben von:
persistin KlasseAbstractModelWriter- 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.
-
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.
-
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.
-