From 1bb5b95b370a0cdfaee81453f75bbf32ddc20216 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Fri, 15 Mar 2024 14:30:00 +0300 Subject: [PATCH] #76 check org too --- bibcop.pl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bibcop.pl b/bibcop.pl index 9d376d4..0eadf27 100755 --- a/bibcop.pl +++ b/bibcop.pl @@ -682,9 +682,8 @@ sub fix_journal { return $value; } -sub fix_publisher { +sub simplify_org_name { my ($value) = @_; - $value = fix_capitalization($value); my @orgs = qw/ACM IEEE/; foreach my $org (@orgs) { $value =~ s/^\Q$org\E($|[^A-Z0-9a-z].*$)/$org/g; @@ -692,9 +691,17 @@ sub fix_publisher { return $value; } +sub fix_publisher { + my ($value) = @_; + $value = fix_capitalization($value); + $value = simplify_org_name($value); + return $value; +} + sub fix_organization { my ($value) = @_; $value = fix_capitalization($value); + $value = simplify_org_name($value); return $value; }