Repository navigation
Cast no capitals or surname vote on a name opening in two or three capitals (AM Hoy) - #1396
Merged
Merged
Conversation
…pitals A byline written initials first (`AM Hoy`) opens in a word of two or three bare capitals, which the group suggester's capitals signal read as the family name, so a given-first list of them was suggested FAMILY_FIRST. The same shape is a short surname (`NG Jason`), and the word alone does not say which. In a name holding a lowercase letter, such a word opening the name now casts no capitals vote, and the name casts no surname vote; a run of capitals words in front, and a word of four letters or more, vote as before. suggest_measure.py: ORCID's bylines written given-first keep a given-first base in 98% or more of groups at every size (96 / 85 / 76 / 67 / 27 / 9 / 0 / 0% before). The tool gains two populations, orcid-byline-joined and orcid-famcaps-short; decisions/group-suggestion's 2026-11-14 entry holds the re-taken table, the accepted costs and the variants declined. Closes #1355 Co-Authored-By: Claude Fable 5.2 <[email protected]>
The code and design-docs reviews found prose wider than the rule and its table: docs/suggest.rst and the Standing line said a list of short capitals words keeps its base, which the table shows only for small lists; two docstrings said the ending word's rule applies to a word standing alone, which only the opening word's does; an older entry still named the superseded table as current. Dutch stays at 10 names, read on the whole percents the table prints. Edge rows added for a decomposed letter, a joiner inside the word, brackets, post-nominals, three words and a run of capitals in front. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…ames docs/suggest.rst states the opening rule with its qualifier (no word in capitals after it), as the docstring does. The Standing line holds the decided rule alone, its reach as implemented marked for review. Example names this change wrote that an ORCID holder bears are replaced with ones checked against the ORCID corpus. The #659 item 7 recipe names the command that reproduces it, run as written; a figure that contradicted its own row is reworded; the tool's docstring leaves its undated percentages to the dated entry; the ending word's item links #1397. 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 #1355
A byline written initials first (
AM Hoy,QZ Yoon) opens in a word of two or three bare capitals. The group suggester's capitals signal read that word as the family name, so a given-first list of them was suggestedFAMILY_FIRST. The same shape is a short surname in a list that writes its families in capitals (NG Emily), and the word alone does not say which.The rule
In a name holding a lowercase letter, a capitals word of two or three letters opening the name casts no capitals vote, and a name opening in such a word casts no surname vote. There is no group gate.
Implementation choices beside it:
DE SOUZA Maria,LI WANG Zhi), and so does a word of four letters or more (PARK Emily).WU Zhiwould vote given-first byZhi).Armitage JO) andcapitals_as_familyare unchanged.Parser.suggest()bullet rather than a bullet of its own:suggestis new in 3.1, so no release holds the old behaviour.Measured
uv run python tools/differential/suggest_measure.py --wrong-words 12 --base <an export of a8dbe1ce>, 2026-11-14, 300 groups a size, seed 20261110. Share of groups suggested right at 2 / 3 / 4 / 5 / 10 / 20 / 50 / 200 names.capitals_as_familydecision moved, the TURKIC table did not move, and two parliament lists' vote counts moved (in_sansad99 to 98 against,id_dpr35 to 32) with no decision changed.orcid-bylinewritten given-first (2,215 names; right / wrong / contested / none): 42 / 536 / 44 / 1,593 before, 45 / 16 / 0 / 2,154 after. Capitals 0 right and 566 wrong before, none after; surname 82 and 73 before, 41 and 6 after; given-name 4 and 10, unchanged.--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-byline's own row now holds 98% or more 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).Accepted costs, recorded in decisions/group-suggestion (2026-11-14 #1355)
orcid-famcaps-ea21 / 42 / 68 / 79 / 100% at 2 to 10 names (96 / 100% before). From 10 names both read 100%.WU Zhi) is no evidence but for its given names: 1 / 4 / 13 / 16 / 44 / 81 / 99 / 100%.The entry also holds the re-taken table for every population, the variants measured and declined (the capitals vote alone, the opening word not looked up, a given-first vote, the ending word voting again, a group gate with its gain and its contamination cost), and what counting short words toward
capitals_as_familywould do.Left as found
Two same-order rows of the new populations sit under 95%, and the tool's exception list now names them:
orcid-byline-joinedgiven-first at 50 and 200 names (93.3% and 92.0%): a list of nothing butAM Hoybylines leaves 16 of 644 names voting, and a large group is decided by those few.orcid-famcaps-shortgiven-first (97 / 96 / 93 / 90 / 79 / 83 / 94 / 100%), the same before and after: a short capitals word ending a name is not looked up while the word in front of it is, soZhi LIcasts a family-first surname vote byZhi. This PR does not change it; it is Should a name ending in a short capitals word cast a surname vote inParser.suggest?Zhi LIvotes family-first, byZhi#1397, and decisions/group-suggestion'sOpen:line links it.Tool and tests
suggest_measure.pygainsorcid-byline-joined(644 names: bylines whose given part is one word of two or three bare capitals) andorcid-famcaps-short(5,013: family box one word of two or three letters), so the next change sees these rows. The gate's five upper-cased populations were not added: they are synthetic.tests/v2/test_suggest.py: rows for two and three letters, four (still votes), a run in front, opening and ending, dotted and spaced initials, a name wholly in capitals, a table surname in front (MA Hoy), the given-name signal beside the word, a decomposed letter, a joiner inside the word, brackets, post-nominals, and lists under eachname_orderbase. 29 of the first commit's new rows fail on master (checked by me, and again by the code review with master's module swapped in).KIM Jason J.as a heavily marked name now usePARK Emily J., the opening word no longer voting.Checks
uv run pytest(48,555 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 and third commits change prose, test rows and example names, and the suggester and doc tests, mypy, ruff and both docs builds were re-run on the third). Every measurement ran with a privateNAMEPARSER_TOOLS_CACHE.Reviews run on the first commit, findings fixed in the second: design-docs review (all quoted tree figures reproduced; prose wider than the table in docs/suggest.rst and the Standing line, a stale table pointer, a miscounted "four cells") and code review (no defect; two docstrings said the ending word's rule applies to a word standing alone, missing edge rows). The second commit was reviewed independently by the coordinating session (code and design docs); its six prose findings and the made-up-names check are the third commit, dc816d3: every example name this PR adds was checked against the ORCID corpus (boxes composed either way, and credit names), and the ones a holder bears were replaced.
Unrelated, not fixed: the HTML build warns that
docs/migrate.rst:1338references the labelcustomize-md-titlewith no title, since #1395.🤖 Generated with Claude Code