uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Himanshu Shivhare-Crimson Interactive <himanshu.shivh...@crimsoni.com>
Subject UIMA RUTA script with stringfunctions doesnt work when executing from UIMA-Fit
Date Thu, 08 Sep 2016 10:19:34 GMT
Hi,

I am trying to execute a simple example Ruta script (from the 
documentation) from a UIMA fit pipeline with some DKPro annotators.

|STRING s; BOOLEAN a; STRING s2 = "LAuGH"; DECLARE Test; BLOCK(forEACH) 
W{}{ W{->MATCHEDTEXT(s), ASSIGN(a,equals(s,s2))}; W{->MATCHEDTEXT(s), 
ASSIGN(a,equalsIgnoreCase(s,s2))}; W{a ->Test}; } |

This script works fine when executing it as a standalone script with a 
separate RUTA project and the Test annotation is created. However, in a 
java project with a UIMA fit pipeline, I get the following error:

|Sep 08, 2016 1:49:14 PM 
de.tudarmstadt.ukp.dkpro.core.api.io.ResourceCollectionReaderBase 
scan(393) INFO: Scanning 
[file:/home/himanshu_shivhare/workspace/annotate_ruta_example-master/src/main/resources/data/]

Sep 08, 2016 1:49:14 PM 
de.tudarmstadt.ukp.dkpro.core.api.io.ResourceCollectionReaderBase 
initialize(224) INFO: Found [1] resources to be read Exception in thread 
"main" org.apache.uima.resource.ResourceInitializationException: 
Initialization of annotator class 
"org.apache.uima.ruta.engine.RutaEngine" failed. (Descriptor: <unknown>) 
at 
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:271)

at 
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:170)

at 
org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)

at 
org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)

at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:279) 
at 
org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:407) 
at 
org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_impl.java:256) 
at 
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB(AggregateAnalysisEngine_impl.java:429)

at 
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:373)

at 
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:186)

at 
org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)

at 
org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)

at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:279) 
at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:331) 
at 
org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:448) 
at 
org.apache.uima.fit.factory.AnalysisEngineFactory.createEngine(AnalysisEngineFactory.java:205)

at 
org.apache.uima.fit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:82) 
at example.Annotate.main(Annotate.java:49) Caused by: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in 
Example, line 28, "(": found no viable alternative at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:393) 
at 
org.apache.uima.ruta.parser.RutaParser.file_input(RutaParser.java:726) 
at 
org.apache.uima.ruta.engine.RutaEngine.loadScript(RutaEngine.java:1087) 
at 
org.apache.uima.ruta.engine.RutaEngine.initializeScript(RutaEngine.java:756) 
at 
org.apache.uima.ruta.engine.RutaEngine.initialize(RutaEngine.java:530) 
at 
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:266)

... 17 more Caused by: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in 
Example, line 28, "(": found no viable alternative at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:393) 
at 
org.apache.uima.ruta.parser.RutaParser.statements(RutaParser.java:825) 
at 
org.apache.uima.ruta.parser.RutaParser.file_input(RutaParser.java:712) 
... 21 more Caused by: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in 
Example, line 28, "(": found no viable alternative at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:393) 
at 
org.apache.uima.ruta.parser.RutaParser.statement(RutaParser.java:1038) 
at 
org.apache.uima.ruta.parser.RutaParser.statements(RutaParser.java:804) 
... 22 more Caused by: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in 
Example, line 28, "(": found no viable alternative at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:393) 
at 
org.apache.uima.ruta.parser.RutaParser.blockDeclaration(RutaParser.java:2940) 
at 
org.apache.uima.ruta.parser.RutaParser.statement(RutaParser.java:1010) 
... 23 more Caused by: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in 
Example, line 28, "(": found no viable alternative at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:393) 
at 
org.apache.uima.ruta.parser.RutaParser.statements(RutaParser.java:825) 
at 
org.apache.uima.ruta.parser.RutaParser.blockDeclaration(RutaParser.java:2921) 
... 24 more Caused by: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in 
Example, line 28, "(": found no viable alternative at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:393) 
at 
org.apache.uima.ruta.parser.RutaParser.statement(RutaParser.java:1038) 
at 
org.apache.uima.ruta.parser.RutaParser.statements(RutaParser.java:804) 
... 25 more Caused by: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in 
Example, line 28, "(": found no viable alternative at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:393) 
at 
org.apache.uima.ruta.parser.RutaParser.simpleStatement(RutaParser.java:3266) 
at 
org.apache.uima.ruta.parser.RutaParser.statement(RutaParser.java:1000) 
... 26 more Caused by: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in 
Example, line 28, "(": found no viable alternative at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:393) 
at 
org.apache.uima.ruta.parser.RutaParser.ruleElementsRoot(RutaParser.java:3796) 
at 
org.apache.uima.ruta.parser.RutaParser.simpleStatement(RutaParser.java:3250) 
... 27 more Caused by: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in 
Example, line 28, "(": found no viable alternative at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:393) 
at 
org.apache.uima.ruta.parser.RutaParser.ruleElement(RutaParser.java:4156) 
at 
org.apache.uima.ruta.parser.RutaParser.ruleElementsRoot(RutaParser.java:3739) 
... 28 more Caused by: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in 
Example, line 28, "(": found no viable alternative at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:393) 
at 
org.apache.uima.ruta.parser.RutaParser.ruleElementType(RutaParser.java:4722) 
at 
org.apache.uima.ruta.parser.RutaParser.ruleElement(RutaParser.java:3994) 
... 29 more Caused by: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in 
Example, line 28, "(": found no viable alternative at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:393) 
at org.apache.uima.ruta.parser.RutaParser.actions(RutaParser.java:5106) 
at 
org.apache.uima.ruta.parser.RutaParser.ruleElementType(RutaParser.java:4688) 
... 30 more Caused by: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in 
Example, line 28, "(": found no viable alternative at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:393) 
at org.apache.uima.ruta.parser.RutaParser.action(RutaParser.java:11623) 
at org.apache.uima.ruta.parser.RutaParser.actions(RutaParser.java:5085) 
... 31 more Caused by: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in 
Example, line 28, "(": found no viable alternative at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:393) 
at 
org.apache.uima.ruta.parser.RutaParser.actionAssign(RutaParser.java:14714) 
at org.apache.uima.ruta.parser.RutaParser.action(RutaParser.java:11305) 
... 32 more Caused by: 
org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in 
Example, line 28, "(": found no viable alternative at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:358) 
at 
org.apache.uima.ruta.parser.RutaParser.emitErrorMessage(RutaParser.java:372) 
at 
org.apache.uima.ruta.parser.RutaParser.booleanExpression(RutaParser.java:19535) 
at 
org.apache.uima.ruta.parser.RutaParser.actionAssign(RutaParser.java:14631) 
... 33 more |

The script fails to parse, which is strange. I am using the latest 
version of ruta-core from the maven repo (2.4.0). Any help will be 
great. Thanks.


-- 
Thanks
Himanshu


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