uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josep María Formentí Serra <jmforme...@aia.es>
Subject UIMA Ruta - Conditional execution of a block
Date Mon, 26 Feb 2018 05:47:09 GMT
Hi all,

  I have this script in Ruta:

PACKAGE com.aia.tas.uima.types;
DECLARE ControlRuleDetection;
ANNOTATIONLIST anchors;
ANNOTATIONLIST values;
INTLIST positions;
BOOLEAN APL;
BOOLEAN BAD;
BLOCK(h) Header{} {
Document { -> APL = false };
a1:Attribute{ a1.code=="general.codapl", a1.ct=="CDO" -> APL = true};
}
BLOCK(p) Participant{} {
Document{ -> BAD=false, CLEAR(anchors), CLEAR(values), CLEAR(positions) };
m1:Mark{ m1.code=="BAD", m1.value=="Y" -> BAD=true, ADD(anchors, m1),
ADD(values, m1), ADD(positions, 1)};
p1:Document{APL, p1.isCustomer, BAD -> CREATE(ControlRuleDetection,
"anchors" = anchors, "values" = values, "positions" = positions)};
}


 where there are 2 BLOCKs, the 2th BLOCK should be only executed when
APL==true (calculated in first BLOCK).

 How could I do? another optimizations are welcome too.

BR,
  JM
-- 
------------------------------------------------------------------- --- --
- - -
*Grupo AIA* - *www.aia.es <http://www.aia.es> *
Josep Mª Formentí Serra       <jmformenti@aia.ptv.es>*jmformenti@aia.es
<jmformenti@aia.ptv.es>*
------------------------------------------------------------------- --- --
- - -
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.

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