You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Nikolai Krot <ta...@gmail.com> on 2019/06/18 23:23:39 UTC

Modularizing RUTA rules

Hi,

I am trying to split large ruleset (Main.ruta) into several smaller and
then work with them in the normal fashion

SCRIPT path.to.my.Script1;
SCRIPT path.to.my.Script2;

CALL(Script1);
CALL(Script2);

I have some common part that should be done before calling Script1 and
Script2. This common part includes definition of a number of CONDITION
statements. Looks like this constructs are not available in included
scripts. I receive an error a la

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
Script1, line 14, "(": expected OPTIONAL, but found LPAREN

that hits just before the construction is used. As soon as I copy the
CONDITION statement to the Script1, the error disappears.

The question is how to make these statements available to the included
scripts? What if I extract them into a dedicated ruta script, can I then
import them in all scripts that use them: Main, Script1 and Script2? In a
way similar to TYPESYSTEM

Thank you in advance.

Best regards,
Nikolai

Re: Modularizing RUTA rules

Posted by Peter Klügl <pe...@averbis.com>.
Hi,


unfortunately, the import of macro definitions is not yet supported.
Right now, you need to copy them.


Best,


Peter


Am 19.06.2019 um 01:23 schrieb Nikolai Krot:
> Hi,
>
> I am trying to split large ruleset (Main.ruta) into several smaller and
> then work with them in the normal fashion
>
> SCRIPT path.to.my.Script1;
> SCRIPT path.to.my.Script2;
>
> CALL(Script1);
> CALL(Script2);
>
> I have some common part that should be done before calling Script1 and
> Script2. This common part includes definition of a number of CONDITION
> statements. Looks like this constructs are not available in included
> scripts. I receive an error a la
>
> 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
> Script1, line 14, "(": expected OPTIONAL, but found LPAREN
>
> that hits just before the construction is used. As soon as I copy the
> CONDITION statement to the Script1, the error disappears.
>
> The question is how to make these statements available to the included
> scripts? What if I extract them into a dedicated ruta script, can I then
> import them in all scripts that use them: Main, Script1 and Script2? In a
> way similar to TYPESYSTEM
>
> Thank you in advance.
>
> Best regards,
> Nikolai
>
-- 
Dr. Peter Klügl
R&D Text Mining/Machine Learning

Averbis GmbH
Salzstr. 15
79098 Freiburg
Germany

Fon: +49 761 708 394 0
Fax: +49 761 708 394 10
Email: peter.kluegl@averbis.com
Web: https://averbis.com

Headquarters: Freiburg im Breisgau
Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó