Skip to content

Cast no capitals or surname vote on a name opening in two or three capitals (AM Hoy) - #1396

Merged
derek73 merged 3 commits into
masterfrom
claude/issue-1355-byline-initials-1c1867
Nov 15, 2026
Merged

derek73 merged 3 commits into
masterfrom
claude/issue-1355-byline-initials-1c1867

Conversation

@derek73

@derek73 derek73 commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

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 suggested FAMILY_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:

  • The word is the first one the signals read (titles read past), in any cased script, and the word after it is no capitals word. A run of capitals words in front votes as before (DE SOUZA Maria, LI WANG Zhi), and so does a word of four letters or more (PARK Emily).
  • The surname signal is silent on the whole name, not only on the opening word. It votes where exactly one end is listed, so skipping one end would let the other vote alone (WU Zhi would vote given-first by Zhi).
  • The given-name, particle, trailing-initial and patronymic signals read the name as before. The ending word's rule (Armitage JO) and capitals_as_family are unchanged.
  • The release log gets the issue link on the Parser.suggest() bullet rather than a bullet of its own: suggest is new in 3.1, so no release holds the old behaviour.
>>> Parser().suggest(["AM Hoy", "JK Larsen", "RP Huntley", "MT Okafor", "QZ Yoon", "SL Perrin"]).patch
PolicyPatch()        # was PolicyPatch(name_order=FAMILY_FIRST)

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.

population written base before after
orcid-byline (the anti-goal row of #1355) given-first given-first 96.0 / 85.0 / 75.7 / 67.0 / 27.0 / 8.7 / 0.0 / 0.0 100 / 100 / 99.7 / 100 / 99.7 / 99.7 / 98.3 / 99.7
orcid-byline given-first family-first 0 / 0 / 0 / 0.3 / 0 / 0 / 0 / 0 0 / 0 / 0 / 0.3 / 1.3 / 8.0 / 20.7 / 60.3
orcid-byline-joined (new) given-first given-first 31.3 / 13.3 / 6.3 / 1.7 / 0 / 0 / 0 / 0 100 / 100 / 100 / 99.7 / 99.7 / 98.0 / 93.3 / 92.0
orcid-byline-joined (new) given-first family-first 0 at every size 0 / 0 / 0 / 0.3 / 0.7 / 1.3 / 7.7 / 19.7
orcid-famcaps family-first given-first 96.3 / 100 / 100 / 100 … 78.7 / 95.0 / 99.7 / 100 …
orcid-famcaps-ea family-first given-first 96.3 / 100 / 100 / 100 / 100 … 21.3 / 42.3 / 68.3 / 79.0 / 100 …
orcid-famcaps-short (new) family-first given-first 96.0 / 99.3 / 99.7 / 100 / 100 / 100 / 100 / 100 0.7 / 4.0 / 13.0 / 16.3 / 44.3 / 81.3 / 99.3 / 100
orcid-givcaps (fails by design) given-first given-first 30.0 / 10.3 / 3.3 / 0 … 48.7 / 22.3 / 11.7 / 2.7 / 0 …
  • Seven more cells in four rows moved by one group in 300 (PSC's Indian filers, PatentsView's French, Indian and Dutch, each written family-first under a given-first base).
  • No other order cell moved. No capitals_as_family decision moved, the TURKIC table did not move, and two parliament lists' vote counts moved (in_sansad 99 to 98 against, id_dpr 35 to 32) with no decision changed.
  • Per name on orcid-byline written 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.
  • Harness proof (--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)

  • Small family-in-capitals lists written family-first move a given-first base less often: orcid-famcaps-ea 21 / 42 / 68 / 79 / 100% at 2 to 10 names (96 / 100% before). From 10 names both read 100%.
  • A family-first list whose capitals surnames are all two or three letters (WU Zhi) is no evidence but for its given names: 1 / 4 / 13 / 16 / 44 / 81 / 99 / 100%.
  • A given-first byline list under a family-first base is mostly left as the base reads it: 0 / 0 / 0 / 0 / 1 / 8 / 21 / 60%.
  • 16 wrong votes remain on the given-first bylines (given-name table 10, surname table 6).

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_family would 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-joined given-first at 50 and 200 names (93.3% and 92.0%): a list of nothing but AM Hoy bylines leaves 16 of 644 names voting, and a large group is decided by those few.
  • orcid-famcaps-short given-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, so Zhi LI casts a family-first surname vote by Zhi. This PR does not change it; it is Should a name ending in a short capitals word cast a surname vote in Parser.suggest? Zhi LI votes family-first, by Zhi #1397, and decisions/group-suggestion's Open: line links it.

Tool and tests

  • suggest_measure.py gains orcid-byline-joined (644 names: bylines whose given part is one word of two or three bare capitals) and orcid-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 each name_order base. 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).
  • Three existing rows that used KIM Jason J. as a heavily marked name now use PARK 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 doctest and -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 private NAMEPARSER_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:1338 references the label customize-md-title with no title, since #1395.

🤖 Generated with Claude Code

derek73 and others added 2 commits November 14, 2026 18:24
…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]>
@derek73
derek73 merged commit d516e89 into master Nov 15, 2026
14 checks passed
@derek73
derek73 deleted the claude/issue-1355-byline-initials-1c1867 branch November 15, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug suggester The group suggester: Parser.suggest() and its signals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should Parser.suggest read AM Hoy as initials and a surname? A given-first byline list (AM Hoy, GH Yoon) is suggested FAMILY_FIRST

1 participant