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

Capitalizing Suffixes

Open DLu opened this issue 1 year ago • 0 comments

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.'

DLu avatar Nov 01 '22 14:11 DLu