diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/model/Entity.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/model/Entity.java index de6d56eb..e68c6121 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/model/Entity.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/model/Entity.java @@ -12,6 +12,8 @@ import lombok.EqualsAndHashCode; public class Entity { private final String word; + + @EqualsAndHashCode.Exclude private final String type; @EqualsAndHashCode.Exclude diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/resources/dictionaries/addresses.txt b/redaction-service-v1/redaction-service-server-v1/src/test/resources/dictionaries/addresses.txt index 5d3b1710..e8630bcd 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/resources/dictionaries/addresses.txt +++ b/redaction-service-v1/redaction-service-server-v1/src/test/resources/dictionaries/addresses.txt @@ -802,4 +802,7 @@ Syngenta Crop Protection AG European Product Registration B8.4.29 Scharzwaldalll Adama Agriculture BV Arnhemseweg 87 NL-3832 GK Leusden The Netherlands Eurofins Regulatory AG Weidenweg 15 CH-4310 Rheinfelden Switzerland Cheminova A/S Thyborønvej 78, DK-7673 Harboøre, Denmark P.O. Box 9 DK-7620 Lemvig Denmark -Helm AG Nordkanalstrasse 28 20097 Hamburg Germany \ No newline at end of file +Helm AG Nordkanalstrasse 28 20097 Hamburg Germany +ADAMA Agriculture B.V. Arnhemseweg 87 NL-3832 GK Leusden The Netherlands +Adama Agriculture BV +Cheminova A/S Thyborønvej 78, DK-7673 Harboøre, Denmark 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 7a10f7c6..20f24015 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 @@ -60,7 +60,7 @@ rule "6: Redact if must redact entry is found" rule "7: Redact contact information, if applicant is found" when - eval(section.getText().toLowerCase().contains("applicant") == true); + eval(section.headlineContainsWord("applicant") || section.getText().contains("Applicant")); then section.redactLineAfter("Name:", "address", 7, "Applicant information was found"); section.redactBetween("Address:", "Contact", "address", 7, "Applicant information was found"); @@ -81,7 +81,7 @@ rule "7: Redact contact information, if applicant is found" rule "8: Redact contact information, if Producer is found" when - eval(section.getText().contains("Producer") || section.getText().contains("Manufacturer of the active substance") || section.getText().contains("Manufacturer:")); + eval(section.getText().toLowerCase().contains("producer of the plant protection") || section.getText().toLowerCase().contains("producer of the active substance") || section.getText().contains("Manufacturer of the active substance") || section.getText().contains("Manufacturer:") || section.getText().contains("Producer or producers of the active substance")); then section.redactLineAfter("Name:", "address", 8, "Producer was found"); section.redactBetween("Address:", "Contact", "address", 8, "Producer was found"); @@ -97,4 +97,5 @@ rule "8: Redact contact information, if Producer is found" section.redactLineAfter("Telephone number:", "address", 8, "Producer was found"); section.redactLineAfter("Tel:", "address", 8, "Producer was found"); section.redactBetween("No:", "Fax", "address", 8, "Producer was found"); - end \ No newline at end of file + end +