uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Eckart de Castilho <...@apache.org>
Subject Re: Dynamically configure Sofa to be processed
Date Thu, 29 Sep 2016 16:01:23 GMT
Hi Asher,

I don't think UIMA provides a straightforward way for dynamically
changing sofa mappings while a workflow/pipeline is being processed.

It is assumed that either components are sofa-aware and can
choose themselves which views they process - or if they are
not sofa-aware, then they process whatever is mapped to the

Even a sofa-aware component with some parameter that would allow 
to configure the view to process would at least need to be "reconfigured"
to change that parameter to a different view.

It might be possible to reinitialize a component to work on a different
view by calling initialize() and passing a UimaContext parameter there
in the additional parameters map in which you set up a mapping from
some view to the "_InitialView".


-- Richard

> On 29.09.2016, at 15:36, Asher Stern <astern7@gmail.com> wrote:
> Hi all.
> I wanted to ask a question.
> Using UimaFit, how to tell an analysis engine, which is unaware of Sofas,
> to process a specific Sofa, without changing its code, after that engine
> has been created?
> I mean:
> I have an analysis engine that operates over the CAS. It uses
> JCas#getDocumentText() to take the data. It is unaware of Sofas.
> I want that engine to process a specific Sofa (a specific view).
> I know that when the engine is being created (using
> AnalysisEngineFactory#createEngine) I can provide a parameter with the
> default view, which makes the engine process that view (instead of
> _InitialView).
> However, I want *the same engine* to process several Sofas (separately),
> and I don't want to create an instance of the engine again and again for
> each Sofa. I need some way to tell the engine that in the next call to
> process() it shall process a specific Sofa.
> When I just call process() with either the CAS or a specific view as
> parameter, it processes the default view (_InitialView). Question is, how
> to guide it to process another view.
> Many thanks in advance,
> Asher

View raw message