Hi Spiros,

There are many alternatives... 

UIMA chooses to normally favor performance, so it has a "compile" then "run"
design, as you note.

Here are some ways to work around this.

1) Design a runtime - flexible type.  The basic idea is to have this type keep a
level of indirection to the name - value pair(s), normally associated with UIMA
Features and their values.  For instance, you could have an array of Strings
(for the names) and an associated array of values.

2) If you have a lifecycle where you can determine what the additional features
needed are before you start your pipeline, you don't need to "compile" things -
you can use the UIMA APIs to add those features to the type system before you
produce your pipeline.   You might think you need to "compile" the associated
JCas methods, but UIMA provides a generic non-JCas API for accessing the CAS,
driven by Types and Features which can be discovered at initialization time (of
the pipeline) by your annotators.

Of course, then you can't use JCas access methods, but you wouldn't be using
those anyways, I'm guessing for these "new" features, because at the time you
wrote the annotator code, you were unaware of these feature's existance.

Does this help at all?


-Marshall

On 3/17/2017 7:12 AM, Spiros Meliopoulos wrote:
> Hello uima world!
>
> I am a new user of the framework and I need some help.
>
> Let's say that I have a service that I pass to it text and it returns an
> object (org.mozilla.javascript.NativeObject) with some properties and
> values.
>
> So far, I have a way for annotators to work with selected parts
> (types/features) of that data by using an xml and jcasgen to create the
> necessary classes (features).
>
> In case response (NativeObject) includes a new property, I have to add in
> the xml and compile the project.
>
> Is there a way to make the whole process happen in runtime? In short, can
> we avoid recompile;
>
> thank you all in advance
>
> Spiros G. Meliopoulos | Software Engineer  | skype: spiros.meliopoulos
>

Reply via email to