uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thilo Goetz <twgo...@gmx.de>
Subject Re: Additional Runtime Arguments
Date Wed, 26 Nov 2008 13:27:23 GMT
Thomas Polzin wrote:
> I probably missed something in the documentation but here is my problem:
> I'm trying to process a pretty complex structured document and I do not
> want to translate the entire structure into annotations. Instead I would
> like to pass some object containing this additional structure to the
> respective analysis engines. Note that a static object will not work.
> Also, I do not want pass this object to the engines when they are
> constructed/initialized. The best solution I came up with so far is to
> subclass the CAS object and then to downcast to it in the process( CAS
> cas) function. Does this make sense? Is there a better solution?
> Thanks so much in advance
> Thomas

UIMA doesn't really support this.  The reason is that the UIMA
philosophy is that all data must live in the CAS.  Otherwise
your analysis is not portable, remotable etc.

Howsoever that may be, there are various ways you can get around
this restriction, if you really need to.  For example, if your
documents have a unique ID, you can write that into the CAS
somehow.  Then you could have a static factory where your
annotators can go and get the object for the document ID
they're working on.  Somehow, you also need to clear this cache
after processing has finished.

You should *not* subclass the CAS, for any number of reasons.


View raw message