-
Notifications
You must be signed in to change notification settings - Fork 105
Description
The following condition causes single letter conjunctions '&' to not behave the same as multi letter conjunctions in the default conjunctions list. This issue only happens when parsing a name that results in the total_length being less than 4. Example is "mr. and mrs. john smith" parses differently than "mr. & mrs. john smith".
{'title': 'mr.', 'first': '&', 'middle': 'mrs. john', 'last': 'smith', 'suffix': '', 'nickname': ''}
This is what I expect the parser to output.
{'title': 'mr. & mrs.', 'first': 'john', 'middle': '', 'last': 'smith', 'suffix': '', 'nickname': ''}
The condition should always respect any single characters inside the configured conjunctions list.
python-nameparser/nameparser/parser.py
Line 848 in 759a131
if len(pieces[i]) == 1 and total_length < 4: |