Merge branch 'RED-7901' into 'master'
RED-7901: Changed rules to remove all recommendations that intersect with entities Closes RED-7901 See merge request redactmanager/redaction-service!260
This commit is contained in:
commit
34557c7cff
@ -934,26 +934,36 @@ rule "X.3.0: Remove Entity of type RECOMMENDATION when contained by FALSE_RECOMM
|
|||||||
|
|
||||||
|
|
||||||
// Rule unit: X.4
|
// Rule unit: X.4
|
||||||
rule "X.4.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY with same type"
|
rule "X.4.0: Remove Entity of type RECOMMENDATION when text range equals ENTITY with same type"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(intersects($entity), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(getTextRange().equals($entity.getTextRange()), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$entity.addEngines($recommendation.getEngines());
|
$entity.addEngines($recommendation.getEngines());
|
||||||
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY with same type");
|
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when text range equals ENTITY with same type");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: X.5
|
// Rule unit: X.5
|
||||||
rule "X.5.0: Remove Entity of type RECOMMENDATION when contained by ENTITY"
|
rule "X.5.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(containedBy($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(intersects($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when contained by ENTITY");
|
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY");
|
||||||
|
retract($recommendation);
|
||||||
|
end
|
||||||
|
|
||||||
|
rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATION"
|
||||||
|
salience 256
|
||||||
|
when
|
||||||
|
$entity: TextEntity($type: type, entityType == EntityType.RECOMMENDATION, active())
|
||||||
|
$recommendation: TextEntity(containedBy($entity), type != $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
|
then
|
||||||
|
$recommendation.remove("X.5.1", "remove Entity of type RECOMMENDATION when contained by RECOMMENDATION");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1504,26 +1504,36 @@ rule "X.3.0: Remove Entity of type RECOMMENDATION when contained by FALSE_RECOMM
|
|||||||
|
|
||||||
|
|
||||||
// Rule unit: X.4
|
// Rule unit: X.4
|
||||||
rule "X.4.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY with same type"
|
rule "X.4.0: Remove Entity of type RECOMMENDATION when text range equals ENTITY with same type"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(intersects($entity), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(getTextRange().equals($entity.getTextRange()), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$entity.addEngines($recommendation.getEngines());
|
$entity.addEngines($recommendation.getEngines());
|
||||||
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY with same type");
|
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when text range equals ENTITY with same type");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: X.5
|
// Rule unit: X.5
|
||||||
rule "X.5.0: Remove Entity of type RECOMMENDATION when contained by ENTITY"
|
rule "X.5.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(containedBy($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(intersects($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when contained by ENTITY");
|
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY");
|
||||||
|
retract($recommendation);
|
||||||
|
end
|
||||||
|
|
||||||
|
rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATION"
|
||||||
|
salience 256
|
||||||
|
when
|
||||||
|
$entity: TextEntity($type: type, entityType == EntityType.RECOMMENDATION, active())
|
||||||
|
$recommendation: TextEntity(containedBy($entity), type != $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
|
then
|
||||||
|
$recommendation.remove("X.5.1", "remove Entity of type RECOMMENDATION when contained by RECOMMENDATION");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1346,26 +1346,36 @@ rule "X.3.0: Remove Entity of type RECOMMENDATION when contained by FALSE_RECOMM
|
|||||||
|
|
||||||
|
|
||||||
// Rule unit: X.4
|
// Rule unit: X.4
|
||||||
rule "X.4.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY with same type"
|
rule "X.4.0: Remove Entity of type RECOMMENDATION when text range equals ENTITY with same type"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(intersects($entity), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(getTextRange().equals($entity.getTextRange()), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$entity.addEngines($recommendation.getEngines());
|
$entity.addEngines($recommendation.getEngines());
|
||||||
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY with same type");
|
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when text range equals ENTITY with same type");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: X.5
|
// Rule unit: X.5
|
||||||
rule "X.5.0: Remove Entity of type RECOMMENDATION when contained by ENTITY"
|
rule "X.5.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(containedBy($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(intersects($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when contained by ENTITY");
|
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY");
|
||||||
|
retract($recommendation);
|
||||||
|
end
|
||||||
|
|
||||||
|
rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATION"
|
||||||
|
salience 256
|
||||||
|
when
|
||||||
|
$entity: TextEntity($type: type, entityType == EntityType.RECOMMENDATION, active())
|
||||||
|
$recommendation: TextEntity(containedBy($entity), type != $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
|
then
|
||||||
|
$recommendation.remove("X.5.1", "remove Entity of type RECOMMENDATION when contained by RECOMMENDATION");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -220,6 +220,20 @@ rule "MAN.4.1: Apply legal basis change"
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
//------------------------------------ Entity merging rules ------------------------------------
|
||||||
|
|
||||||
|
// Rule unit: X.5
|
||||||
|
rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATION"
|
||||||
|
salience 256
|
||||||
|
when
|
||||||
|
$entity: TextEntity($type: type, entityType == EntityType.RECOMMENDATION, active())
|
||||||
|
$recommendation: TextEntity(containedBy($entity), type != $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
|
then
|
||||||
|
$recommendation.remove("X.5.1", "remove Entity of type RECOMMENDATION when contained by RECOMMENDATION");
|
||||||
|
retract($recommendation);
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------ Local dictionary search rules ------------------------------------
|
//------------------------------------ Local dictionary search rules ------------------------------------
|
||||||
|
|
||||||
// Rule unit: LDS.0
|
// Rule unit: LDS.0
|
||||||
|
|||||||
@ -1094,26 +1094,36 @@ rule "X.3.0: Remove Entity of type RECOMMENDATION when contained by FALSE_RECOMM
|
|||||||
|
|
||||||
|
|
||||||
// Rule unit: X.4
|
// Rule unit: X.4
|
||||||
rule "X.4.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY with same type"
|
rule "X.4.0: Remove Entity of type RECOMMENDATION when text range equals ENTITY with same type"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(intersects($entity), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(getTextRange().equals($entity.getTextRange()), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$entity.addEngines($recommendation.getEngines());
|
$entity.addEngines($recommendation.getEngines());
|
||||||
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY with same type");
|
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when text range equals ENTITY with same type");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: X.5
|
// Rule unit: X.5
|
||||||
rule "X.5.0: Remove Entity of type RECOMMENDATION when contained by ENTITY"
|
rule "X.5.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(containedBy($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(intersects($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when contained by ENTITY");
|
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY");
|
||||||
|
retract($recommendation);
|
||||||
|
end
|
||||||
|
|
||||||
|
rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATION"
|
||||||
|
salience 256
|
||||||
|
when
|
||||||
|
$entity: TextEntity($type: type, entityType == EntityType.RECOMMENDATION, active())
|
||||||
|
$recommendation: TextEntity(containedBy($entity), type != $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
|
then
|
||||||
|
$recommendation.remove("X.5.1", "remove Entity of type RECOMMENDATION when contained by RECOMMENDATION");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -300,26 +300,36 @@ rule "X.3.0: Remove Entity of type RECOMMENDATION when contained by FALSE_RECOMM
|
|||||||
|
|
||||||
|
|
||||||
// Rule unit: X.4
|
// Rule unit: X.4
|
||||||
rule "X.4.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY with same type"
|
rule "X.4.0: Remove Entity of type RECOMMENDATION when text range equals ENTITY with same type"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(intersects($entity), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(getTextRange().equals($entity.getTextRange()), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$entity.addEngines($recommendation.getEngines());
|
$entity.addEngines($recommendation.getEngines());
|
||||||
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY with same type");
|
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when text range equals ENTITY with same type");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: X.5
|
// Rule unit: X.5
|
||||||
rule "X.5.0: Remove Entity of type RECOMMENDATION when contained by ENTITY"
|
rule "X.5.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(containedBy($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(intersects($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when contained by ENTITY");
|
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY");
|
||||||
|
retract($recommendation);
|
||||||
|
end
|
||||||
|
|
||||||
|
rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATION"
|
||||||
|
salience 256
|
||||||
|
when
|
||||||
|
$entity: TextEntity($type: type, entityType == EntityType.RECOMMENDATION, active())
|
||||||
|
$recommendation: TextEntity(containedBy($entity), type != $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
|
then
|
||||||
|
$recommendation.remove("X.5.1", "remove Entity of type RECOMMENDATION when contained by RECOMMENDATION");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -410,26 +410,36 @@ rule "X.3.0: Remove Entity of type RECOMMENDATION when contained by FALSE_RECOMM
|
|||||||
|
|
||||||
|
|
||||||
// Rule unit: X.4
|
// Rule unit: X.4
|
||||||
rule "X.4.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY with same type"
|
rule "X.4.0: Remove Entity of type RECOMMENDATION when text range equals ENTITY with same type"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(intersects($entity), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(getTextRange().equals($entity.getTextRange()), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$entity.addEngines($recommendation.getEngines());
|
$entity.addEngines($recommendation.getEngines());
|
||||||
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY with same type");
|
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when text range equals ENTITY with same type");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: X.5
|
// Rule unit: X.5
|
||||||
rule "X.5.0: Remove Entity of type RECOMMENDATION when contained by ENTITY"
|
rule "X.5.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(containedBy($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(intersects($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when contained by ENTITY");
|
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY");
|
||||||
|
retract($recommendation);
|
||||||
|
end
|
||||||
|
|
||||||
|
rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATION"
|
||||||
|
salience 256
|
||||||
|
when
|
||||||
|
$entity: TextEntity($type: type, entityType == EntityType.RECOMMENDATION, active())
|
||||||
|
$recommendation: TextEntity(containedBy($entity), type != $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
|
then
|
||||||
|
$recommendation.remove("X.5.1", "remove Entity of type RECOMMENDATION when contained by RECOMMENDATION");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -326,26 +326,36 @@ rule "X.3.0: Remove Entity of type RECOMMENDATION when contained by FALSE_RECOMM
|
|||||||
|
|
||||||
|
|
||||||
// Rule unit: X.4
|
// Rule unit: X.4
|
||||||
rule "X.4.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY with same type"
|
rule "X.4.0: Remove Entity of type RECOMMENDATION when text range equals ENTITY with same type"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(intersects($entity), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(getTextRange().equals($entity.getTextRange()), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$entity.addEngines($recommendation.getEngines());
|
$entity.addEngines($recommendation.getEngines());
|
||||||
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY with same type");
|
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when text range equals ENTITY with same type");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: X.5
|
// Rule unit: X.5
|
||||||
rule "X.5.0: Remove Entity of type RECOMMENDATION when contained by ENTITY"
|
rule "X.5.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(containedBy($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(intersects($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when contained by ENTITY");
|
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY");
|
||||||
|
retract($recommendation);
|
||||||
|
end
|
||||||
|
|
||||||
|
rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATION"
|
||||||
|
salience 256
|
||||||
|
when
|
||||||
|
$entity: TextEntity($type: type, entityType == EntityType.RECOMMENDATION, active())
|
||||||
|
$recommendation: TextEntity(containedBy($entity), type != $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
|
then
|
||||||
|
$recommendation.remove("X.5.1", "remove Entity of type RECOMMENDATION when contained by RECOMMENDATION");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1525,26 +1525,38 @@ rule "X.3.0: Remove Entity of type RECOMMENDATION when contained by FALSE_RECOMM
|
|||||||
|
|
||||||
|
|
||||||
// Rule unit: X.4
|
// Rule unit: X.4
|
||||||
rule "X.4.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY with same type"
|
rule "X.4.0: Remove Entity of type RECOMMENDATION when text range equals ENTITY with same type"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(intersects($entity), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(getTextRange().equals($entity.getTextRange()), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$entity.addEngines($recommendation.getEngines());
|
$entity.addEngines($recommendation.getEngines());
|
||||||
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY with same type");
|
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when text range equals ENTITY with same type");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: X.5
|
// Rule unit: X.5
|
||||||
rule "X.5.0: Remove Entity of type RECOMMENDATION when contained by ENTITY"
|
rule "X.5.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(containedBy($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(intersects($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when contained by ENTITY");
|
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY");
|
||||||
|
retract($recommendation);
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
// Rule unit: X.5
|
||||||
|
rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATION"
|
||||||
|
salience 256
|
||||||
|
when
|
||||||
|
$entity: TextEntity($type: type, entityType == EntityType.RECOMMENDATION, active())
|
||||||
|
$recommendation: TextEntity(containedBy($entity), type != $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
|
then
|
||||||
|
$recommendation.remove("X.5.1", "remove Entity of type RECOMMENDATION when contained by RECOMMENDATION");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1492,26 +1492,38 @@ rule "X.3.0: Remove Entity of type RECOMMENDATION when contained by FALSE_RECOMM
|
|||||||
|
|
||||||
|
|
||||||
// Rule unit: X.4
|
// Rule unit: X.4
|
||||||
rule "X.4.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY with same type"
|
rule "X.4.0: Remove Entity of type RECOMMENDATION when text range equals ENTITY with same type"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity($type: type, (entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(intersects($entity), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(getTextRange().equals($entity.getTextRange()), type == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$entity.addEngines($recommendation.getEngines());
|
$entity.addEngines($recommendation.getEngines());
|
||||||
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY with same type");
|
$recommendation.remove("X.4.0", "remove Entity of type RECOMMENDATION when text range equals ENTITY with same type");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
// Rule unit: X.5
|
// Rule unit: X.5
|
||||||
rule "X.5.0: Remove Entity of type RECOMMENDATION when contained by ENTITY"
|
rule "X.5.0: Remove Entity of type RECOMMENDATION when intersected by ENTITY"
|
||||||
salience 256
|
salience 256
|
||||||
when
|
when
|
||||||
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
$entity: TextEntity((entityType == EntityType.ENTITY || entityType == EntityType.HINT), active())
|
||||||
$recommendation: TextEntity(containedBy($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
$recommendation: TextEntity(intersects($entity), entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
then
|
then
|
||||||
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when contained by ENTITY");
|
$recommendation.remove("X.5.0", "remove Entity of type RECOMMENDATION when intersected by ENTITY");
|
||||||
|
retract($recommendation);
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
// Rule unit: X.5
|
||||||
|
rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATION"
|
||||||
|
salience 256
|
||||||
|
when
|
||||||
|
$entity: TextEntity($type: type, entityType == EntityType.RECOMMENDATION, active())
|
||||||
|
$recommendation: TextEntity(containedBy($entity), type != $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges(), active())
|
||||||
|
then
|
||||||
|
$recommendation.remove("X.5.1", "remove Entity of type RECOMMENDATION when contained by RECOMMENDATION");
|
||||||
retract($recommendation);
|
retract($recommendation);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,7 @@ X.2.0
|
|||||||
X.3.0
|
X.3.0
|
||||||
X.4.0
|
X.4.0
|
||||||
X.5.0
|
X.5.0
|
||||||
|
X.5.1
|
||||||
X.6.*
|
X.6.*
|
||||||
FA.*.*
|
FA.*.*
|
||||||
LDS.*.*
|
LDS.*.*
|
||||||
@ -4,6 +4,7 @@ X.2.0
|
|||||||
X.3.0
|
X.3.0
|
||||||
X.4.0
|
X.4.0
|
||||||
X.5.0
|
X.5.0
|
||||||
|
X.5.1
|
||||||
X.7.0
|
X.7.0
|
||||||
FA.*.*
|
FA.*.*
|
||||||
LDS.*.*
|
LDS.*.*
|
||||||
Loading…
x
Reference in New Issue
Block a user