Package opennlp.uima.util
Class OpennlpUtil
- java.lang.Object
- 
- opennlp.uima.util.OpennlpUtil
 
- 
 public final class OpennlpUtil extends Object This class contains util methods for the maxent library.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]loadBytes(File inFile)Loads data from a givenFile.static TrainingParametersloadTrainingParams(String inFileValue, boolean isSequenceTrainingAllowed)Loads data from a givenFile.static voidserialize(BaseModel model, File modelFile)
 
- 
- 
- 
Method Detail- 
serializepublic static void serialize(BaseModel model, File modelFile) throws IOException - Parameters:
- model- The- BaseModelto serialize.
- modelFile- The- Fileto serialize into.
- Throws:
- IOException- Thrown if IO errors occurred.
 
 - 
loadBytespublic static byte[] loadBytes(File inFile) throws IOException Loads data from a givenFile.- Parameters:
- inFile- The- Fileto read bytes from.
- Returns:
- The bytes that have been read.
- Throws:
- IOException- Thrown if IO errors occurred.
 
 - 
loadTrainingParamspublic static TrainingParameters loadTrainingParams(String inFileValue, boolean isSequenceTrainingAllowed) throws org.apache.uima.resource.ResourceInitializationException Loads data from a givenFile.- Parameters:
- inFileValue- The name of the- Fileto read bytes from.
- isSequenceTrainingAllowed- Whether the- TrainerFactory.TrainerType.SEQUENCE_TRAINERmethod is allowed or not.
- Returns:
- The TrainingParametersthat have been read.
- Throws:
- org.apache.uima.resource.ResourceInitializationException- Thrown if IO errors occurred or the- inFileValuedoes not reference a valid training parameters file.
 
 
- 
 
-