Skip to content

Recognize multi-word credential suffixes after a comma ("Smith, LEED AP") #291

Description

@derek73

"John Smith, LEED AP" parses with given=LEED — the credential is read as a name. The vocabulary entries that were meant to cover this (leed ap, nicet inicet iv, psm i, psm ii) could never match in any release: vocabulary is matched one word at a time, so a multi-word entry is inert (verified empirically against 1.4.0 on PyPI, and those dead entries were removed in 2.0.0).

Splitting them into single-word entries is disqualified by collisions, verified during the 2.0 API review:

Input With split entries Today (correct)
Smith, A.P. suffix A.P. given A.P.
John Leed suffix Leed, family lost family Leed
Mary Nicet suffix Nicet, family lost family Nicet

The period-gated suffix_acronyms_ambiguous escape doesn't help either — nobody writes L.E.E.D., so gating on periods is equivalent to removal.

The workable shape: on the suffix-comma path, match the whole comma segment against suffix vocabulary as a unit. The segment arrives as one piece there ("Smith, LEED AP" → segment LEED AP), so multi-word credentials become recognizable without touching no-comma parsing or reintroducing the collision surface. This would need a decision about which vocabulary field holds multi-word credentials (a new segment-matched set, or allowing whitespace in suffix_acronyms with segment-level matching) — the current multi-word UserWarning would need to carve out whichever home is chosen.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions