Merge branch 'RED-10687-bp' into 'release/4.423.x'
RED-10687: Filter out overlapping recommendations if they are of the same type See merge request redactmanager/redaction-service!581
This commit is contained in:
commit
39ffc4bef3
@ -1548,6 +1548,17 @@ rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATI
|
||||
end
|
||||
|
||||
|
||||
rule "X.5.2: Remove Entity of type RECOMMENDATION when contained by ENTITY of same type"
|
||||
salience 256
|
||||
when
|
||||
$entity: TextEntity($type: type(), (entityType == EntityType.ENTITY || entityType == EntityType.HINT), !removed())
|
||||
$recommendation: TextEntity(containedBy($entity), type() == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges())
|
||||
then
|
||||
$recommendation.remove("X.5.2", "remove Entity of type RECOMMENDATION when contained by ENTITY of same type");
|
||||
retract($recommendation);
|
||||
end
|
||||
|
||||
|
||||
// Rule unit: X.7
|
||||
rule "X.7.0: Remove all images"
|
||||
salience 512
|
||||
|
||||
@ -1350,6 +1350,17 @@ rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATI
|
||||
end
|
||||
|
||||
|
||||
rule "X.5.2: Remove Entity of type RECOMMENDATION when contained by ENTITY of same type"
|
||||
salience 256
|
||||
when
|
||||
$entity: TextEntity($type: type(), (entityType == EntityType.ENTITY || entityType == EntityType.HINT), !removed())
|
||||
$recommendation: TextEntity(containedBy($entity), type() == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges())
|
||||
then
|
||||
$recommendation.remove("X.5.2", "remove Entity of type RECOMMENDATION when contained by ENTITY of same type");
|
||||
retract($recommendation);
|
||||
end
|
||||
|
||||
|
||||
// Rule unit: X.6
|
||||
rule "X.6.0: Remove Entity of lower rank, when contained by entity of type ENTITY or HINT"
|
||||
salience 32
|
||||
|
||||
@ -2117,6 +2117,17 @@ rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATI
|
||||
end
|
||||
|
||||
|
||||
rule "X.5.2: Remove Entity of type RECOMMENDATION when contained by ENTITY of same type"
|
||||
salience 256
|
||||
when
|
||||
$entity: TextEntity($type: type(), (entityType == EntityType.ENTITY || entityType == EntityType.HINT), !removed())
|
||||
$recommendation: TextEntity(containedBy($entity), type() == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges())
|
||||
then
|
||||
$recommendation.remove("X.5.2", "remove Entity of type RECOMMENDATION when contained by ENTITY of same type");
|
||||
retract($recommendation);
|
||||
end
|
||||
|
||||
|
||||
// Rule unit: X.6
|
||||
rule "X.6.0: Remove Entity of lower rank, when contained by entity of type ENTITY or HINT"
|
||||
salience 32
|
||||
|
||||
@ -1485,6 +1485,17 @@ rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATI
|
||||
end
|
||||
|
||||
|
||||
rule "X.5.2: Remove Entity of type RECOMMENDATION when contained by ENTITY of same type"
|
||||
salience 256
|
||||
when
|
||||
$entity: TextEntity($type: type(), (entityType == EntityType.ENTITY || entityType == EntityType.HINT), !removed())
|
||||
$recommendation: TextEntity(containedBy($entity), type() == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges())
|
||||
then
|
||||
$recommendation.remove("X.5.2", "remove Entity of type RECOMMENDATION when contained by ENTITY of same type");
|
||||
retract($recommendation);
|
||||
end
|
||||
|
||||
|
||||
// Rule unit: X.7
|
||||
rule "X.7.0: Remove all images"
|
||||
salience 512
|
||||
|
||||
@ -1077,6 +1077,17 @@ rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATI
|
||||
end
|
||||
|
||||
|
||||
rule "X.5.2: Remove Entity of type RECOMMENDATION when contained by ENTITY of same type"
|
||||
salience 256
|
||||
when
|
||||
$entity: TextEntity($type: type(), (entityType == EntityType.ENTITY || entityType == EntityType.HINT), !removed())
|
||||
$recommendation: TextEntity(containedBy($entity), type() == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges())
|
||||
then
|
||||
$recommendation.remove("X.5.2", "remove Entity of type RECOMMENDATION when contained by ENTITY of same type");
|
||||
retract($recommendation);
|
||||
end
|
||||
|
||||
|
||||
// Rule unit: X.6
|
||||
rule "X.6.0: Remove Entity of lower rank, when contained by entity of type ENTITY or HINT"
|
||||
salience 32
|
||||
|
||||
@ -397,6 +397,17 @@ rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATI
|
||||
end
|
||||
|
||||
|
||||
rule "X.5.2: Remove Entity of type RECOMMENDATION when contained by ENTITY of same type"
|
||||
salience 256
|
||||
when
|
||||
$entity: TextEntity($type: type(), (entityType == EntityType.ENTITY || entityType == EntityType.HINT), !removed())
|
||||
$recommendation: TextEntity(containedBy($entity), type() == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges())
|
||||
then
|
||||
$recommendation.remove("X.5.2", "remove Entity of type RECOMMENDATION when contained by ENTITY of same type");
|
||||
retract($recommendation);
|
||||
end
|
||||
|
||||
|
||||
// Rule unit: X.6
|
||||
rule "X.6.0: Remove Entity of lower rank, when contained by entity of type ENTITY or HINT"
|
||||
salience 32
|
||||
|
||||
@ -1372,6 +1372,17 @@ rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATI
|
||||
end
|
||||
|
||||
|
||||
rule "X.5.2: Remove Entity of type RECOMMENDATION when contained by ENTITY of same type"
|
||||
salience 256
|
||||
when
|
||||
$entity: TextEntity($type: type(), (entityType == EntityType.ENTITY || entityType == EntityType.HINT), !removed())
|
||||
$recommendation: TextEntity(containedBy($entity), type() == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges())
|
||||
then
|
||||
$recommendation.remove("X.5.2", "remove Entity of type RECOMMENDATION when contained by ENTITY of same type");
|
||||
retract($recommendation);
|
||||
end
|
||||
|
||||
|
||||
// Rule unit: X.6
|
||||
rule "X.6.0: Remove Entity of lower rank, when contained by entity of type ENTITY or HINT"
|
||||
salience 32
|
||||
|
||||
@ -455,6 +455,17 @@ rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATI
|
||||
end
|
||||
|
||||
|
||||
rule "X.5.2: Remove Entity of type RECOMMENDATION when contained by ENTITY of same type"
|
||||
salience 256
|
||||
when
|
||||
$entity: TextEntity($type: type(), (entityType == EntityType.ENTITY || entityType == EntityType.HINT), !removed())
|
||||
$recommendation: TextEntity(containedBy($entity), type() == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges())
|
||||
then
|
||||
$recommendation.remove("X.5.2", "remove Entity of type RECOMMENDATION when contained by ENTITY of same type");
|
||||
retract($recommendation);
|
||||
end
|
||||
|
||||
|
||||
// Rule unit: X.6
|
||||
rule "X.6.0: Remove Entity of lower rank, when contained by entity of type ENTITY or HINT"
|
||||
salience 32
|
||||
|
||||
@ -547,6 +547,17 @@ rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATI
|
||||
end
|
||||
|
||||
|
||||
rule "X.5.2: Remove Entity of type RECOMMENDATION when contained by ENTITY of same type"
|
||||
salience 256
|
||||
when
|
||||
$entity: TextEntity($type: type(), (entityType == EntityType.ENTITY || entityType == EntityType.HINT), !removed())
|
||||
$recommendation: TextEntity(containedBy($entity), type() == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges())
|
||||
then
|
||||
$recommendation.remove("X.5.2", "remove Entity of type RECOMMENDATION when contained by ENTITY of same type");
|
||||
retract($recommendation);
|
||||
end
|
||||
|
||||
|
||||
// Rule unit: X.6
|
||||
rule "X.6.0: Remove Entity of lower rank, when contained by entity of type ENTITY or HINT"
|
||||
salience 32
|
||||
|
||||
@ -468,6 +468,17 @@ rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATI
|
||||
end
|
||||
|
||||
|
||||
rule "X.5.2: Remove Entity of type RECOMMENDATION when contained by ENTITY of same type"
|
||||
salience 256
|
||||
when
|
||||
$entity: TextEntity($type: type(), (entityType == EntityType.ENTITY || entityType == EntityType.HINT), !removed())
|
||||
$recommendation: TextEntity(containedBy($entity), type() == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges())
|
||||
then
|
||||
$recommendation.remove("X.5.2", "remove Entity of type RECOMMENDATION when contained by ENTITY of same type");
|
||||
retract($recommendation);
|
||||
end
|
||||
|
||||
|
||||
// Rule unit: X.6
|
||||
rule "X.6.0: Remove Entity of lower rank, when contained by entity of type ENTITY or HINT"
|
||||
salience 32
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 5705cc0782605fdca5dfff134b436f7143c9e421
|
||||
Subproject commit 57e6e0dd3c08a3a65ec59b5dfb70f0f77ebcc7c7
|
||||
@ -960,6 +960,17 @@ rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATI
|
||||
end
|
||||
|
||||
|
||||
rule "X.5.2: Remove Entity of type RECOMMENDATION when contained by ENTITY of same type"
|
||||
salience 256
|
||||
when
|
||||
$entity: TextEntity($type: type(), (entityType == EntityType.ENTITY || entityType == EntityType.HINT), !removed())
|
||||
$recommendation: TextEntity(containedBy($entity), type() == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges())
|
||||
then
|
||||
$recommendation.remove("X.5.2", "remove Entity of type RECOMMENDATION when contained by ENTITY of same type");
|
||||
retract($recommendation);
|
||||
end
|
||||
|
||||
|
||||
// Rule unit: X.6
|
||||
rule "X.6.0: Remove Entity of lower rank, when contained by entity of type ENTITY or HINT"
|
||||
salience 32
|
||||
|
||||
@ -2147,6 +2147,17 @@ rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATI
|
||||
end
|
||||
|
||||
|
||||
rule "X.5.2: Remove Entity of type RECOMMENDATION when contained by ENTITY of same type"
|
||||
salience 256
|
||||
when
|
||||
$entity: TextEntity($type: type(), (entityType == EntityType.ENTITY || entityType == EntityType.HINT), !removed())
|
||||
$recommendation: TextEntity(containedBy($entity), type() == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges())
|
||||
then
|
||||
$recommendation.remove("X.5.2", "remove Entity of type RECOMMENDATION when contained by ENTITY of same type");
|
||||
retract($recommendation);
|
||||
end
|
||||
|
||||
|
||||
// Rule unit: X.6
|
||||
rule "X.6.0: Remove Entity of lower rank, when contained by entity of type ENTITY or HINT"
|
||||
salience 32
|
||||
|
||||
@ -1554,6 +1554,17 @@ rule "X.5.1: Remove Entity of type RECOMMENDATION when contained by RECOMMENDATI
|
||||
end
|
||||
|
||||
|
||||
rule "X.5.2: Remove Entity of type RECOMMENDATION when contained by ENTITY of same type"
|
||||
salience 256
|
||||
when
|
||||
$entity: TextEntity($type: type(), (entityType == EntityType.ENTITY || entityType == EntityType.HINT), !removed())
|
||||
$recommendation: TextEntity(containedBy($entity), type() == $type, entityType == EntityType.RECOMMENDATION, !hasManualChanges())
|
||||
then
|
||||
$recommendation.remove("X.5.2", "remove Entity of type RECOMMENDATION when contained by ENTITY of same type");
|
||||
retract($recommendation);
|
||||
end
|
||||
|
||||
|
||||
// Rule unit: X.7
|
||||
rule "X.7.0: Remove all images"
|
||||
salience 512
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user