Package opennlp.uima.util
Klasse OpennlpUtil
java.lang.Object
opennlp.uima.util.OpennlpUtil
This class contains util methods for the maxent library.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic byte[]
Loads data from a givenFile
.static TrainingParameters
loadTrainingParams
(String inFileValue, boolean isSequenceTrainingAllowed) Loads data from a givenFile
.static void
-
Methodendetails
-
serialize
- Parameter:
model
- TheBaseModel
to serialize.modelFile
- TheFile
to serialize into.- Löst aus:
IOException
- Thrown if IO errors occurred.
-
loadBytes
Loads data from a givenFile
.- Parameter:
inFile
- TheFile
to read bytes from.- Gibt zurück:
- The bytes that have been read.
- Löst aus:
IOException
- Thrown if IO errors occurred.
-
loadTrainingParams
public static TrainingParameters loadTrainingParams(String inFileValue, boolean isSequenceTrainingAllowed) throws org.apache.uima.resource.ResourceInitializationException Loads data from a givenFile
.- Parameter:
inFileValue
- The name of theFile
to read bytes from.isSequenceTrainingAllowed
- Whether theTrainerFactory.TrainerType.SEQUENCE_TRAINER
method is allowed or not.- Gibt zurück:
- The
TrainingParameters
that have been read. - Löst aus:
org.apache.uima.resource.ResourceInitializationException
- Thrown if IO errors occurred or theinFileValue
does not reference a valid training parameters file.
-