Skip to content

Commit

Permalink
Remove numbers from names
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveMorais committed Nov 1, 2018
1 parent 94b257d commit 364ba76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ test.py
*-problems_with_citation.txt
erro.txt
author.*

.idea/*
5 changes: 3 additions & 2 deletions util/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def _normalize_names(pub):
r' D[AEIOU]\s+',
r'-',
r'DOS',
r'DAS'
r'DAS',
r'\d+'

)

Expand All @@ -87,7 +88,7 @@ def _normalize_names(pub):
# Check if last_name is made up by two names
last_names = names[0].split(' ')

# Convert last_name last_name, name to last_name, name last_name
# Convert `last_name last_name, name` to `last_name, name last_name`
if len(last_names) > 1:
names[0] = last_names[-1]
names[1] += " " + " ".join(last_names[:-1])
Expand Down

0 comments on commit 364ba76

Please sign in to comment.