uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christof Mueller <muel...@tk.informatik.tu-darmstadt.de>
Subject "Global" Parameters for a CPE
Date Wed, 24 Oct 2007 15:24:17 GMT
Hi Philipp,

how about defining the folder path as external resource in the CPE 
descriptor and bind it to reader and consumer?
There is a good example for that in the UIMA manual:
http://incubator.apache.org/uima/downloads/releaseDocs/2.2.0-incubating/docs/html/references/references.html#ugr.ref.xml.cpe_descriptor.descriptor.resource_manager_configuration

Best regards
Christof

Philipp Daumke wrote:
> Hi Torsten,
>
> I had the same idea and currently do it like that. But if you work 
> with millions of documents and you want to initialise (or maybe clean 
> the folder)  just at  the beginning it's really a hack to write the 
> folder information in millions of CASes.
>
> Another idea that I had was whether it's possible to access the 
> CollectionReaderXML from the CasConsumer automatically. Is there 
> something like getCPEComponents().getCollectionReader.getMetaData() 
> which you can call from any CPEComponent? I couldn't find it so far.
>
> Thanks for your help
> Philipp
>>>> I want to read some files from a certain directory and       
>>> write the results
>>>    
>>>> back in the same folder (in a subdirectory, to be more       
>>> exactly). (How)
>>>    
>>>> can I define parameters that are both accessible in a       
>>> CollectionReader
>>>    
>>>> and in a Cas Consumer? Or do I have to define the folder parameter
>>>> twice, first in the CollectionReaderXML and second in the       
>>> CasConsumerXML?
>>>    
>>>> Thanks for your help
>>>> Philipp
>>>>       
>>> Excellent question.  I tried to figure this out from our
>>> documentation and couldn't.  Anyone?
>>>     
>>
>> As a workaround, one could define the parameter in the CollectionReader
>> and add a document annotation that holds the path. The consumer then
>> reads the path from the document annotation, so it knows where to put
>> the results.
>>
>> -Torsten
>>
>>   
>


Mime
View raw message