Skip to content

Issue in names that contain comma(,) and has more than 3 words. #143

@da-sbarde

Description

@da-sbarde

Hi Derek,
I have a usecase where I need to parse names containing comma(,), but the library seems to work differently in this case.
from nameparser import HumanName as hm
#1) here first name should be-E ANNE and lastname should be-LEONARDO
hm("E Anne D,Leonardo")
<HumanName : [
title: ''
first: 'Leonardo'
middle: ''
last: 'E Anne D'
suffix: ''
nickname: ''
]>

#2) here first name should be-Marry Ann and lastname should be-Luther
hm("Mary Ann H,Luther")
<HumanName : [
title: ''
first: 'Luther'
middle: ''
last: 'Mary Ann H'
suffix: ''
nickname: ''
]>

Even if I removed the comma from the name, it has different output.

hm("Mary Ann H Luther")
<HumanName : [
title: ''
first: 'Mary'
middle: 'Ann H'
last: 'Luther'
suffix: ''
nickname: ''
]>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions