Changed rules and dictionaries
This commit is contained in:
parent
4a6631f5b8
commit
a4f8d2f424
@ -1,2 +1 @@
|
|||||||
guideline
|
|
||||||
unpublished
|
unpublished
|
||||||
@ -9,8 +9,8 @@ rule "1: Redacted because Section contains Vertebrate"
|
|||||||
when
|
when
|
||||||
Section(matchesType("vertebrate"))
|
Section(matchesType("vertebrate"))
|
||||||
then
|
then
|
||||||
section.redact("name", 1, "Redacted because Section contains Vertebrate", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
section.redact("name", 1, "Vertebrate found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
||||||
section.redact("address", 1, "Redacted because Section contains Vertebrate", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
section.redact("address", 1, "Vertebrate found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -18,8 +18,8 @@ rule "2: Not Redacted because Section contains no Vertebrate"
|
|||||||
when
|
when
|
||||||
Section(!matchesType("vertebrate"))
|
Section(!matchesType("vertebrate"))
|
||||||
then
|
then
|
||||||
section.redactNot("name", 2, "Not Redacted because Section contains no Vertebrate");
|
section.redactNot("name", 2, "No Vertebrate found");
|
||||||
section.redactNot("address", 2, "Not Redacted because Section contains no Vertebrate");
|
section.redactNot("address", 2, "No Vertebrate found");
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -27,26 +27,26 @@ rule "3: Do not redact Names and Addresses if no redaction Indicator is containe
|
|||||||
when
|
when
|
||||||
Section(matchesType("vertebrate"), matchesType("no_redaction_indicator"))
|
Section(matchesType("vertebrate"), matchesType("no_redaction_indicator"))
|
||||||
then
|
then
|
||||||
section.redactNot("name", 3, "Vertebrate was found, but also a no redaction indicator");
|
section.redactNot("name", 3, "Vertebrate and No Redaction Indicator found");
|
||||||
section.redactNot("address", 3, "Vertebrate was found, but also a no redaction indicator");
|
section.redactNot("address", 3, "Vertebrate and No Redaction Indicator found");
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
rule "4: Redact Names and Addresses if no_redaction_indicator and redaction_indicator is contained"
|
rule "4: Do not redact Names and Addresses if no redaction Indicator is contained"
|
||||||
|
when
|
||||||
|
Section(matchesType("vertebrate"), matchesType("published_information"))
|
||||||
|
then
|
||||||
|
section.redactNot("name", 4, "Vertebrate and Published Information found");
|
||||||
|
section.redactNot("address", 4, "Vertebrate and Published Information found");
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
rule "5: Redact Names and Addresses if no_redaction_indicator and redaction_indicator is contained"
|
||||||
when
|
when
|
||||||
Section(matchesType("vertebrate"), matchesType("no_redaction_indicator"), matchesType("redaction_indicator"))
|
Section(matchesType("vertebrate"), matchesType("no_redaction_indicator"), matchesType("redaction_indicator"))
|
||||||
then
|
then
|
||||||
section.redact("name", 4, "Vertebrate was found and no_redaction_indicator and redaction_indicator", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
section.redact("name", 5, "Vertebrate and Redaction Indicator found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
||||||
section.redact("address", 4, "Vertebrate was found and no_redaction_indicator and redaction_indicator", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
section.redact("address", 5, "Vertebrate and Redaction Indicator found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
rule "5: Do not redact in guideline sections"
|
|
||||||
when
|
|
||||||
Section(headlineContainsWord("guideline") || headlineContainsWord("Guidance"))
|
|
||||||
then
|
|
||||||
section.redactNot("name", 5, "Section is a guideline section.");
|
|
||||||
section.redactNot("address", 5, "Section is a guideline section.");
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -54,8 +54,6 @@ rule "6: Redact contact information if applicant is found"
|
|||||||
when
|
when
|
||||||
Section(headlineContainsWord("applicant") || text.contains("Applicant") || headlineContainsWord("Primary contact") || headlineContainsWord("Alternative contact"))
|
Section(headlineContainsWord("applicant") || text.contains("Applicant") || headlineContainsWord("Primary contact") || headlineContainsWord("Alternative contact"))
|
||||||
then
|
then
|
||||||
section.redactLineAfter("Name:", "address", 6, "Applicant information was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
|
||||||
section.redactBetween("Address:", "Contact", "address", 6, "Applicant information was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
|
||||||
section.redactLineAfter("Contact point:", "address", 6, "Applicant information was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
section.redactLineAfter("Contact point:", "address", 6, "Applicant information was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
||||||
section.redactLineAfter("Phone:", "address", 6, "Applicant information was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
section.redactLineAfter("Phone:", "address", 6, "Applicant information was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
||||||
section.redactLineAfter("Fax:", "address", 6, "Applicant information was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
section.redactLineAfter("Fax:", "address", 6, "Applicant information was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
||||||
@ -81,11 +79,8 @@ rule "7: Redact contact information if Producer is found"
|
|||||||
when
|
when
|
||||||
Section(text.toLowerCase().contains("producer of the plant protection") || text.toLowerCase().contains("producer of the active substance") || text.contains("Manufacturer of the active substance") || text.contains("Manufacturer:") || text.contains("Producer or producers of the active substance"))
|
Section(text.toLowerCase().contains("producer of the plant protection") || text.toLowerCase().contains("producer of the active substance") || text.contains("Manufacturer of the active substance") || text.contains("Manufacturer:") || text.contains("Producer or producers of the active substance"))
|
||||||
then
|
then
|
||||||
section.redactLineAfter("Name:", "address", 7, "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
section.redactLineAfter("Contact:", "address", 7, "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
||||||
section.redactBetween("Address:", "Contact", "address", 7, "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
section.redactLineAfter("Contact:", "address", 7, "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
||||||
section.redactBetween("Contact:", "Phone", "address", 7, "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
|
||||||
section.redactBetween("Contact:", "Telephone number:", "address", 7, "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
|
||||||
section.redactBetween("Address:", "Manufacturing", "address", 7, "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
|
||||||
section.redactLineAfter("Telephone:", "address", 7, "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
section.redactLineAfter("Telephone:", "address", 7, "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
||||||
section.redactLineAfter("Phone:", "address", 7, "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
section.redactLineAfter("Phone:", "address", 7, "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
||||||
section.redactLineAfter("Fax:", "address", 7, "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
section.redactLineAfter("Fax:", "address", 7, "Producer was found", "Reg (EC) No 1107/2009 Art. 63 (2g)");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user