← 返回首页
Support family-first name order via an order-spec config (name_order) · Issue #270 · derek73/python-nameparser · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Support family-first name order via an order-spec config (name_order) #270

New issue
New issue

Description

The parser's Western-order assumption is confined to the positional assignment loops in parse_full_name — the vocabulary layer (titles, prefixes, suffixes, conjunctions, nicknames, capitalization) is entirely order-agnostic, and the lastname-comma path already parses family-first when a comma provides the signal. That makes name order configurable without restructuring the parser.

Proposal: an opt-in Constants attribute specifying the positional order of name parts, e.g.:

C.name_order = ('last', 'first', 'middle') # Chinese, Hungarian, Japanese rōmaji (#83) C.name_order = ('last', 'middle', 'first') # Vietnamese (#146)

A boolean family_name_first flag was considered and rejected: Vietnamese order is [family][middle][given] — the given name is the last token — so these issues need at least two non-Western orders. An order spec covers both and subsumes the Western default as ('first', 'middle', 'last').

Notes for design:

Would resolve the spaced-input cases of #83 and #146.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    • Open in GitHub Copilot app

    Footer

    © 2026 GitHub, Inc.