Skip to content

Commit

Permalink
#76 check org too
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Mar 15, 2024
1 parent b962f71 commit 1bb5b95
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bibcop.pl
Expand Up @@ -682,19 +682,26 @@ 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;
}
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;
}

Expand Down

0 comments on commit 1bb5b95

Please sign in to comment.