Search code examples
javaannotationsnlpuimadkpro-core

Annotator dependencies: UIMA Type Capabilities?


In my UIMA application, I have some annotators that must run after a certain annotator has run.

At first, I thought about aggregating these annotators together, but I have other annotators that are also dependent on this (and other) annotator, which makes aggregating hard and/or unpractical.

I read about Type Capabilities, which, if I understood correctly, tell UIMA that certain Types (Annotations) must be present, when used as Input Type. I was hoping that UIMA will give me something like a warning when running pipelines without Annotators that have some Output Types that are declared as Input Types of the used Annotator. Instead, the annotators keep running/processing as usual.

Is there a way to achieve what I want, or is this just unnecessary? I am currently using the SimplePipeline if that matters.

TL;DR: My goal is that Annotators refuse to run if there are certain other Annotators are missing in the Pipeline/scheduled after these Annotators

Thanks in advance.


Solution

  • In UIMA the primary way in which one assures that the annotations you need are present for your annotator is to aggregate annotators together. So to answer your question, that is how you are going to achieve what you want because what you want to do (have UIMA figure our all your dependencies through Type Capabilities and provide warnings) is neither possible nor practical with a collection of stand alone annotators.

    My question back to you is, why is it so hard to figure our dependencies by making aggregate annotators? Do you realize that you can aggregate aggregate pipelines? They should have all of their annotation dependencies intact if they are functioning correctly and provide a list of what they output so you can use them as input for the construction of your own pipeline.