python-nameparser icon indicating copy to clipboard operation
python-nameparser copied to clipboard

First and middle names as initials after last with space separator

Open balbirthomas opened this issue 7 months ago • 0 comments

It is not clear how python-nameparser can be made to handle name strings like this - "Gebhart GF" . The expected name parts for this string are { "last": "Gebhart", "first": "GF", "middle": ""} or even better { "last": "Gebhart", "first": "G", "middle": "F"}.

Is this something python-nameparser can handle or plans to handle in a future version ?

Note currently what happens by default is shown below

>>> from nameparser import HumanName
>>> name = HumanName("Gebhart GF")
>>> name.as_dict()
{'title': '', 'first': 'Gebhart', 'middle': '', 'last': 'GF', 'suffix': '', 'nickname': ''}

balbirthomas avatar Jun 19 '25 12:06 balbirthomas