Package opennlp.tools.ml.perceptron
Klasse PerceptronModelReader
java.lang.Object
opennlp.tools.ml.model.AbstractModelReader
opennlp.tools.ml.perceptron.PerceptronModelReader
- Bekannte direkte Unterklassen:
BinaryPerceptronModelReader
The base class for readers of
Perceptron (model type identifier)
1. # of parameters (
2. # of outcomes (
* list of outcome names (
3. # of different types of outcome patterns (
* list of (
[# of predicates for which outcome pattern is true] [outcome pattern]
4. # of predicates (
* list of predicate names (
models
.
It assumes that models are saved in the following sequence:
Perceptron (model type identifier)
1. # of parameters (
int
)
2. # of outcomes (
int
)
* list of outcome names (
String
)
3. # of different types of outcome patterns (
int
)
* list of (
int
int[]
)
[# of predicates for which outcome pattern is true] [outcome pattern]
4. # of predicates (
int
)
* list of predicate names (
String
)- Siehe auch:
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungPerceptronModelReader
(File file) Initializes aPerceptronModelReader
via aFile
.PerceptronModelReader
(DataReader dataReader) Initializes aPerceptronModelReader
via aDataReader
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
Reads the mode type from the underlying reader and informs if it not aPerceptron
model.Constructs amodel
.Von Klasse geerbte Methoden opennlp.tools.ml.model.AbstractModelReader
getModel, readDouble, readInt, readUTF
-
Konstruktordetails
-
PerceptronModelReader
Initializes aPerceptronModelReader
via aFile
.- Parameter:
file
- TheFile
that references the model to be read.- Löst aus:
IOException
- Thrown if IO errors occurred.
-
PerceptronModelReader
Initializes aPerceptronModelReader
via aDataReader
.- Parameter:
dataReader
- TheDataReader
that references the model to be read.
-
-
Methodendetails
-
constructModel
Constructs amodel
.If you are creating a reader for a format which won't work with this (perhaps a database or
xml
file), override this method and ignore the other methods provided in this abstract class.- Angegeben von:
constructModel
in KlasseAbstractModelReader
- Gibt zurück:
- A
PerceptronModel
reconstructed from a model's (read) attributes. - Löst aus:
IOException
- Thrown if IO errors occurred during (re-)construction.
-
checkModelType
Reads the mode type from the underlying reader and informs if it not aPerceptron
model.- Angegeben von:
checkModelType
in KlasseAbstractModelReader
- Löst aus:
IOException
- Thrown if IO errors occurred.
-