Fixed RegEx for et al. recommendations
This commit is contained in:
parent
e58b4ff6c1
commit
633fb403e0
@ -144,7 +144,7 @@ public class Section {
|
|||||||
public void redactByRegEx(String pattern, boolean patternCaseInsensitive, int group, String asType, int ruleNumber, String reason, String legalBasis) {
|
public void redactByRegEx(String pattern, boolean patternCaseInsensitive, int group, String asType, int ruleNumber, String reason, String legalBasis) {
|
||||||
Pattern compiledPattern = Patterns.getCompiledPattern(pattern, patternCaseInsensitive);
|
Pattern compiledPattern = Patterns.getCompiledPattern(pattern, patternCaseInsensitive);
|
||||||
|
|
||||||
Matcher matcher = compiledPattern.matcher(text);
|
Matcher matcher = compiledPattern.matcher(searchText);
|
||||||
|
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
String match = matcher.group(group);
|
String match = matcher.group(group);
|
||||||
|
|||||||
@ -138,7 +138,7 @@ rule "12: Add recommendation for et al. author"
|
|||||||
when
|
when
|
||||||
Section(searchText.contains("et al."))
|
Section(searchText.contains("et al."))
|
||||||
then
|
then
|
||||||
section.addRecommendationByRegEx("([^\\s(]*?( \\w\\.?)?) et al\\.?", false, 1, "CBI_author");
|
section.addRecommendationByRegEx("\\b([A-ZÄÖÜ][^\\s\\.,]+( [A-ZÄÖÜ]\\.?)?( [A-ZÄÖÜ]\\.?)?) et al\\.?", false, 1, "CBI_author");
|
||||||
end
|
end
|
||||||
|
|
||||||
// --------------------------------------- PII rules -------------------------------------------------------------------
|
// --------------------------------------- PII rules -------------------------------------------------------------------
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user