diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2020-01-03 17:08:56 +0100 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2020-01-03 17:08:56 +0100 |
commit | 1e5680202fe2bf0348f969ffd0e4b211cc45e1e5 (patch) | |
tree | 3f3588bdf5b78d62d5985218805e2bc1f2f67b3a /python/fatcat_tools | |
parent | b31955dbae89494735b230a25baa17797874e47e (diff) | |
download | fatcat-1e5680202fe2bf0348f969ffd0e4b211cc45e1e5.tar.gz fatcat-1e5680202fe2bf0348f969ffd0e4b211cc45e1e5.zip |
datacite: lowercase only once
Diffstat (limited to 'python/fatcat_tools')
-rw-r--r-- | python/fatcat_tools/importers/datacite.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py index 8034a5c1..d13e855e 100644 --- a/python/fatcat_tools/importers/datacite.py +++ b/python/fatcat_tools/importers/datacite.py @@ -872,7 +872,7 @@ def index_form_to_display_name(s): if s.count(',') > 1: # "Dr. Hina, Dr. Muhammad Usman Shahid, Dr. Muhammad Zeeshan Khan" return s - stopwords = [ + stopwords = [s.lower() for s in ( 'Archive', 'Collection', 'Coordinator', @@ -890,9 +890,10 @@ def index_form_to_display_name(s): 'University', 'Verein', 'Volkshochschule', - ] + )] + lower = s.lower() for stop in stopwords: - if stop.lower() in s.lower(): + if stop in lower: return s a, b = s.split(',') |