uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: passing additional metadata to Annotators along with CAS
Date Thu, 11 Jul 2013 21:57:35 GMT
UIMA doesn't really support this kind of use.  Examples of where the UIMA
"contract" would break include UIMA's ability to take an annotator and run it
remotely, in a transparent fashion. 

To support this kind of flexibility, the CAS is supposed to be the place where
data that needs to flow along with the CAS should go.

So, what about defining a new type, called for instance, x.y.z.MyMetadata, with
any UIMA features you wish, and then making one instance of that?


On 7/11/2013 5:22 PM, mathaeus wrote:
> Hi,
> I'm want to build an Aggregate AnalysisEngine where the Annotators need 
> additional metadata passed alongside with the CAS for processing. So when 
> calling the AggregateAnalysisEngine I would like to pass some metadata 
> cas = ae.newCAS();
> cas.setDocumentText(testSegment);
> cas.setMetadata(keyvaluePairs)
> ae.process(cas);
> and the Annotators have access to in their process() method.
> I looked at the getContext() method which is almost what I need with the 
> exception that I would need to set the context through code (at runtime) 
> rather than through a configuration file.
> Thanks for your help, Mathaeus

View raw message