Skip to content

'St.' in surname is parsed as middle #50

Closed
@fd2

Description

@fd2

The period in "St." seems to break parsing of "St. ___" surnames, with "St." being assigned to middle.
Example:

>>> HumanName('Jill St. John')
<HumanName : [
        title: '' 
        first: 'Jill' 
        middle: 'St.' 
        last: 'John' 
        suffix: ''
        nickname: ''
]>

It seems to work properly if the period is removed from "St.", however that is altering how the person spells their name.

This might be caused by a conflict with HumanName.C.regexes['initial'] which checks for periods
with r'^(\w\.|[A-Z])?$' . HumanName.C.prefixes.add() also seems to strip trailing '.' , so that's not available as a workaround.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions