From a091ac7a6560a85c6024f1793da750eac1e1b18a Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Fri, 15 Mar 2024 12:37:55 +0300 Subject: [PATCH] #75 IEEE/ACM removed --- bibcop.pl | 6 +++++- perl-tests/fixing.pl | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bibcop.pl b/bibcop.pl index 88122af..471dbca 100755 --- a/bibcop.pl +++ b/bibcop.pl @@ -236,7 +236,7 @@ sub check_org_in_booktitle { return; } my (%entry) = @_; - my @orgs = ( 'ACM', 'IEEE' ); + my @orgs = qw/ACM IEEE/; if (exists($entry{'booktitle'})) { my $title = $entry{'booktitle'}; foreach my $o (@orgs) { @@ -663,6 +663,10 @@ sub fix_booktitle { $value = 'Proceedings of the ' . $value; } $value =~ s/ (19|20)[0-9]{2} / /g; + my @orgs = qw/ACM IEEE ACM\/IEEE/; + foreach my $org (@orgs) { + $value =~ s/ \Q$org\E / /g; + } return $value; } diff --git a/perl-tests/fixing.pl b/perl-tests/fixing.pl index 4e21fbd..3609f69 100755 --- a/perl-tests/fixing.pl +++ b/perl-tests/fixing.pl @@ -40,9 +40,10 @@ package bibcop; fixes('title', 'Executing A program On The MIT architecture', 'Executing a Program on the MIT Architecture'); fixes('title', 'Executing a program on the MIT Tagged-token Dataflow architecture', 'Executing a Program on the MIT Tagged-Token Dataflow Architecture'); -fixes('booktitle', 'Proceedings Of IEEE Symposium On Art', 'Proceedings of IEEE Symposium on Art'); +fixes('booktitle', 'Proceedings Of IEEE Symposium On Art', 'Proceedings of Symposium on Art'); fixes('booktitle', 'Symposium on Computers', 'Proceedings of the Symposium on Computers'); fixes('booktitle', 'Proceedings of the 2014 7th Conference', 'Proceedings of the 7th Conference'); +fixes('booktitle', 'Proceedings of the 7th ACM/IEEE Conference', 'Proceedings of the 7th Conference'); fixes('publisher', 'ACM New York, NY, USA', 'ACM'); fixes('publisher', 'ACME', 'ACME');