UimaUtil (Apache OpenNLP UIMA Annotators 1.9.5 API)
Date: 2026-06-18

opennlp.uima.util

## Class UimaUtil

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

-     public final class UimaUtil
      extends Object

  This is a util class for uima operations.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ADDITIONAL_TRAINING_DATA_ENCODING`
    `static String` | `ADDITIONAL_TRAINING_DATA_FILE`
    `static String` | `BEAM_SIZE_PARAMETER` The beam size parameter.
    `static String` | `CUTOFF_PARAMETER`
    `static String` | `DICTIONARY_PARAMETER`
    `static String` | `IS_REMOVE_EXISTINGS_ANNOTAIONS`
    `static String` | `ITERATIONS_PARAMETER`
    `static String` | `LANGUAGE_PARAMETER`
    `static String` | `MODEL_PARAMETER` The model parameter.
    `static String` | `POS_FEATURE_PARAMETER` The pos feature parameter.
    `static String` | `PROBABILITY_FEATURE_PARAMETER`
    `static String` | `SENTENCE_TYPE_PARAMETER` The sentence type parameter.
    `static String` | `TOKEN_TYPE_PARAMETER` The token type parameter.
    `static String` | `TRAINING_PARAMS_FILE_PARAMETER`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `removeAnnotations(org.apache.uima.cas.CAS cas, org.apache.uima.cas.text.AnnotationFS containerAnnotation, org.apache.uima.cas.Type removeAnnotationType)` Removes all annotations of type removeAnnotationType which are contained by annotations of type containerAnnotationType.

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

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

- - ### Field Detail

    - #### TOKEN_TYPE_PARAMETER

          public static final String TOKEN_TYPE_PARAMETER

      The token type parameter.
      See Also:
        Constant Field Values

    - #### POS_FEATURE_PARAMETER

          public static final String POS_FEATURE_PARAMETER

      The pos feature parameter.
      See Also:
        Constant Field Values

    - #### MODEL_PARAMETER

          public static String MODEL_PARAMETER

      The model parameter.

    - #### SENTENCE_TYPE_PARAMETER

          public static String SENTENCE_TYPE_PARAMETER

      The sentence type parameter.

    - #### BEAM_SIZE_PARAMETER

          public static final String BEAM_SIZE_PARAMETER

      The beam size parameter.
      See Also:
        Constant Field Values

    - #### LANGUAGE_PARAMETER

          public static final String LANGUAGE_PARAMETER

      See Also:
        Constant Field Values

    - #### DICTIONARY_PARAMETER

          public static final String DICTIONARY_PARAMETER

      See Also:
        Constant Field Values

    - #### TRAINING_PARAMS_FILE_PARAMETER

          public static final String TRAINING_PARAMS_FILE_PARAMETER

      See Also:
        Constant Field Values

    - #### CUTOFF_PARAMETER

          public static final String CUTOFF_PARAMETER

      See Also:
        Constant Field Values

    - #### ITERATIONS_PARAMETER

          public static final String ITERATIONS_PARAMETER

      See Also:
        Constant Field Values

    - #### PROBABILITY_FEATURE_PARAMETER

          public static final String PROBABILITY_FEATURE_PARAMETER

      See Also:
        Constant Field Values

    - #### IS_REMOVE_EXISTINGS_ANNOTAIONS

          public static final String IS_REMOVE_EXISTINGS_ANNOTAIONS

      See Also:
        Constant Field Values

    - #### ADDITIONAL_TRAINING_DATA_FILE

          public static final String ADDITIONAL_TRAINING_DATA_FILE

      See Also:
        Constant Field Values

    - #### ADDITIONAL_TRAINING_DATA_ENCODING

          public static final String ADDITIONAL_TRAINING_DATA_ENCODING

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### removeAnnotations

          public static void removeAnnotations(org.apache.uima.cas.CAS cas,
                                               org.apache.uima.cas.text.AnnotationFS containerAnnotation,
                                               org.apache.uima.cas.Type removeAnnotationType)

      Removes all annotations of type removeAnnotationType which are contained by annotations of type containerAnnotationType.
      Parameters:
        `cas` -
        `containerAnnotation` -
        `removeAnnotationType` -

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