From 8eab14ac12b17f4965ec5569853bf885ca6aacd2 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 9 Jan 2020 02:08:08 +0100 Subject: datacite: add 'Unknown' to blacklist --- python/fatcat_tools/importers/datacite.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'python/fatcat_tools/importers') diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py index 7878ebfa..ed8b0906 100644 --- a/python/fatcat_tools/importers/datacite.py +++ b/python/fatcat_tools/importers/datacite.py @@ -148,8 +148,12 @@ UNKNOWN_MARKERS = set(DATACITE_UNKNOWN_MARKERS).union(set(( 'NN', 'n.a.', '[s.n.]', + 'Unknown', ))) +# UNKNOWN_MARKERS_LOWER are lowercase version of UNKNOWN blacklist. +UNKNOWN_MARKERS_LOWER = set((v.lower() for v in UNKNOWN_MARKERS)) + # TODO(martin): merge this with other maps, maybe. LICENSE_SLUG_MAP = { "//creativecommons.org/licenses/by/2.0/": "CC-BY", @@ -736,7 +740,7 @@ class DataciteImporter(EntityImporter): continue if name in name_blacklist: continue - if name.lower() in UNKNOWN_MARKERS: + if name.lower() in UNKNOWN_MARKERS_LOWER: continue # Unpack name, if we have an index form (e.g. 'Razis, Panos A') into 'Panos A razis'. if name: -- cgit v1.2.3