Question

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

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.

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.

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?

Was it helpful?

Solution

The problem is caused by the fact that the type system used by your analysis engine does not contain the types UIMA Ruta needs. The error mentions the seeding types because the initial annotations are added at the beginning. Even without seeding, more errors will occur because of the missing types like RutaBasic.

Adding the BasicTypeSystem to the type system used in your analysis engine should solve the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top