Repository navigation
Read two family names under locales.HR and locales.SL, as CS and SK do - #1524
Merged
Merged
Conversation
#1190) hr.toml and sl.toml gain a [rules] table turning on two_family_names (rules/O6), compiled into each pack's policy patch, and each pack declares DEVIATES through the shared two-family-names declaration. The default does not move. With no given-name list, a second given name is read as a family name, as under CS and SK (decisions/O6, 2026-11-21). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t's list (#1190) Review found five places outside the first diff still naming only the earlier packs: the pack-parts table and DEVIATES scope in locales.rst, the surname views in usage.rst and migrate.rst, and the shared declaration's docstring. The parametrized twice-counting test now reads its packs off the registry. languages.rst names the PSC figures, and the given-name-list claim is scoped to what was looked for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…isions entry's cost and CLDR claims (#1190) The test review asked for FAMILY_FIRST_GIVEN_LAST, a suffix comma, a credential after one and an empty head. The design-docs review found the PatentsView dip is mostly double surnames the filer split, not two given names; one CLDR move is a partial gain; a strict choice changes other readings; the phase 3f head entry needed a forward pointer; and the recipe needs --json for the counts the text output leaves out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iew conclusion to Croatia (#1190) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 #1190
locales.HRandlocales.SLnow read two family names (two_family_names, rules/O6), aslocales.CSandlocales.SKdo. A married double surname written without a hyphen stays whole; the default parse is unchanged.Ana Puž KukuljanHRPuž, familyKukuljanPuž KukuljanElena Zavadlav UšajSLZavadlav, familyUšajZavadlav UšajJanez Jože Novak(the cost)SLJože, familyNovakJože NovakNovak, Janez JožeSLJožeJože(O6 stands down after a family comma)Ana M. KukuljanHRM.M.What changes
[rules]table withtwo_family_names = true. It compiles intonameparser/config/_rules.py, andPACK_RULESin tools/vocab/build.py gainshrandsl.policy=rules_patch(...)and declareDEVIATES = deviates_by_two_family_names, the declaration CS, SK and ES share.Measured
All runs used a checkout of master 6ff048f. I wrote nothing into the shared tool cache: a scratch
NAMEPARSER_TOOLS_CACHElinked the corpus files and held the kept records.config_diff.py score plain:HR 'plain:HR@two_family_names=1' plain:SL 'plain:SL@two_family_names=1' plain:CS --group HR --group SI --group Croatian --group Slovenian --cap 20000, records with all boxes agreeing:HR,SLandCSscore the same on every row, so the switch alone moves them.ORCID's
nameis composed from its two boxes, given name first. A two-word family box therefore always reaches the parser as two trailing words, so the ORCID gain reflects the boxes' own split, not how people write their names.The parliaments are the independent check: display names as each chamber writes them (
opensanctions-parliaments). Every three-word name in either chamber moves, and I judged each one by hand.hr_sabor)si_dz_rs)The one break in each chamber is a member with two given names. The PatentsView dip is mostly something else: read by hand, about 17 of HR's 24 broken records and 11 of SI's 37 are double surnames the filer split, putting the first surname in the given-names box, which the switch reads as intended, and SI's other 16 breaks were not classified. A Croatian given-name list would therefore recover little of Croatia's dip; what a Slovenian one would recover is not known. Every two-word or hyphenated name reads the same either way. These match the issue's table from 2026-11-08.
local_agreement.py --locale hr/slwith--base: HR and SL score identically.ORCID: 97.1% of the HR country's 15,867 records and 96.4% of SI's 7,962 agree under the pack, the same picture as the
scoretable. That table caps at 20,000 records and counts a little differently.Whole corpora: applied to every record, mostly names neither pack is for, the pack moves what the switch always moves:
PSC's filers type a separate middle name, which two family names takes into the family. This is the switch's known cost on given-first names with a middle name, the same under CS and SK, and why it is a pack's switch and not the default's.
CLDR (
cldr_agreement.py). The per-pack record is re-recorded: 4hrand 8slrenderings move. Each takes a second word into the family (a second given name in a given-first rendering, the first given name in a family-first one), and none agrees afterwards. CLDR's fictional renderings are the population that loses here, as they did for CS and SK. No other record moves.Other checks:
sl/nativeFull/surnameFirst'sgiven_namesnow agrees.DEVIATES.de's andla's particle readings, soJuan de la Vegareads familyla Vega.locales.HR, and of a parser built fromlocales.SL, loads and still reads one family name, as migrate.rst says.Sweep
I compared HR and SL with CS on 25 shapes under all three
name_orders, 75 rows in all. The shapes: no comma; a full name, one word and nothing before a comma; a hyphenated pair; a particle; a suffix (bare and after a comma); a title; three and four words; an initial in the middle; a bracketed nickname.HR, SL and CS read all 75 rows the same, so the two packs differ from CS only through vocabulary, the generations
ml.andst..Ana M. Kukuljankeeps middleM.given-first. Under the two family-first orders it reads as the default does.Docs
locales.HRandlocales.SL, as CS and SK do (Ana Puž Kukuljangives middlePužunderlocales.HR) #1190", decided 2026-11-21, with the measurements, the accepted cost, the sweep and a recompute recipe;two_family_nameson in the surname-views bullet.[rules]table.Tests
mlrotators becameHorvat ml.andNovak ml.. The three-word forms are moved by the patch alone, whichtest_a_choice_word_rotator_is_moved_by_the_choice_alonerefuses. CS has the same shape.hr.tomlwithout a table now namessr.toml, and the roster message lists the two files.Reviews
Run on the first push: pr-review-toolkit
code-reviewer,pr-test-analyzer,comment-analyzerandcode-simplifier, anddesign-docs-reviewer. Then acode-reviewerpass on the two fix commits (ec373d8, 2b7c440) alone.What they found, all fixed:
Stale pack lists outside the first diff (code and comment review). Five places still named only the earlier O6 packs:
deviates_by_two_family_names's docstring.A sixth was a hand-written parametrize list in a test. That list is now derived from the registry (
_O6_PACKS), and a test pins it.Shapes not pinned (test analysis):
FAMILY_FIRST_GIVEN_LAST, a family-first row for HR, a suffix comma, a credential after a comma, and an empty head. Rows were added. The analysis also broke the change several ways (no patch, no rules table, a narrowed or missing DEVIATES), and each break failed a test.Decisions prose (design docs):
--json.Docs: languages.rst now gives the PSC figures and says only that no given-name list was looked for.
Simplification: nothing worth changing. The test keeps its name because a dated decisions entry cites it.
The fix-commit review found two overstatements, both fixed in the last commit:
Checks
All pass:
🤖 Generated with Claude Code