uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Klügl <pklu...@uni-wuerzburg.de>
Subject Re: Multi-view CAS and sofa-unaware AE
Date Thu, 04 Apr 2013 18:31:59 GMT
Thanks, Alexandre and Thorsten, for the pointer to AggregateBuilder.

I have thought about using uimaFIT, but I will wait for the 2.0.0 release.

The problem with the 10 views was just an example. My problem is more 
generic where I can't influence the views nor the analysis engines.

I think my approach will work for now, but will be replaced with 
something nicer, uimaFIT-based in future.

Best,

Peter

Am 03.04.2013 18:15, schrieb Alexandre Patry:
> On 13-04-03 11:10 AM, Peter Klügl wrote:
>> Yes, but imagine you have a CAS with 10 views and you want to apply a
>> primitive sofa-unaware AE on each view.
>>
>> The easiest solution I found was to write a template AAE descriptor,
>> replaced the AE descriptor and sofa name (and mapping), instantiate the
>> AAE, call process(), and then repeat that for the next view.
>>
>> This can get quite ugly, if you have to override parameters and you do
>> not know the primitive AE and its parameters.
> If you are willing to use uimafit, you could do it in a simple for 
> loop. It would look like this :
>
>    // build an aggregate that will run the same analysis engine on many
>    sofas
>    final AggregateBuilder builder = new AggregateBuilder();
>    for (String sofa : sofas) {
>         final AnalysisEngineDescription annotator =
> AnalysisEngineFactory.createPrimitiveDescription(YourEngine.class,
>    paramName1, paramValue1, paramName2, paramValue2, ...);
>         builder.add(annotator, "_InitialView", sofa);
>    }
>
>    final AnalysisEngine engine = builder.createAggregate();
>    // you can then user your engine
>
>
> The documentation on the web site ( 
> https://code.google.com/p/uimafit/) is quite good if you want more 
> information.
>
> Regards,
>
> Alexandre
>
>>
>> Best,
>>
>> Peter
>>
>>
>> On 03.04.2013 14:38, Jörn Kottmann wrote:
>>> Yes, you can use the sofa mapping, to map some view to the 
>>> _InitialView.
>>>
>>> Have a look here:
>>> http://uima.apache.org/d/uimaj-2.4.0/tutorials_and_users_guides.html#ugr.tug.mvs.sofa_name_mapping

>>>
>>>
>>>
>>> Jörn
>>>
>>> On 04/03/2013 02:19 PM, Peter Klügl wrote:
>>>> Hi,
>>>>
>>>> sorry for this beginner question:
>>>>
>>>> It there a shortcut to apply a sofa-unaware AE on CAS view that is not
>>>> the _InitialView?
>>>>
>>>> It seems quite cumbersome to programmatically generate an aggregate
>>>> analysis engine description to wrap to sofa-unaware engine.
>>>>
>>>> Best,
>>>>
>>>> Peter
>>>
>
>


Mime
View raw message