Repository navigation
Add an ORCID surname table to the group suggester (#1364) - #1484
Merged
derek73 merged 2 commits intoNov 19, 2026
Merged
Conversation
COMMON_SURNAMES: every word ORCID's holders typed in the family-name box 100 times or more and in the given-name box in at most 5% of their uses, less the other tables' words, the titles and suffixes the given names refuse, the lexicon's particles, conjunctions, bound given names, maiden markers and Hangul surnames, and the Turkic patronymic markers: 559 words, mostly Spanish. It votes with the romanized table as SURNAMES, under the surname signal's rules. Where a decided East Slavic rule meets a family-first order the votes decide, a FAMILY_FIRST_GIVEN_LAST base gets FAMILY_FIRST, whose reading leaves the patronymic where it is written. suggest_measure.py gains Spanish-, Portuguese- and Filipino-language populations and two of given names that are surnames (pv-surname-given, pv-listed-given). Measured at 5% and 12%; 5% ships, 12% is open (decisions/group-suggestion, 2026-11-19 #1364). No parse moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a checkout (#1364) _script_tables loads nameparser/config/_order_names.py by its checkout path, which the installed-package layout does not hold. 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 #1364
Option (B) from #1364: a mirror of the given-name table built from ORCID's family-name boxes. It is a private table that only the group suggester reads. No parse moves, and the snapshot and agreement records are byte-identical.
What changes
tools/vocab/order_names.pyhas a newcommon_surnamesrecipe. It keeps every word ORCID's holders typed in the family-name box 100 times or more and in the given-name box in at most 5% of their uses, folded as_suggest.foldfolds. It then refuses:It also has a 400-word floor, and
check_tablesrefuses any overlap among the three tables.nameparser/config/_order_names.pygains the generatedCOMMON_SURNAMESblock (559 words, mostly Spanish) andSURNAMES = ROMANIZED_SURNAMES | COMMON_SURNAMES.nameparser/_suggest.py: the surname signal, the Should a name ending in a short capitals word cast a surname vote inParser.suggest?Zhi LIvotes family-first, byZhi#1397 veto and_a_listed_nameall readSURNAMES. A word listed at one end of a name and not at the other votes that the family is at that end. A name listed at both ends, from either table, votes nothing. The ShouldParser.suggestreadAM Hoyas initials and a surname? A given-first byline list (AM Hoy,GH Yoon) is suggestedFAMILY_FIRST#1355 and Should a name ending in a short capitals word cast a surname vote inParser.suggest?Zhi LIvotes family-first, byZhi#1397 capitals exclusions are unchanged. There is no newSignal.A fix the review found: a Latin-script Russian list written family first (
Popov Ivan Ivanovich) now casts family-first surname votes. Under aFAMILY_FIRST_GIVEN_LASTbase that kept the base's order, which reads the patronymic as the given name: 0 of 5 names read right, where master reads 5 of 5. Now, where a decided East Slavic rule meets a family-first order that the votes decide, aFAMILY_FIRST_GIVEN_LASTbase getsFAMILY_FIRST. This holds whether or notcapitals_as_familyis on. A first fix that exempted the switch was itself found by review to read mixed-case lists 0 of 5, and is gone.tools/differential/suggest_measure.pygains new populations:pv-surname-given: given boxes opening with a word PatentsView writes as a family name at least as often (Santiago,Cruz);pv-listed-given: given boxes opening with a word of the new table.Its populations read the tables from the script's own checkout.
Docs:
Parser.suggest's docstring, docs/suggest.rst and docs/getting-started.rst are re-taken.2026-11-19 #1364. Head notes were added to TABLES, FIX WAVE, What shouldParser.suggestdo with a list mixing-ovichandoʻgʻlipatronymics, or a family-first list of them? (Karimov Rustam AnvarovichbesideAliyev Farrukhis forced given-first) #1356, Should the group suggester knowJohn,DavidandJamesas given names? A list ofSmith John,Jones Davidgets no suggestion #1357, Should a name ending in a short capitals word cast a surname vote inParser.suggest?Zhi LIvotes family-first, byZhi#1397 and ORDER FLOOR.Recipe figures
Measured over the
orcid-researcherscache (ORCID 2025-10-17 file, sha256b95ffd68…):den,der,김,이,кызы(shipped)The issue measured 1,776, 578 and 565 on 2026-11-12, under an earlier spelling and given-name table. At 12% the table is 942 words.
Measured
Command:
tools/differential/suggest_measure.py --wrong-words 12, one--jsonrun per arm (master 6560abd via--tree, this branch, and the 12% table via--tree). 300 groups a size, seed 20261110. Two sets of sizes: the default 2–200, and 2–2,000.1. Same-order rows (the anti-goal).
orcid-bylinegiven-first under a given-first base rises: 95.3 → 98.7% at 100 names, so it is no longer an exception.orcid-byline-joined(94.7 / 93.3% at 50 / 100 names) andorcid-givcapsread exactly as on master.pv-listed-given: a list of nothing but given names that the table lists as surnames (606 names, mostly US inventors namedClarke,Cooper,Burke,Murphy, plus Spanish surnames typed into the given box). It fails both same-order rows at every size, and reads 0% from 5 names. This is the cost the issue's option text accepted. In mixed lists it does not show: PatentsView's US inventors cast 13 wrong surname votes in 3,000 names, both on master and at 5%, and their same-order rows read 100%.pv-surname-givenwas added to hold them, and its same-order rows read 99.7% or more at 5%.2. Spanish lists written family first under a given-first base, at 2 / 3 / 4 / 5 names
Portuguese and Brazilian lists.
3. Indian, Nigerian, Turkish, Bangladeshi, Pakistani and Filipino lists. At 5% they move within a point, mostly up. Japanese lists and PSC's Filipino filers are now read right from 10 names, not 20.
Size from which a row written against its base reads ≥95% (master → 5% → 12%), where it moves:
orcid-bylinegiven first under a family-first base: 2,000 → 500 → 200.orcid-byline-joinedfamily first under a given-first base: 200 → 100 → 50.Per name (237,268 names, all populations, both writings,
pv-listed-givenapart):Whole names (given and family against the boxes; 21 populations × both writings × three bases, at 2 / 5 / 20 names): every same-order cell is within 1.0 point of master at 5%, and within 2.5 points at 12%.
Parliaments: no list's order, rule or capitals decision moves under any of the three bases, and the TURKIC table is unchanged.
4. Harness proof. With
--set _MIN_VOTES=1000000 --set _MIN_PATRONYMIC_VOTES=1000000 --set _MIN_RUN_NAMES=1000000, all 86 rows written against their base read 0%, all 86 written in it read 100%, and no parliament order is decided.Cutoff: 5%, and why
12% helps Portuguese and Brazilian lists written given first, and Indian lists (
sharma,patelandguptaenter the table). But it costs Brazilian and Portuguese lists written family first at 10 and 20 names, and pushes PV Brazilian's size from 20 to 50. Those losses may be an artifact: PatentsView's and PSC's boxes put the first of two surnames in the given box (Ramirez Ismael Ortiz), a writing no real list uses, and the listed second surname then votes against it. That is reasoning, not a measurement, so I shipped the tighter cutoff and recorded 12% as open.Open questions
pv-listed-given's cost: English given names that ORCID's holders rarely type as given names (Cooper,Burke). Only a given-name source cleared for use could take them out of the table.O’Brien) is counted under its own spelling, as in the given names.For #1452
COMMON_SURNAMEScan serve the futuretwo_family_namesvote (a listed surname second-to-last, with another name word after it), with three cautions:COMMON_SURNAMES, notSURNAMES: in a Chinese name the second-to-last word is a given-name syllable.lopezbesidegarcia). But it also holds surnames from many languages, so a listed word is not evidence of a Spanish list on its own.Checks
uv run pytest(50,979 passed),uv run pytest -n0 -m serial,uv run mypy,uv run ruff check, anduv run sphinx-build -b doctest docs <tmp>all pass, on the head rebased onto master d12af9d. Every new test row was run against the pre-change code to see it fail where it should.Review aspects run
🤖 Generated with Claude Code