Recoginze rules and exceptions for redactAndRecommend, Do not redact publish information authors in new rulesset

This commit is contained in:
Dominique Eifländer 2021-01-25 09:46:09 +01:00
parent 375d84b236
commit 531eeebae1
2 changed files with 2 additions and 1 deletions

View File

@ -211,7 +211,7 @@ public class Section {
while (matcher.find()) {
String match = matcher.group(group);
if (StringUtils.isNotBlank(match) && match.length() >= 3) {
Set<Entity> found = findEntities(match.trim(), asType, false, true, ruleNumber, reason, legalBasis);
Set<Entity> found = findEntities(match.trim(), asType, false, false, ruleNumber, reason, legalBasis);
addNewerToEntities(found);
localDictionaryAdds.computeIfAbsent(RECOMMENDATION_PREFIX + asType, (x) -> new HashSet<>()).add(match);
}

View File

@ -43,6 +43,7 @@ rule "5: Do not redact Names and Addresses if no redaction Indicator is containe
when
Section(matchesType("vertebrate"), matchesType("published_information"))
then
section.redactNot("CBI_author", 4, "Vertebrate and Published Information found");
section.redactNot("CBI_address", 5, "Vertebrate and Published Information found");
end