The document is ambiguous, use one of the following instead: org.apache.uima.ruta.type.Document uima.tcas.DocumentAnnotation

I use the Ruta annotation frame to annotate input text earlier when I used the Ruta script from the classpath. But in accordance with the client’s requirement, we are forced to leave the Ruta script outside the code, all this must be separated from the system. I am available to achieve all this. What I do is during system startup. I read the whole resource of the kernel and scripts and cache in the gaugle gauvas cache, everything works fine. The only problem is to ever run batches (parallel processes). Ruta Framework./p structure exception

See stack trace below.

Caused by: java.lang.IllegalArgumentException: Document is ambiguous, use one of the following instead : org.apache.uima.ruta.type.Document uima.tcas.DocumentAnnotation at org.apache.uima.ruta.RutaEnvironment.getType(RutaEnvironment.java:367) at org.apache.uima.ruta.RutaEnvironment.getType(RutaEnvironment.java:376) at org.apache.uima.ruta.RutaEnvironment.getType(RutaEnvironment.java:376) at org.apache.uima.ruta.expression.type.SimpleTypeExpression.getType(SimpleTypeExpression.java:45) at org.apache.uima.ruta.rule.RutaTypeMatcher.getType(RutaTypeMatcher.java:247) at org.apache.uima.ruta.rule.RutaTypeMatcher.getTypes(RutaTypeMatcher.java:262) at org.apache.uima.ruta.rule.RutaTypeMatcher.getMatchingAnnotations(RutaTypeMatcher.java:58) at org.apache.uima.ruta.rule.RutaRuleElement.getAnchors(RutaRuleElement.java:52) at org.apache.uima.ruta.rule.RutaRuleElement.startMatch(RutaRuleElement.java:59) 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.RutaScriptBlock.apply(RutaScriptBlock.java:63) at org.apache.uima.ruta.action.CallAction.callScript(CallAction.java:96) at org.apache.uima.ruta.action.CallAction.execute(CallAction.java:78) at org.apache.uima.ruta.rule.AbstractRuleElement.apply(AbstractRuleElement.java:130) at org.apache.uima.ruta.rule.RuleElementCaretaker.applyRuleElements(RuleElementCaretaker.java:111) at org.apache.uima.ruta.rule.ComposedRuleElement.applyRuleElements(ComposedRuleElement.java:554) at org.apache.uima.ruta.rule.AbstractRuleElement.doneMatching(AbstractRuleElement.java:84) at org.apache.uima.ruta.rule.ComposedRuleElement.fallback(ComposedRuleElement.java:475) at org.apache.uima.ruta.rule.ComposedRuleElement.fallbackContinue(ComposedRuleElement.java:384) at org.apache.uima.ruta.rule.RutaRuleElement.startMatch(RutaRuleElement.java:100) 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:477) ... 22 more

PS: I encounter this problem when I run batches not for one instance;

+4
1

, NUM, SPECIAL .. bibtex ruta rutaEngine, 1 ( Year script). DKPro core.opennlp.OpenNlpSegmenter. script , :

Caused by: java.lang.IllegalArgumentException: NUM is ambiguous, use one of 
the following instead : de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.NUM 
org.apache.uima.ruta.type.NUM 
at org.apache.uima.ruta.RutaEnvironment.getType(RutaEnvironment.java:459)

, "" (, "" ) , "aaa" → Marker. " : RUTA, "" .

0

Source: https://habr.com/ru/post/1661798/


All Articles