python-nameparser
python-nameparser copied to clipboard
Capitalizing Suffixes
I believe acronym-based suffixes are being incorrectly capitalized.
> python3
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nameparser
>>> nameparser.__version__
'1.1.1'
>>> n = nameparser.HumanName('GREGORY HOUSE M.D.')
>>> n
<HumanName : [
title: ''
first: 'GREGORY'
middle: ''
last: 'HOUSE'
suffix: 'M.D.'
nickname: ''
]>
>>> n.capitalize()
>>> n
<HumanName : [
title: ''
first: 'Gregory'
middle: ''
last: 'House'
suffix: 'M.d.'
nickname: ''
]>
>>>
I believe the suffix should be 'M.D.'