When I parse the name Dr. Jason "Jay" Ross:
>>> from nameparser import HumanName
>>> test_name = 'Dr. Jason "Jay" Ross'
>>> test_hn = HumanName( test_name )
It is broken out like this:
>>> test_hn
<HumanName : [
title: 'Dr.'
first: 'Jason'
middle: ''
last: 'Ross'
suffix: ''
nickname: 'Jay'
]>
When I convert it to a string:
>>> str( test_hn )
'Dr. Jason Ross Jay'
...the nickname is positioned at the end of the string, so it looks like it is the last name and Ross is the middle name. In my code, I use the HumanName class as the canonical way to convert from name parts to name string, and that has worked well up until this. It is wrapped in a method call, and so for now I've just started removing any nickname before I convert to string. Is there another way to specify how you want the nickname to be treated in string output?
Thanks!
Jon Morgan
When I parse the name Dr. Jason "Jay" Ross:
It is broken out like this:
When I convert it to a string:
...the nickname is positioned at the end of the string, so it looks like it is the last name and Ross is the middle name. In my code, I use the HumanName class as the canonical way to convert from name parts to name string, and that has worked well up until this. It is wrapped in a method call, and so for now I've just started removing any nickname before I convert to string. Is there another way to specify how you want the nickname to be treated in string output?
Thanks!
Jon Morgan