Hi,

sorry for the delayed response... holidays...

yes, this is a stupid bug. The greedy anchoring is a rather new feature and I missed to add some unit tests combining it with composed (disjunctive/conjunctive) rule elements. Those exploit the normal rule inference as a look ahead by providing a null ruleApply.

I will fix it asap next week. Thanks for reporting it :-)

Best,

Peter

Am 24.12.2014 um 16:11 schrieb Valentin Tablan:
Hi,

I'm getting the following exception in RUTA:

[snip]
Caused by: java.lang.NullPointerException
at
org.apache.uima.ruta.rule.RutaRuleElement.isAlreadyCovered(RutaRuleElement.java:130)
at
org.apache.uima.ruta.rule.RutaRuleElement.startMatch(RutaRuleElement.java:62)
at
org.apache.uima.ruta.rule.ComposedRuleElement.startMatch(ComposedRuleElement.java:83)
at
org.apache.uima.ruta.rule.ComposedRuleElement.startMatch(ComposedRuleElement.java:73)
at org.apache.uima.ruta.rule.RutaRule.apply(RutaRule.java:47)
at org.apache.uima.ruta.rule.RutaRule.apply(RutaRule.java:40)
at org.apache.uima.ruta.rule.RutaRule.apply(RutaRule.java:29)
at org.apache.uima.ruta.RutaScriptBlock.apply(RutaScriptBlock.java:63)
at org.apache.uima.ruta.RutaModule.apply(RutaModule.java:48)
at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:494)
... 13 more



Going through the trace, I can't see how that could ever not cause an NPE:
ComposedRuleElement.java:83 calls startMatch(extendedMatch, null,
composedMatch, this, stream, crowd), providing null for ruleApply, which is
ultimately dereferenced at RutaRuleElement.java:130

Am I using some strange language construct that causes it to go down some
unexpected branch?

Thanks,
Valentin



Reply via email to