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

Alternate last name in parentheses is parsed into nickname field

Open geoffblack opened this issue 11 years ago • 2 comments

Apparently putting maiden or married names into parentheses directly following the last name is not uncommon. In 0.3.2, this is parsed into the nickname field even if it doesn't follow the first name. As an example, parsing "Baker (Johnson), Jenny" yields: first: "Jenny" last: "Baker" nickname: "Johnson"

geoffblack avatar Jul 19 '14 01:07 geoffblack

This is correctly parsed, which is nice:

>>> HumanName("MURDOCK, Orrice Abram, Jr. (Abe)")
<HumanName : [
    title: '' 
    first: 'Orrice' 
    middle: 'Abram' 
    last: 'MURDOCK' 
    suffix: 'Jr.'
    nickname: 'Abe'
]>

adamboche avatar Jul 24 '16 23:07 adamboche

I am parsing names from obituaries and placing the maiden name in parenthesis at the end of the name is VERY common as are nicknames. Examples: Barbara "Bobbie" Loy (Cox). (Cox) is the maiden name. GLENDA FAYE NICELY (VESS) (Vess) is the maiden name.

Is there any way to distinguish the two forms of nicknames? Is a maiden name attribute an option?

martin-affinitas avatar Feb 16 '23 16:02 martin-affinitas