uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Eckart de Castilho <eckar...@tk.informatik.tu-darmstadt.de>
Subject Re: CollectionReaderFactory.createDescription with multiple output sofas
Date Thu, 29 Sep 2011 13:21:50 GMT
Hi Alex,

in that case I may be wrong about UIMA not creating views when they are declared as capabilities.
My understanding was so far that the only thing UIMA deducts from the capabilities being there
was, to decide if the component is sofa-aware or not, which I think has some effect on the
framework delivering _initialView to process() or the base CAS.

As I said, uimaFIT needs better support for CollectionReaders in general. uimaFIT still is
stuck a bit in historic UIMA concepts. Internally, UIMA does not really make a difference
between readers, AEs, consumers and multilpliers, but for historic reasons it exposes different
interfaces for them. uimaFIT is a bit confused by that and thus lacks several features related
to readers (and consumers - but these are really not needed anymore ;))

-- Richard

Am 29.09.2011 um 15:05 schrieb Alexander Klenner:

> Hi Richard,
> 
> thank you, I think I miss understood the capability concept, also I wonder why my 'classic'
descriptor worked, I did not explicitly create the views but I was able to use them (by only
declaring the capabilities in the descriptor). Well, now it does work, problem solved.
> 
> Thanks,
> 
> Alex
> 
> --
> Dipl. Bioinformatiker Alexander G. Klenner
> Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI)
> Schloss Birlinghoven, D-53754 Sankt Augustin
> Tel.: +49 - 2241 - 14 - 2736
> E-mail: alexander.garvin.klenner@scai.fraunhofer.de
> Internet: http://www.scai.fraunhofer.de
> 
> 
> ----- Original Message -----
> From: "Richard Eckart de Castilho" <eckartde@tk.informatik.tu-darmstadt.de>
> To: user@uima.apache.org
> Sent: Thursday, September 29, 2011 2:53:10 PM
> Subject: Re: CollectionReaderFactory.createDescription with multiple output sofas
> 
> Hi Alex,
> 
> a collection reader has to create sofa/views - they are not created automatically by
UIMA, not even if you declare capabilities for them.
> 
> That being said, uimaFIT currently lacks with respect to support for sofa mappings for
collection readers. I have an idea how to fix that, but didn't yet get around to do that.
I think if you need capabilities, you might want to use the respective uimaFIT Java annotations
- I never use them though. You should be able to just leave out any capability declarations
unless you use a custom FlowManager which requires them.
> 
> If you really need sofa "mapping" support for collection readers, please get back to
me on the uimaFIT users list.
> 
> Cheers,
> 
> Richard 
> 
> Am 29.09.2011 um 14:44 schrieb Alexander Klenner:
> 
>> Hi,
>> 
>> I am using the  CollectionReaderFactory from uimafit to create my CollectionReaderDescription
at runtime. That works fine as long as I do not try to create CRs that produce multiple SOFAs.
My code looks like this at the moment:
>> 
>> Capability[] cap = new Capability[1];
>> cap[0] =  new Capability_impl();
>> 
>> cap[0].addOutputSofa("textView");     		//ascii
>> cap[0].addOutputSofa("imageView");		//binary
>> cap[0].addOutputSofa("originalFileView");	//binary
>> 	
>> 
>> CollectionReaderDescription crDesc = CollectionReaderFactory
>> 				.createDescription(RTFReader.class,
>> 						typeSysDes,
>> 						tp,
>> 						fic,cap,"InputDirectory",args[0]);
>> 
>> Starting this CR leads to the following error:
>> 
>> org.apache.uima.cas.CASRuntimeException: No sofaFS with name textView found.
>> 	at org.apache.uima.cas.impl.CASImpl.getSofa(CASImpl.java:661)
>> 	at org.apache.uima.cas.impl.CASImpl.getView(CASImpl.java:2658)
>> 
>> and the same error for the other sofas as well. 
>> 
>> Can someone maybe provide a code snippet where a working multiple sofa CRs descriptor
is created using uimafit? I am also not sure which parameters of 
>> 
>>  TypePriorities typePriorities,
>>  FsIndexCollection indexes,
>> 
>> are mandatory in this case. (Since there is no builder with Capabilities[] but without
 TypePriorities and FsIndexCollections I guess they are needed?)
>> 
>> 
>> Thank you,
>> 
>> Alex 
>> 
>> 
>> 
>> --
>> Dipl. Bioinformatiker Alexander G. Klenner
>> Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI)
>> Schloss Birlinghoven, D-53754 Sankt Augustin
>> Tel.: +49 - 2241 - 14 - 2736
>> E-mail: alexander.garvin.klenner@scai.fraunhofer.de
>> Internet: http://www.scai.fraunhofer.de
>> 
>> 
> 
> Richard Eckart de Castilho
> 
> -- 
> ------------------------------------------------------------------- 
> Richard Eckart de Castilho
> Technical Lead
> Ubiquitous Knowledge Processing Lab 
> FB 20 Computer Science Department      
> Technische Universit├Ąt Darmstadt 
> Hochschulstr. 10, D-64289 Darmstadt, Germany 
> phone [+49] (0)6151 16-7477, fax -5455, room S2/02/B117
> eckartde@tk.informatik.tu-darmstadt.de 
> www.ukp.tu-darmstadt.de 
> Web Research at TU Darmstadt (WeRC) www.werc.tu-darmstadt.de
> ------------------------------------------------------------------- 
> 
> 
> 
> 

Richard Eckart de Castilho

-- 
------------------------------------------------------------------- 
Richard Eckart de Castilho
Technical Lead
Ubiquitous Knowledge Processing Lab 
FB 20 Computer Science Department      
Technische Universit├Ąt Darmstadt 
Hochschulstr. 10, D-64289 Darmstadt, Germany 
phone [+49] (0)6151 16-7477, fax -5455, room S2/02/B117
eckartde@tk.informatik.tu-darmstadt.de 
www.ukp.tu-darmstadt.de 
Web Research at TU Darmstadt (WeRC) www.werc.tu-darmstadt.de
------------------------------------------------------------------- 





Mime
View raw message