Repository navigation
Silence the surname vote where a name ends in a listed surname in two or three capitals (Zhou NG) - #1398
Merged
Conversation
… or three capitals A capitals word of two or three letters ending a mixed-case name was not looked up as a surname while the word in front of it was, so the group suggester's surname signal voted by the word in front alone: `Zhou NG` cast a family-first vote wherever the given name is a listed surname too, and a given-first list of short capitals surnames moved a given-first base. The ending word is now looked up, only to veto: where it is itself a listed surname the name casts no surname vote; otherwise the word in front votes as before, and the ending word never votes alone. The capitals vote stays silent. suggest_measure.py: orcid-famcaps-short written given-first keeps a given-first base in 100% of groups at every size (97 / 96 / 93 / 90 / 79 / 83 / 94 / 100% before), and no byline cell or vote moves. decisions/group-suggestion's 2026-11-14 #1397 entry holds the re-taken table, the accepted costs and the three variants declined. Closes #1397 Co-Authored-By: Claude Fable 5.2 <[email protected]>
…r the reviews of #1397 The design-docs review found a cost the run shows and the entry did not record: a name written family first whose given name is two or three capitals that spell a listed surname loses its family name's right vote (33 of orcid-givcaps' 132 written family-first, 2 of vi's 2,102). It is recorded beside the four accepted costs. The entries that stated the superseded "no surname lookup" carry head notes, "the word in front" is said to be the name's first word, and the declined variants' recipes name their code. The code review found no defect; a row filed under the wrong test is moved, and rows are added for a three-word name, the spelling fold, a joiner in the ending word and a vetoed name among names that vote. Co-Authored-By: Claude Fable 5.2 <[email protected]>
… with their recipes The cost the design-docs review found is not yet accepted, so it leaves the Accepted list for a bullet of its own that says so, and its moved row is given as three cells. The wrong votes the veto leaves in orcid-famcaps-ea are 12 on names of the class it reads and 6 on names it never read, with the count's recipe. The ORCID shape snapshot states the definition its digits come from. Guide and reference say the first word is usually the given name there and the table cannot tell the readings apart. The tools README dates its proof count and drops an undated percentage; the Declined recipes say what --tree takes and that the edit replaces the whole statement. Co-Authored-By: Claude Fable 5.2 <[email protected]>
The cost the design-docs review found (a family-first name whose given name is two or three capitals that spell a listed surname loses its family name's right vote) is accepted, so it joins the Accepted list as its fifth item, its finding in review kept as history. 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 #1397
A capitals word of two or three letters ending a mixed-case name (
Armitage JO, joined initials;Jason NG, a short surname) was not looked up as a surname, while the name's first word was. The group suggester's surname signal votes where exactly one end is listed, so it voted by the first word alone:Zhou NGcast a family-first vote wherever the given name is a listed surname too, and a given-first list of short capitals surnames moved a given-first base.The rule
In a name holding a lowercase letter that ends in a capitals word of two or three letters, the surname signal casts no vote where that ending word is itself a listed surname; otherwise it votes by the word in front, as before; the ending word never votes alone. The capitals vote stays silent.
Implementation choices beside it:
_at_one_endlost itsskip_lastparameter. A differential of the new_readagainst "master plus only the veto" over 680,943 generated names found 0 differences (code review).Parser.suggestreadAM Hoyas initials and a surname? A given-first byline list (AM Hoy,GH Yoon) is suggestedFAMILY_FIRST#1355 is unchanged and silences the signal whatever ends the name (NG Zhou JO).Parser.suggest()bullet,suggestbeing new in 3.1.Measured
uv run python tools/differential/suggest_measure.py --wrong-words 12 --base <an export of d516e89c>, 2026-11-14, 300 groups a size, seed 20261110. Share of groups suggested right at 2 / 3 / 4 / 5 / 10 / 20 / 50 / 200 names. These are all six order rows that moved.orcid-bylineandorcid-byline-joinedare identical in both written orders under both bases, and so are their per-name and per-signal counts (orcid-bylinewritten family-first: surname 76 right, 5 wrong, before and after).capitals_as_familydecision moved; the TURKIC table and every parliament list are identical.orcid-famcaps-short(3,000): 485 / 445 / 1 / 2,069, surname 0 and 440 → 485 / 37 / 1 / 2,477, surname 0 and 32.orcid-famcaps-ea(1,411): 683 / 122 / 6 / 600, surname 460 and 128 → 683 / 12 / 6 / 710, surname 460 and 18.orcid-famcaps(3,000): surname 143 and 57 → 143 and 20.--set _MIN_VOTES=1000000 --set _MIN_PATRONYMIC_VOTES=1000000 --set _MIN_RUN_NAMES=1000000): 0% on all 58 rows written against their base, 100% on all 58 written in it.orcid-famcaps-short's row holds 100% at every size, so it is off the tool's list of anti-goal exceptions (the tool's docstring, AGENTS.md, tools/differential/README.md).orcid-byline-joined's given-first row at 50 and 200 names andorcid-givcaps' two rows stay on it, unchanged.Accepted costs, recorded in decisions/group-suggestion (2026-11-14 #1397)
orcid-famcaps-short(440 before), 12 of 1,411 inorcid-famcaps-ea; that population's other 6 wrong surname votes (18 in all, 128 before) are on names that do not end in a short capitals word, which the rule never read.Kim JO). None of the pooled bylines' right votes was one.orcid-byline-joined's given-first row stays under 95% at 50 and 200 names.orcid-givcaps' 132 right surname votes written family-first, 2 ofvi's 2,102; it moves one row in three cells,orcid-givcapsfamily-first under a family-first base at 3, 4 and 5 names, above.Declined, with recipes in the entry
Each is an edit to the
silenttest in_suggest._read, run with--tree <copy>; each re-run from this tree gave the same cells as the measurement made before the change was written.orcid-byline-joinedwritten family-first under a given-first base 0.3 / 2.3 / 3.7 / 5.3 / 16.0 / 37.0 / 77.7 / 99.0 → 0 / 0 / 0 / 0 / 0.7 / 1.7 / 10.3 / 26.0, and its same-order row falls to 93.0% at 200 names.Marsh JO):orcid-byline-joined's same-order row falls to 98.7 / 97.0 / 94.3 / 93.7 / 80.3 / 66.7 / 72.3 / 76.7.Tests
tests/v2/test_suggest.py: the ending word listed or not, the first word listed or not, both; two and three letters, four unchanged; three-word names; a capitals word before the ending word; post-nominals with and without a comma, a title, a family comma; the spelling fold; a joiner in the ending word; a short capitals word at both ends (the ShouldParser.suggestreadAM Hoyas initials and a surname? A given-first byline list (AM Hoy,GH Yoon) is suggestedFAMILY_FIRST#1355 rule); lists under eachname_orderbase, one of them with a vetoed name among names that vote.silentclause, run against the final tests, each caught: master's rule (the veto gone, the old guard kept) fails 17 rows; the clause dropped (the ending word votes alone) fails 10; firing on every name ending in short capitals fails 10; asking the first word instead of the last fails 20. Restoring the old guard beside the veto passes every test, as it must: it changes no reading.Checks
uv run pytest(48,594 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 once on 3.15 in its own environment (the serial run and the 3.15 run on the first commit; the second changes prose and test rows, and the full parallel suite, mypy, ruff and both docs builds were re-run on it). Every measurement ran with a privateNAMEPARSER_TOOLS_CACHE. Every example name this PR adds was checked against the ORCID corpus.Reviews run on the first commit, findings fixed in the second: design-docs review (every recomputed figure reproduced; the unrecorded cost above, missing head notes on two older entries, two wording points) and code review (no defect; one test row filed under the wrong test, missing edge rows). The second commit was reviewed independently by the coordinating session (code and design docs: no defect, every figure and all three Declined recipes reproduced); its six prose findings are the third commit, 1f32df3.
Unrelated, not fixed: the HTML build warns that
docs/migrate.rst:1338references the labelcustomize-md-titlewith no title, since #1395.🤖 Generated with Claude Code