uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wassim El-Kass <welk...@yahoo.com>
Subject Re: Ruta extension issue
Date Fri, 25 Oct 2013 11:17:29 GMT
Hello Peter,
 
Thank you very much for nailing down the issue. I had the right DECLARE syntax in my ruta
script but my Type System was not updated with the last Type I declared in my script. After
adding this manually, everything worked fine. 
BTW, I'm using the ruta eclipse Workbench and I noticed that my Type System gets updated
automatically when I save my ruta script but, for some reasons, this is not happening anymore.
I suspect it is because it treats my extension function as a syntax error at design time sine
I do not have the IDE extension for my function.
 
Thanks,
Wassim...



On Thursday, October 24, 2013 7:07:29 AM, Peter Klügl <pkluegl@uni-wuerzburg.de> wrote:
  
Hi,

On 24.10.2013 12:55, Wassim El-Kass wrote:
> Hello,
>  
> I'm not sure if this is the right place to discuss the problem I'm having (I apologize
if not). I created my own Ruta Boolean function based on the example in 

The user list would probably be the best spot, but it's also OK here.

> the ExampleProject in Ruta. I can use my condition to filter annotations and mark the
matching ones as a certain type. However, I'm getting the exception below when I subsequently
try to use the new type. Here is a simple example:
>  
> Declare MyType;
> CW { MyBoolCondition() -> MARK(MyType) };
>  
> Declare AnotherType;
> MyType { -> MARK(AnotherType) };
>  
> The last line in my example is generating the following exception. Any help is highly
appreciated.
>  

The exception indicates that the type is not resolved. The example you
have given contains syntax errors (Declare instead of DECLARE). In the
Workbench, there should be a problem because of the keyword "Declare",
which needs to be written all caps ("DECLARE"). Then, the generated type
system misses the declared types. However, it possible, but unlikely
that the rules are actually parsed, if the script contains syntax errors.

If just the example contains the wrong keyword, but not your actual
script, then you could take a look at the type system you are using. It
probably does not contain the types.

Best,

Peter




>  
> org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing
failed.    
>  at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:279)
>  at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
>  at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:375)
>  at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:296)
>  at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:567)
>  at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:409)
>  at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:342)
>  at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:267)
>  at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:267)
>  at org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.processNext(ProcessingUnit.java:897)
>  at org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.run(ProcessingUnit.java:577)
> Caused by: java.lang.NullPointerException
>  at org.apache.uima.cas.impl.CASImpl.createFS(CASImpl.java:474)
>  at org.apache.uima.cas.impl.CASImpl.createAnnotation(CASImpl.java:3916)
>  at org.apache.uima.ruta.action.AbstractMarkAction.createAnnotation(AbstractMarkAction.java:43)
>  at org.apache.uima.ruta.action.MarkAction.execute(MarkAction.java:58)
>  at org.apache.uima.ruta.rule.AbstractRuleElement.apply(AbstractRuleElement.java:84)
>  at org.apache.uima.ruta.rule.RuleElementCaretaker.applyRuleElements(RuleElementCaretaker.java:110)
>  at org.apache.uima.ruta.rule.ComposedRuleElement.applyRuleElements(ComposedRuleElement.java:271)
>  at org.apache.uima.ruta.rule.AbstractRuleElement.doneMatching(AbstractRuleElement.java:75)
>  at org.apache.uima.ruta.rule.ComposedRuleElement.fallback(ComposedRuleElement.java:201)
>  at org.apache.uima.ruta.rule.ComposedRuleElement.fallbackContinue(ComposedRuleElement.java:136)
>  at org.apache.uima.ruta.rule.RutaRuleElement.continueMatchSomewhereElse(RutaRuleElement.java:180)
>  at org.apache.uima.ruta.rule.RutaRuleElement.continueMatch(RutaRuleElement.java:219)
>  at org.apache.uima.ruta.rule.RutaRuleElement.startMatch(RutaRuleElement.java:79)
>  at org.apache.uima.ruta.rule.ComposedRuleElement.startMatch(ComposedRuleElement.java:58)
>  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:277)
>  ... 10 more
> org.apache.uima.analysis_engine.AnalysisEngineProcessException: Annotator processing
failed.    
>  at org.apache.uima.ruta.engine.RutaEngine.process(RutaEngine.java:279)
>  at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
>  at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:375)
>  at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:296)
>  at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:567)
>  at org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:409)
>  at org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:342)
>  at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:267)
>  at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:267)
>  at org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.processNext(ProcessingUnit.java:897)
>  at org.apache.uima.collection.impl.cpm.engine.ProcessingUnit.run(ProcessingUnit.java:577)
> Caused by: java.lang.NullPointerException
>  at org.apache.uima.cas.impl.CASImpl.createFS(CASImpl.java:474)
>  at org.apache.uima.cas.impl.CASImpl.createAnnotation(CASImpl.java:3916)
>  at org.apache.uima.ruta.action.AbstractMarkAction.createAnnotation(AbstractMarkAction.java:43)
>  at org.apache.uima.ruta.action.MarkAction.execute(MarkAction.java:58)
>  at org.apache.uima.ruta.rule.AbstractRuleElement.apply(AbstractRuleElement.java:84)
>  at org.apache.uima.ruta.rule.RuleElementCaretaker.applyRuleElements(RuleElementCaretaker.java:110)
>  at org.apache.uima.ruta.rule.ComposedRuleElement.applyRuleElements(ComposedRuleElement.java:271)
>  at org.apache.uima.ruta.rule.AbstractRuleElement.doneMatching(AbstractRuleElement.java:75)
>  at org.apache.uima.ruta.rule.ComposedRuleElement.fallback(ComposedRuleElement.java:201)
>  at org.apache.uima.ruta.rule.ComposedRuleElement.fallbackContinue(ComposedRuleElement.java:136)
>  at org.apache.uima.ruta.rule.RutaRuleElement.continueMatchSomewhereElse(RutaRuleElement.java:180)
>  at org.apache.uima.ruta.rule.RutaRuleElement.continueMatch(RutaRuleElement.java:219)
>  at org.apache.uima.ruta.rule.RutaRuleElement.startMatch(RutaRuleElement.java:79)
>  at org.apache.uima.ruta.rule.ComposedRuleElement.startMatch(ComposedRuleElement.java:58)
>  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:277)
>  ... 10 more
>
> Thanks,
> Wassim...
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message