Skip to content

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

Description

@derek73

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions