uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Eckart de Castilho <...@apache.org>
Subject Re: How to use Language Flow Controller ?
Date Wed, 23 Aug 2017 18:27:44 GMT
Hi Charlotte,

On 23.08.2017, at 07:36, Hansart Charlotte <hansart.charlotte@gmail.com> wrote:
> 
> Hello all,
> 
> I'm using UIMA and UIMAfit for some months now, and I'm trying to go deeper
> into its functionalities. These days, I'm trying to use the Language Flow
> Controller, but it is not really successful, and I have some questions.
> 
> So my first question is : when multiple AnalysisEngines are aggregated
> together, are their capabilities "merged" and added to the capabilities of
> the AggregateAnalysisEngine ?

They are not merged. If you need to expose capabilities on the aggregate,
you'd have to add them there manually. It wouldn't make sense to merge them.
Imagine you have one component that is able to process "de" and "en"
and another one that can process "en" and "fr", then a good guess may
be that the aggregate can at least do "en" - but then there may be other
reasons why this is not the case, e.g. because one of them translates
from "de" to "en" and the other from "en" to "fr"... I don't think there
is a sensible merging strategy that uimaFIT should do by default.
Deferring capabilities of aggregates to the creator of the aggregate
seems more reasonable to me.

> In each Annotator, I also set the Language Capability parameter :
> 
> *@LanguageCapability({"en", "de"})*
> *public class Annotator1 extends JCasAnnotator_ImplBase { ... }*

Since you manually set the capabilities in your code, you override the
capabilities that uimaFIT adds based on the @LanguageCapability annotation.
Either of the two (manually adding or using the annotation) should suffice.

> Unfortunately, the code doesn't work, namely, the JCas is not processed by
> the pipeline, and I get any error.

Just looking at the code, I don't see anything blatantly wrong, but I
also have rarely used a custom flow controller. I can see that you pass 
the AED as a single parameter to runPipeline which is good for what
you are trying to achieve. Best would be you set a breakpoint in the code
of the Language Flow Controller and try figuring out whether it doesn't
find the capabilities, or what else might be going wrong.

Cheers,

-- Richard
Mime
View raw message