diff --git a/authors-tools/v1/first-name/gender.py b/authors-tools/v1/first-name/gender.py index 70d41c0..c93026b 100644 --- a/authors-tools/v1/first-name/gender.py +++ b/authors-tools/v1/first-name/gender.py @@ -9,10 +9,10 @@ def detector(name,my_dict) : - name = unidecode(name.lower()) - if re.match(r"^([a-z][. '-]+){2,}[a-z]*",name) : + if re.match(r"^([A-Z][. '-]+){2,}[A-Z]*",name) or re.match(r"\b[A-Z]+\b\.?",name) : return "name error" else : + name = unidecode(name.lower()) name = name.replace(".","") name = name.replace("- ","-") name = re.split("[\s-]+", name)