Repository navigation
Keep a FAMILY_FIRST base's order where a group's East Slavic patronymics are written last (Karimov Rustam Anvarovich) - #1399
Merged
Conversation
…c rule A decided East Slavic rule decided the order as given-first on any base, so a caller who had declared a family-first order for a list written family first was moved to a setting that reads its names without a patronymic family-last. The rule's reordering stands down under a declared family-first order, but its patronymic view does not: under FAMILY_FIRST it fills the view and moves no field. Under a FAMILY_FIRST base the suggestion now keeps the order and still suggests the rule; under FAMILY_FIRST_GIVEN_LAST, where the rule names no patronymic of a list written family first, it leaves both as the base has them. The names' own given-first votes move either base as before, the rule coming with the order, and a base already carrying the rule keeps its order and its own value. A given-first base is as before, and so is a list mixing East Slavic and Turkic patronymics. suggest_measure.py: kz_senate, uz_senate and ua_rada keep a family-first base, with no field moved and the patronymic view filled on 41 of 48, 52 of 59 and 1,367 of 1,588 names; PatentsView's Russian groups written family-first under a family-first base read 100% at every size (98% at five and ten names before). Closes #1356 Co-Authored-By: Claude Fable 5.2 <[email protected]>
The design-docs review found sentences the change left saying the rule forces or brings an order: the harness proof's rationale (AGENTS.md, the tools README, the tool's docstring), the comments on the two patronymic thresholds, Suggestion.disagreeing's docstring and a locales.rst sentence about the Mongolian pack. Each now says what the tree does. The #1397 entry carries a head note for its superseded table; the mixed list's line says one decision is made by the thresholds, not that the larger set always wins; "names no patronymic" under FAMILY_FIRST_GIVEN_LAST is said of a name written family, given, patronymic. The code review found no defect; the note for a base that already carries the rule no longer says it "is not suggested", and rows are added for a FAMILY_FIRST_GIVEN_LAST base whose votes decide its own order and for a base carrying the Turkic rule. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…en last The form this branch first pushed kept the order of every family-first base where a group decided the East Slavic rule. Review found it regressed against master: a list written given, patronymic, family under FAMILY_FIRST was left misread where master moved the base and read it; and under FAMILY_FIRST_GIVEN_LAST, which takes the patronymic of a family-first name for the given name, the base was left as it was and the rule dropped, though with capitals_as_family in the same patch the rule names the patronymic there. Now the order is kept on one branch only: a FAMILY_FIRST base, the names' own votes not deciding given-first, and more of the names carrying the patronymic writing it last than in the middle. The group then gets the rule alone, and its note counts the names written the other way, which stay as the base reads them. A tie, a middle majority, a FAMILY_FIRST_GIVEN_LAST base and a given-first base get the given-first order with the rule, as on master. suggest_measure.py gains a population of patronymic names in both writings (pv-RU-patronymic) and reads the parliament lists under FAMILY_FIRST_GIVEN_LAST too. Written family-first under a family-first base, that population kept its order in under 5% of groups of five or more on master and keeps it in 99% or more now. kz_senate, uz_senate and ua_rada keep a FAMILY_FIRST base with every name read whole (48, 59 and 1,588, where the forced order read 41, 52 and 1,367). Co-Authored-By: Claude Fable 5.2 <[email protected]>
…e costs whole The note on a kept FAMILY_FIRST order said the names writing the patronymic in the middle "are left as the base reads them", which is false where capitals_as_family, suggested in the same patch, reads them. It now says they get no given-first order from the suggestion, and a test holds the list that showed it. The accepted cost is stated whole: every name written given first stays under the kept order, whether or not it carries the patronymic. The entry records that two names written given first can decide the order by their own votes, names the lists of its differential so that it can be rebuilt, says what the tool could not see then and sees now, and corrects three sentences that outran their rows. Two example names that share their boxes with an ORCID record are replaced. Co-Authored-By: Claude Fable 5.2 <[email protected]>
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 #1356
A group that decided the East Slavic patronymic rule was always given a
GIVEN_FIRSTorder with it, on a family-first base too. A caller who had declaredFAMILY_FIRSTfor a list written family first was moved to a setting that reads its names without a patronymic family-last (Aliyev Farrukhbecame givenAliyev, familyFarrukh).The rule
The base's order is kept on one branch only:
FAMILY_FIRSTbase, the names' own votes not deciding given-first, and more of the names carrying the patronymic writing it last (Sidorov Ivan Petrovich) than in the middle (Ivan Petrovich Sidorov): the suggestion keeps the order and suggests the rule alone. Under that order the rule reorders no name and fills thepatronymicview. The names written the other way get no given-first order, and the patronymic evidence's note counts them.FAMILY_FIRST, any list underFAMILY_FIRST_GIVEN_LAST, and a given-first base get the given-first order with the rule.Implementation choices beside it: a name writes the patronymic in the middle where its middle word carries the ending (the first of the vote's own two tests), last otherwise; a name with the ending on both words counts as middle, as rules/O1 reads it; names casting no East Slavic vote are not counted.
Why this form
Measured by parse on master:
FAMILY_FIRSTwith the rule readsSidorov Ivan Petrovichwith the fields ofFAMILY_FIRSTalone, plus patronymicPetrovich.FAMILY_FIRST_GIVEN_LASTreads the family ofSidorov Ivan Petrovichright and its given name wrong (givenPetrovich). The rule alone does nothing there.The first form pushed here (commits 6a2c9e4, a9dacf7) kept the order of every family-first base. Independent review found it regressed against master in two places, both now tested:
Zzyvan Petrovich Qqsidorov(given, patronymic, family)FAMILY_FIRSTQQSIDOROV Zzyvan Petrovich(family in capitals)FAMILY_FIRST_GIVEN_LASTcapitals_as_family, view filled on 5capitals_as_familyalone, view on 0Measured
uv run python tools/differential/suggest_measure.py --wrong-words 12 --base <an export of 8f4b77b9>, 2026-11-15, 300 groups a size, seed 20261110. Parliament rows are from theopensanctions-parliamentscache as fetched 2026-11-12, not re-fetched. Five rows moved against master, and nothing else:pv-RU-patronymic(new: 8,393 Russian inventors whose given box holds a patronymic), written family-first, family-first base, share of groups right at 2 / 3 / 4 / 5 / 10 / 20 / 50 / 200 namespv-RU(all Russian inventors), the same rowkz_senate(48),uz_senate(59),ua_rada(1,588),FAMILY_FIRSTbaseGIVEN_FIRST, decided with no order voteFAMILY_FIRST_GIVEN_LASTevery parliament row is identical to master's.--set _MIN_VOTES=1000000 --set _MIN_PATRONYMIC_VOTES=1000000 --set _MIN_RUN_NAMES=1000000): 0% on all 60 rows written against their base, 100% on all 60 written in it.Whole names read right (family the first word and given name the second, by each list's convention), base / master's suggestion / this PR's:
FAMILY_FIRSTbaseFAMILY_FIRST_GIVEN_LASTbasekz_senate(48)uz_senate(59)ua_rada(1,588)Under
FAMILY_FIRSTno field of any name moves against the base, and the patronymic view fills on 41, 52 and 1,367.Field-level differential against master. The decisions entry names the eleven made-up lists (built from the invented triples in
tests/v2/test_suggest.py) and the six base settings precisely enough to rebuild it: 198 made-up cases and 72 parliament cases, comparing the patch, every role field and the view of the suggested parser, and each note. The independent code review ran its own over 156,192 generated cases and found the same classes.FAMILY_FIRST, all lists whose patronymics are mostly written last.FAMILY_FIRST_GIVEN_LASTbases no patch and no reading differs. 12 cases there differ by one note's wording: where the names' votes decide family-first, the order note said the rule "stands down" and now says it "reorders no name".Accepted, recorded in decisions/group-suggestion (2026-11-15 #1356)
FAMILY_FIRSTbase's order and leaves the minority under it, misread unless another setting of the patch reads it: five written last and three in the middle read 5 of 8 whole, where the forced order reads 8. The minority is every name written given first, with or without the patronymic: a two-wordWwyuri Wworlovinor a TurkicYyegor Rasim oglu Yysokolanbeside six names written last is read as the base reads it, where the forced order read it right. The note counts only the East Slavic names that write the patronymic in the middle.FAMILY_FIRST_GIVEN_LASTbases get nothing from this change:kz_senateanduz_senateread 41 of 48 and 52 of 59 there, as on master.Measured, and no cost: under the given-first base nothing changes.
Observed, recorded in the entry: a name written given, patronymic, family usually casts a given-first vote by its given name, and one written family, given, patronymic casts none. So two names written the first way can decide given-first by themselves, and the list then gets the given-first order with the rule: eight invented names written last keep the order beside
Anna Petrovna Zzkarelina, and are moved onceIgor Pavlovich Xxdorinjoins her.Not taken for 3.1 and not decided against, under
Open:: for a mixed list, suggesting both rules ({EAST_SLAVIC, TURKIC}readsuz_senate54/59 against 52/59) and reading the Kazakh-uly/-kyzyendings as a Turkic signal._MIN_PATRONYMIC_VOTESis unchanged, with what it decides now recorded: with--set _MIN_PATRONYMIC_VOTES=1on this tree no same-order cell moves, and groups written given-first move a family-first base sooner (pv-RU-patronymic53.3 / 83.7 / 94.7 / 100 to 100 at every size).Tool
suggest_measure.pygainspv-RU-patronymicand reads every parliament list underFAMILY_FIRST_GIVEN_LASTas a third base. On master that population's same-order row shows the harm in full (the first table row).FAMILY_FIRST_GIVEN_LASTdraw, the rule besidecapitals_as_familyin one patch, and a given-first patronymic list whose words cast no order vote. The tool as it stood for the first form gave one table for it and for this one. With the two additions it tells the first form from master in four places: the three family-first lists underFAMILY_FIRST_GIVEN_LAST, andpv-RU-patronymicwritten given-first under a family-first base at five names (99.0% for 100%).Tests
tests/v2/test_suggest.py: both regression lists; a pure list written last; one with two-word names; a tie, 5+3 and 3+5; an ending on both words counting as middle; non-voters not counted;FAMILY_FIRST_GIVEN_LASTwith a plain list; a base carrying the rule under each family-first order and each writing; a base carrying the Turkic rule; the names' own votes deciding given-first and family-first; both notes' text.FAMILY_FIRST_GIVEN_LASTgiven the keep branch (4); position read from the last word (1) or the first (9); the count made over all names (1); the names' given-first votes ignored (1, by its notes); never kept (13).Docs
Decisions entry rewritten to this form with the first form kept as dated history; Standing lines, head notes,
Open:;Parser.suggest's docstring and docs/suggest.rst (the same sentences); docs/getting-started.rst (a limit sentence the first form added is gone); the tool's docstring and printed line; tools README; AGENTS.md's lesson, naming the two inputs. Sentences that said the rule "stands down" where only its reordering does are corrected in_suggest.py, docs/locales.rst and the decisions head notes.Checks
uv run pytest(48,627 passed),uv run pytest -n0 -m serial,uv run mypy,uv run ruff check,sphinx-build -b doctestand-b html,python -m doctest README.rst, and the suite on 3.15 in its own environment, all on 05501df. The closing commit 965d0ec changes one note string, prose, example names and test rows; on it the suggester, tool and doc tests, ruff, mypy and the doctest build were re-run. PrivateNAMEPARSER_TOOLS_CACHEon every tool run. Example names checked against the ORCID, PatentsView and parliaments files, by whole name and by family and given boxes.Unrelated, not fixed: the HTML build warns that
docs/migrate.rst:1338references the labelcustomize-md-titlewith no title, since #1395.🤖 Generated with Claude Code