uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaroslaw Cwiklik <cwik...@us.ibm.com>
Subject Re: POJOing uima, is it possible?
Date Thu, 24 Jan 2008 18:08:21 GMT

I am not aware of anyone trying such initialization approach for the CPM,
but this should be doable. Two issues here

1) how to configure the CPM using spring xml
2) how to start processing of the CPM deployed in the Spring Container.

1) The cpm can be configured programatically. I think there are examples in
the programmer's guide. So you can create a Spring wrapper
(with setter methods) that you can populate in spring xml. Add spring
init-method on the wrapper bean which gets called by Spring when all the
setter methods
complete and intialize the cpm. The initialization of the cpm is
synchronous. Meaning that the Spring  container instantiates all the beans
sequentially, based
on dependencies you setup in spring xml. Once all the beans are created and
initialized the container returns controll to the client.

2) Once the Spring container deploys all the beans ( and consequently the
CPM), you can query the container for an instance of
your cpm wrapper ( by bean id or class name) and call a method that will
start the CPM.


Jerry Cwiklik
 UIMA Extensions
 IBM T.J.  Watson Research Center
 Hawtorne, NY, 10532
 Tel: 914-784-7665,  T/L: 863-7665
 Email: cwiklik@us.ibm.com

             <ro.franchini@gma                                          To 
             il.com>                   uima-user@incubator.apache.org      
             01/24/2008 11:09                                              
             AM                                                    Subject 
                                       Re: POJOing uima, is it possible?   
             Please respond to                                             

On Jan 24, 2008 4:02 PM, Jaroslaw Cwiklik <cwiklik@us.ibm.com> wrote:
> Not sure if I fully grasp what you are trying to do.
>  <bean name="normalizer" class="it.celi.uima.engine.RegExpNormalizer">
>  <property name="aProperty" value="value"/>
>  <property name="anotherProperty" value="anotherValue"/>
>        </bean>
>  <bean name="uima" class="it.celi.uima.engine.CpmUIMAEngine">
>  [cut]
>  <property name="analisysDescriptors">
>  <description>The pipeline of analysis: analysis engines, aggregates
>  and pears descriptors allowed</description>
>  <list>
>  <ref bean="normalizer"/>
>  </list>
>  </property>
>  In the above you are specifying spring beans which are wrappers (I
> around uima components. The uima spring bean
>  under the covers crates an instance of the cpm ( I presume). What I dont
> see is how you are initializing the cpm engine. I only
>  see the AE being plugged in (the normalizer).

This snippet is what I would, not what i have :(

The previous xml snippet is what I have now: CPM or aggregate analysis
wrapper that parses UIMA XML descriptors and the add
Processors/consumers to a CPM or AAE.

Now i want to simplyfy the configuration and configuring ALL
components in the spring xml format.
The better way would be instatntiating annotars as beans and add theme
to a cpm/cpe.
MAybe I should implements a cpm that allows this way of deployment.
I watched at uima source, but i didn't find a way to do this (and i
don'y know if it is possible!)

>  Incidentally, we are working on a replacement for the cpm that uses
> extensively. The new approach is based on asynchronous
>  architecture using JMS ( ActiveMQ specifically) for transport.
This is very interesting. I read about it on the wiki and maybe on the ml.

Roberto Franchini
CELI s.r.l.  (http://www.celi.it) - C.so Moncalieri 21 - 10131 Torino -
Tel +39-011-6600814 - Fax +39-011-6600687
jabber:ro.franchini@gmail.com skype:ro.franchini

  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message