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 ab2e048c..8ddf0a48 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 @@ -63,7 +63,7 @@ query "getFileAttributes" rule "H.0.0 retract table of contents page" when $page: Page(getMainBodyTextBlock().getSearchText().contains("........") || (getMainBodyTextBlock().getSearchText().contains("APPENDICES") && getMainBodyTextBlock().getSearchText().contains("TABLES"))) - $node: SemanticNode(onPage($page.getNumber()), !onPage($page.getNumber() -1)) + $node: SemanticNode(onPage($page.getNumber()), !onPage($page.getNumber() -1), getType() != NodeType.IMAGE) then retract($node); end @@ -77,13 +77,13 @@ rule "H.0.0: Ignore Table of Contents" then $tocHeadline.getParent().getPages() .forEach(page -> page.getMainBody().stream() + .filter(node -> !node.getType().equals(NodeType.IMAGE)) .filter(node -> node.getPages().stream().noneMatch(nodePage -> nodePage.getNumber() < page.getNumber())) .forEach(node -> retract(node)) ); end - // Rule unit: MAN.0 rule "H.0.0: Show headlines" when @@ -914,8 +914,8 @@ rule "DOC.25.0: Results and Conclusion (406, 428, 438, 439, 474 & 487)" when FileAttribute(label == "OECD Number", valueEqualsAnyOf("406","428","438","439","474","487")) $parentHeadline: Headline( - containsAnyStringIgnoreCase("Results", "Conclusion"), - !containsAnyString("POSITIVE CONTROL", "Positive Control", "Evaluation", "Micronucleus", "TABLE", "DISCUSSION", "CONCLUSIONS", "Interpretation","Viability"), + containsAnyString("Results", "Conclusion"), + !containsAnyString("POSITIVE CONTROL", "Positive Control", "Evaluation", "Micronucleus", "TABLE", "DISCUSSION", "CONCLUSIONS", "Interpretation","Viability", "analysis"), $sectionIdentifier: getSectionIdentifier() ) not Headline(getSectionIdentifier().isChildOf($sectionIdentifier)) @@ -929,8 +929,8 @@ rule "DOC.25.1: Results and Conclusion (406, 428, 438, 439, 474 & 487)" when FileAttribute(label == "OECD Number", valueEqualsAnyOf("406","428","438","439","474","487")) Headline( - containsAnyStringIgnoreCase("Results", "Conclusion"), - !containsAnyString("POSITIVE CONTROL", "Positive Control", "Evaluation", "Micronucleus", "TABLE", "DISCUSSION", "CONCLUSIONS", "Interpretation","Viability"), + containsAnyString("Results", "Conclusion"), + !containsAnyString("POSITIVE CONTROL", "Positive Control", "Evaluation", "Micronucleus", "TABLE", "DISCUSSION", "CONCLUSIONS", "Interpretation","Viability", "analysis"), $sectionIdentifier: getSectionIdentifier() ) $headline: Headline(getSectionIdentifier().isChildOf($sectionIdentifier))