uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kl├╝gl <pklu...@uni-wuerzburg.de>
Subject Re: Using Apache UIMA Ruta from my own annotator
Date Tue, 18 Mar 2014 12:56:30 GMT

my first guess is that you need to add the Ruta type system
(BasicTypeSystem, which imports InternalTypeSystem) to your analysis
engine or to your type system, depending how you run your pipeline or
create the CAS to be processed.

More comments below...

Am 18.03.2014 13:37, schrieb James Baker:
> Hi,
> I have a series of UIMA Ruta rules that I wish to run from within my own
> UIMA annotator. This is described here, but I can't get it to work:
> http://uima.apache.org/d/ruta-current/tools.ruta.book.html#ugr.tools.ruta.integration

I will add a mention about the type system to the documentation.

> When I try to run the annotator (from within a JUnit test, which I have
> used with other UIMA annotators successfully in the past), I get an error
> telling me that one of the Ruta basic annotation types
> (org.apache.uima.ruta.type.TokenSeed) is used in the Java code but isn't
> defined in the XML.

TokenSeed annotations are used be the default lexer/tokenizer of Ruta.
If you do not need these annotations, you can deactivate it by removing
the value in the configuration parameter "seeders". The problem is
caused by the fact that Ruta operates on the given CAS, but the type
system used in the CAS does not contain the types Ruta needs for
processing. The seeding/tokenizer is one of the first operations and
thus the problem occurs there first.

> I've added the absolute path to the Ruta type system (BasicTypeSystem.xml
> and InternalTypeSystem.xml) to the descriptorPaths parameter (as detailed
> here:
> http://uima.apache.org/d/ruta-current/tools.ruta.book.html#ugr.tools.ruta.ae.basic.parameter.descriptorPaths),
> but that doesn't seem to make a difference.

This configuration parameter is only a set of lookup folders where the
system tries to find imported stuff. The type system needs however to be
specified before the analysis engine processes a CAS. In short, it won't
help to add the type system descriptors there, but rather in the
analysis engine descriptor that is applied for processing the CAS.

> I've had a look through the Ruta source code and couldn't figure out where
> I was going wrong.
> Has anyone successfully got a Ruta script to run from within a UIMA
> annotator? How did you manage to get it working?

Should work just fine.



> Thanks,
> James
> P.S. This question has also been posted here:
> http://stackoverflow.com/questions/22479510/using-apache-uima-ruta-from-my-own-annotator

View raw message