Repository navigation
Take a hyphenated surname under two_family_names; example both switches (#959) - #1051
Merged
Merged
Conversation
…es (#959) rules/O6 now counts a hyphenated word as one name word when it is the word taken, so `Andrés Sánchez-Cid Torres` under `two_family_names` gives family 'Sánchez-Cid Torres' where 2.8.0 kept 'Sánchez-Cid' a middle name. A hyphenated word every part of which is a listed given name stays (`Ana María-José López` under the Spanish list), and so do hyphenated initials. A hyphen in the family still counts its words. Decided in chat over ORCID's self-split names: under locales.ES the change fixes 186 of 10,794 hyphenated records and breaks 3, where counting a hyphen as one everywhere broke 520. rules/O7's precedence over O6 gains the both-switches example `María del Carmen de la Vega`, which decisions/O6 listed as Open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The veto reads each part of a hyphenated word: every part a listed given name or an initial keeps it (`M.-José` under the Spanish list, `M.-J.`); measured neutral on ORCID. - A hyphenated bound pair (`Ana Abdul-Rahman López`) is taken like any hyphenated word, recorded under rules/O6's Accepted: a veto for it cost 2 ORCID surnames (`Abdul-Hadi Pru`) and kept none. - Policy.two_family_names' docstring, the release range (2.6.0 through 2.8.0), decisions/O6's 10,038 figure and its recipe's dedup step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-taken-surname # Conflicts: # tests/v2/rules_budget.json
…-taken-surname # Conflicts: # docs/design/decisions/O6-two-family-names.md # docs/design/rules/O6-two-family-names.md # tests/v2/rules_budget.json
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #959. This PR covers what #961 left Open in decisions/O6 (two family names): the hyphenated-surname gap and the both-switches example.
Hyphenated surname taken
Parser(policy=Policy(two_family_names=True)).parse("Andrés Sánchez-Cid Torres")gives family 'Sánchez-Cid Torres'. 2.6.0 through 2.8.0 kept 'Sánchez-Cid' a middle name, because rules/O6 counted the hyphen's two words against the word it takes. As decided:Javier Olmedo Pérez-Montautis unchanged.Ana María-José Lópezunder the Spanish list keeps middle 'María-José';Ana M.-J. Lópezstays under any lexicon.Ana María-José Lópezreads family 'María-José López'. That is recorded as the switch's usual cost.Measured on the cached ORCID researchers. Countries ES, MX, CO, PE, CL, VE and AR: 135,735 records, of which 10,794 distinct records hold a hyphen. Under
locales.ES:Accepted: a hyphenated bound pair (
Ana Abdul-Rahman López) is taken like any hyphenated word. A veto for it was built and backed out: it cost 2 ORCID records whose hyphenated word is a surname (Abdul-Hadi Pru) and kept none.Both switches
rules/O7's precedence over O6 now shows
María del Carmen de la Vega:No behavior moves.
Docs and interaction
Policy.two_family_names' docstring, and a release-log bullet.Pérez de la Vega Juanread given 'Juan'? The particle chain takes the given name, andtwo_family_namescan't take it back #1024) merged too,Pérez de la Vega-Santos Juanunder family-first will read given 'Juan'.Review
An independent review found:
All are addressed in the second commit.
Checks
uv run pytest: 36,086 passed. Ruff and mypy clean.🤖 Generated with Claude Code