Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

UIMA 2.x has a new set of Annotator interfaces. Annotators should extend CasAnnotator_ImplBase or JCasAnnotator_ImplBase instead of the v1.x TextAnnotator_ImplBase and JTextAnnotator_ImplBase.

NOTE: The v1.x annotator interfaces are unchanged and are still supported for backwards compatibility.

Differences between v2 and v1 annotator interfaces

...

The context for the Annotator is the same as the overall UIMA context. The impl base classes provide a getContext() method which returns now the UimaContext object

Process method throws AnalysisEngineProcessException, not AnnotatorProcessException

See #exceptions for discussion.

Exceptions rationalization

In version 1 there were different exceptions for the methods of an AnalysisEngine and for the
corresponding methods of an Annotator; these were merged in version 2.

  • AnnotatorProcessException (v1) → AnalysisEngineProcessException (v2)
  • AnnotatorInitializationException (v1) → ResourceInitializationException (v2)
  • AnnotatorConfigurationException (v1) → ResourceConfigurationException (v2)