opennlp.uima.util

## Class OpennlpUtil

- java.lang.Object
- - opennlp.uima.util.OpennlpUtil

-     public final class OpennlpUtil
      extends Object

  This class contains utils methods for the maxent library.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static byte[]` | `loadBytes(File inFile)`
    `static opennlp.tools.util.TrainingParameters` | `loadTrainingParams(String inFileValue, boolean isSequenceTrainingAllowed)`
    `static void` | `serialize(opennlp.tools.util.model.BaseModel model, File modelFile)` Serializes a `GISModel` and writes it to the given `OutputStream`.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### serialize

          public static void serialize(opennlp.tools.util.model.BaseModel model,
                                       File modelFile)
                                throws IOException

      Serializes a `GISModel` and writes it to the given `OutputStream`.
      Parameters:
        `model` - model to serialize
      Throws:
        `IOException` - IOException

    - #### loadBytes

          public static byte[] loadBytes(File inFile)
                                  throws IOException

      Throws:
        `IOException`

    - #### loadTrainingParams

          public static opennlp.tools.util.TrainingParameters loadTrainingParams(String inFileValue,
                                                                                 boolean isSequenceTrainingAllowed)
                                                                          throws org.apache.uima.resource.ResourceInitializationException

      Throws:
        `org.apache.uima.resource.ResourceInitializationException`

Copyright © 2026 The Apache Software Foundation. All rights reserved.