diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/entity_rules.drl b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/entity_rules.drl index 78bdf3cf..d40ce437 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/entity_rules.drl +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/entity_rules.drl @@ -26,16 +26,16 @@ rule "1: Redact CBI_author" FileAttribute(label == "Vertebrate Study" , value.toLowerCase() == "yes") entity: EntityNode(type == "CBI_author") then - entity.setRedact(true); + entity.setRedaction(true); update(entity) end rule "2: do not redact genitive CBI_author" when - entity: EntityNode(type == "CBI_author", anyMatch(textAfter, "['’’'ʼˈ´`‘′ʻ’']s"), redact == true) + entity: EntityNode(type == "CBI_author", anyMatch(textAfter, "['’’'ʼˈ´`‘′ʻ’']s"), redaction == true) then - entity.setRedact(false); + entity.setRedaction(false); entity.setEntityType(EntityType.FALSE_POSITIVE); update(entity) end diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/prod_rules.drl b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/prod_rules.drl index 1a43ea4b..6090c41a 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/prod_rules.drl +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/drools/prod_rules.drl @@ -3,7 +3,7 @@ package drools import java.util.Set; import com.iqser.red.service.redaction.v1.server.settings.RedactionServiceSettings; -import com.iqser.red.service.redaction.v1.server.redaction.model.* +import com.iqser.red.service.redaction.v1.server.redaction.model.*; global RedactionServiceSettings redactionServiceSettings; global Dictionary dictionary; 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 9381f971..e69de29b 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 @@ -1,40 +0,0 @@ -package drools - -import static java.lang.String.format; -import static com.iqser.red.service.redaction.v1.server.document.services.RegexMatcher.anyMatch; - -import java.util.List; -import java.util.LinkedList; -import java.util.HashSet; - -import com.iqser.red.service.redaction.v1.server.document.graph.* -import com.iqser.red.service.redaction.v1.server.document.graph.nodes.* -import com.iqser.red.service.redaction.v1.server.redaction.model.EntityType; -import com.iqser.red.service.redaction.v1.model.FileAttribute; -import com.iqser.red.service.redaction.v1.model.Engine; -import com.iqser.red.service.persistence.service.v1.api.model.dossiertemplate.type.DictionaryEntry; -import com.iqser.red.service.redaction.v1.server.redaction.utils.EntitySearchUtils; -import java.util.Set; -global DocumentGraph document - - - -rule "1: Redact CBI_author" - - when - FileAttribute(label == "Vertebrate Study" && (value.toLowerCase() == "yes")) - entity: EntityNode(type == "CBI_author") - then - entity.setRedact(true); - update(entity) - end - -rule "2: do not redact genitive CBI_author" - - when - entity: EntityNode(type == "CBI_author", anyMatch("['’’'ʼˈ´`‘′ʻ’']s", textAfter)) - then - entity.setRedact(false); - entity.setEntityType(EntityType.FALSE_POSITIVE); - update(entity) - end