diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/acceptance_rules.drl b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/acceptance_rules.drl index c4585063..918404da 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/acceptance_rules.drl +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/acceptance_rules.drl @@ -1360,6 +1360,18 @@ rule "X.8.1: Remove Entity when intersected by imported Entity" end +// Rule unit: X.11 +rule "X.11.0: Remove dictionary entity which intersects with a manual entity" + salience 64 + when + $manualEntity: TextEntity(engines contains Engine.MANUAL, active()) + $dictionaryEntity: TextEntity(intersects($manualEntity), dictionaryEntry, engines not contains Engine.MANUAL) + then + $dictionaryEntity.remove("X.11.0", "remove dictionary entity which intersects with a manual entity"); + retract($dictionaryEntity); + end + + //------------------------------------ File attributes rules ------------------------------------ // Rule unit: FA.1 diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/all_redact_manager_rules.drl b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/all_redact_manager_rules.drl index af5f7b97..afe49154 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/all_redact_manager_rules.drl +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/all_redact_manager_rules.drl @@ -1963,6 +1963,18 @@ rule "X.8.1: Remove Entity when intersected by imported Entity" end +// Rule unit: X.11 +rule "X.11.0: Remove dictionary entity which intersects with a manual entity" + salience 64 + when + $manualEntity: TextEntity(engines contains Engine.MANUAL, active()) + $dictionaryEntity: TextEntity(intersects($manualEntity), dictionaryEntry, engines not contains Engine.MANUAL) + then + $dictionaryEntity.remove("X.11.0", "remove dictionary entity which intersects with a manual entity"); + retract($dictionaryEntity); + end + + //------------------------------------ File attributes rules ------------------------------------ // Rule unit: FA.1 diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/documine_flora.drl b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/documine_flora.drl index d2df3761..43e5c446 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/documine_flora.drl +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/documine_flora.drl @@ -1414,6 +1414,18 @@ rule "X.8.1: Remove Entity when intersected by imported Entity" end +// Rule unit: X.11 +rule "X.11.0: Remove dictionary entity which intersects with a manual entity" + salience 64 + when + $manualEntity: TextEntity(engines contains Engine.MANUAL, active()) + $dictionaryEntity: TextEntity(intersects($manualEntity), dictionaryEntry, engines not contains Engine.MANUAL) + then + $dictionaryEntity.remove("X.11.0", "remove dictionary entity which intersects with a manual entity"); + retract($dictionaryEntity); + end + + //------------------------------------ File attributes rules ------------------------------------ // Rule unit: FA.1 diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/efsa_sanitisation.drl b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/efsa_sanitisation.drl index 200c6ff9..71dfc1d7 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/efsa_sanitisation.drl +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/efsa_sanitisation.drl @@ -927,6 +927,18 @@ rule "X.8.1: Remove Entity when intersected by imported Entity" end +// Rule unit: X.11 +rule "X.11.0: Remove dictionary entity which intersects with a manual entity" + salience 64 + when + $manualEntity: TextEntity(engines contains Engine.MANUAL, active()) + $dictionaryEntity: TextEntity(intersects($manualEntity), dictionaryEntry, engines not contains Engine.MANUAL) + then + $dictionaryEntity.remove("X.11.0", "remove dictionary entity which intersects with a manual entity"); + retract($dictionaryEntity); + end + + //------------------------------------ File attributes rules ------------------------------------ // Rule unit: FA.1 diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/manual_redaction_rules.drl b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/manual_redaction_rules.drl index 340a01ad..f66cb95a 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/manual_redaction_rules.drl +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/manual_redaction_rules.drl @@ -255,6 +255,18 @@ rule "X.8.1: Remove Entity when intersected by imported Entity" end +// Rule unit: X.11 +rule "X.11.0: Remove dictionary entity which intersects with a manual entity" + salience 64 + when + $manualEntity: TextEntity(engines contains Engine.MANUAL, active()) + $dictionaryEntity: TextEntity(intersects($manualEntity), dictionaryEntry, engines not contains Engine.MANUAL) + then + $dictionaryEntity.remove("X.11.0", "remove dictionary entity which intersects with a manual entity"); + retract($dictionaryEntity); + end + + //------------------------------------ Local dictionary search rules ------------------------------------ // Rule unit: LDS.0 diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/rules.drl b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/rules.drl index 1e18b978..1ef10ab3 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/rules.drl +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/rules.drl @@ -1449,6 +1449,18 @@ rule "X.8.1: Remove Entity when intersected by imported Entity" end +// Rule unit: X.11 +rule "X.11.0: Remove dictionary entity which intersects with a manual entity" + salience 64 + when + $manualEntity: TextEntity(engines contains Engine.MANUAL, active()) + $dictionaryEntity: TextEntity(intersects($manualEntity), dictionaryEntry, engines not contains Engine.MANUAL) + then + $dictionaryEntity.remove("X.11.0", "remove dictionary entity which intersects with a manual entity"); + retract($dictionaryEntity); + end + + //------------------------------------ File attributes rules ------------------------------------ // Rule unit: FA.1 diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/rules_v2.drl b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/rules_v2.drl index aaebfcdb..6996d10c 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/rules_v2.drl +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/rules_v2.drl @@ -379,6 +379,18 @@ rule "X.8.1: Remove Entity when intersected by imported Entity" end +// Rule unit: X.11 +rule "X.11.0: Remove dictionary entity which intersects with a manual entity" + salience 64 + when + $manualEntity: TextEntity(engines contains Engine.MANUAL, active()) + $dictionaryEntity: TextEntity(intersects($manualEntity), dictionaryEntry, engines not contains Engine.MANUAL) + then + $dictionaryEntity.remove("X.11.0", "remove dictionary entity which intersects with a manual entity"); + retract($dictionaryEntity); + end + + //------------------------------------ File attributes rules ------------------------------------ // Rule unit: FA.1 diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/table_demo.drl b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/table_demo.drl index a40618d5..dfe2e86b 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/table_demo.drl +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/table_demo.drl @@ -500,6 +500,18 @@ rule "X.8.1: Remove Entity when intersected by imported Entity" end +// Rule unit: X.11 +rule "X.11.0: Remove dictionary entity which intersects with a manual entity" + salience 64 + when + $manualEntity: TextEntity(engines contains Engine.MANUAL, active()) + $dictionaryEntity: TextEntity(intersects($manualEntity), dictionaryEntry, engines not contains Engine.MANUAL) + then + $dictionaryEntity.remove("X.11.0", "remove dictionary entity which intersects with a manual entity"); + retract($dictionaryEntity); + end + + //------------------------------------ File attributes rules ------------------------------------ // Rule unit: FA.1 diff --git a/redaction-service-v1/rules-management/src/main/resources/all_redact_manager_rules.drl b/redaction-service-v1/rules-management/src/main/resources/all_redact_manager_rules.drl index d6ea85a1..5f90d1a1 100644 --- a/redaction-service-v1/rules-management/src/main/resources/all_redact_manager_rules.drl +++ b/redaction-service-v1/rules-management/src/main/resources/all_redact_manager_rules.drl @@ -1986,6 +1986,18 @@ rule "X.8.1: Remove Entity when intersected by imported Entity" end +// Rule unit: X.11 +rule "X.11.0: Remove dictionary entity which intersects with a manual entity" + salience 64 + when + $manualEntity: TextEntity(engines contains Engine.MANUAL, active()) + $dictionaryEntity: TextEntity(intersects($manualEntity), dictionaryEntry, engines not contains Engine.MANUAL) + then + $dictionaryEntity.remove("X.11.0", "remove dictionary entity which intersects with a manual entity"); + retract($dictionaryEntity); + end + + //------------------------------------ File attributes rules ------------------------------------ // Rule unit: FA.1 diff --git a/redaction-service-v1/rules-management/src/main/resources/all_rules_documine.drl b/redaction-service-v1/rules-management/src/main/resources/all_rules_documine.drl index 8c1edfc3..02892ba6 100644 --- a/redaction-service-v1/rules-management/src/main/resources/all_rules_documine.drl +++ b/redaction-service-v1/rules-management/src/main/resources/all_rules_documine.drl @@ -1562,6 +1562,18 @@ rule "X.8.1: Remove Entity when intersected by imported Entity" end +// Rule unit: X.11 +rule "X.11.0: Remove dictionary entity which intersects with a manual entity" + salience 64 + when + $manualEntity: TextEntity(engines contains Engine.MANUAL, active()) + $dictionaryEntity: TextEntity(intersects($manualEntity), dictionaryEntry, engines not contains Engine.MANUAL) + then + $dictionaryEntity.remove("X.11.0", "remove dictionary entity which intersects with a manual entity"); + retract($dictionaryEntity); + end + + //------------------------------------ File attributes rules ------------------------------------ // Rule unit: FA.1