Skip to content

Read a bare Wm as the given name it abbreviates, not a title (#789) - #873

Merged
derek73 merged 3 commits into
masterfrom
fix/issue-789-wm-given-name
Oct 25, 2026
Merged

derek73 merged 3 commits into
masterfrom
fix/issue-789-wm-given-name

Conversation

@derek73

@derek73 derek73 commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Takes bare wm (William) out of the default titles, so Wm Smith reads given Wm, last Smith. 1.4.0 through 2.5.0 read title Wm with no given name. This is part (a) of #789. Part (b), the dotted Wm., stays open for phase 2 (#752).

wm was listed as a title in 0.5.5 for #68, which asked that Wm. Scott Magargee III not read given name Wm.. That request was mistaken: Wm is William written short. The title reading is now an excluded = { title = … } entry in nameparser/vocab/en.toml that carries the reason, so anyone who adds it back hits the reason as a build error (query.py --word wm, --issue 789).

What moves

Input Before (2.5.0) After
Wm Smith title Wm, last Smith first Wm, last Smith
Wm Scott Smith title Wm, first Scott first Wm, middle Scott
Dr. Wm Smith title Dr. Wm title Dr., first Wm
Wm. Smith title Wm. title Wm. (unchanged, rules/H2)
John Smith Wm. title Wm. last Wm. (1.4.0 through 2.2.0's reading)
Smith, John Wm. title Wm. middle Wm. (1.4.0 through 2.2.0's reading)
Wm. Smith, John title Wm. last Wm. Smith (1.4.0 through 2.4.0's reading)

Out of scope: the dotted Wm. opening the given part. rules/H2 (the leading-abbreviation title) reads any unlisted period-marked abbreviation there as a title, whether or not the word is listed. Making Wm., Chas., Geo., Ma. or Jo. a given name in that slot needs a reading that outranks a shape rule. That is phase 2's D14(b), not this PR. tests/v2/cases.py pins today's Wm. Smith so the phase 2 change shows up there. #789 stays open for that half (this PR does not close it), and it is on decisions/vocabulary-model's Open: line.

A correction this PR makes. The 2026-10-19 decisions entry, and #789's body, both say removing wm moves only the bare spelling. That was wrong on its date. It took the off-switch parse at the head of the name only. A trailing Wm. (rules/H5, the trailing title run) and a Wm. before a family comma (rules/H6, the title before a family comma) are read by vocabulary, not shape, so they move too. The entry is corrected in place, and the mechanisms.md field note now says to take the off-switch parse in each position as well as each spelling.

Measured

Base is 08d130e. Local snapshots were recorded with --tree on a master checkout.

  • Committed snapshot and CLDR / GND / Wikidata agreement views: no move. No committed corpus holds the token wm, so these could not move.
  • fec-individuals: 77 of 1,893,964 names move.
    • 69: bare WM opens the given part.
    • 3: bare WM behind another title.
    • 3: trailing WM..
    • 2: WM. before the family comma.
  • ctgov-officials: 1 of 352,104 moves. Wm behind a title, before a family comma.
  • psc-individuals (local_agreement.py): matches the record.

Docs

Checks

  • uv run pytest and -n0 -m serial: pass.
  • uv run --python 3.15 pytest: pass.
  • mypy and ruff check: clean.
  • sphinx-build -b doctest docs: 0 failures.
  • README doctest: passes.
  • A design-docs review found five issues, all fixed. A second review of the fix commit found one dating nit, also fixed.

🤖 Generated with Claude Code

derek73 and others added 3 commits October 24, 2026 19:16
`wm` was listed as a title for #68, which asked that `Wm. Scott
Magargee III` not read given name `Wm.`. Wm is William written short,
so the request was mistaken; on 08d130e bare WM opened the given part
of 69 FEC donor names, every one read as a title. The title reading is
refused in en.toml with that reason.

The dotted Wm. opening the given part is still rules/H2's title; a
given reading that outranks H2 is phase 2's (#752). Where vocabulary
read it (a trailing Wm., H5; a Wm. before a family comma, H6) it is a
name word again, as in 1.4.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ve the dotted half open (#789 review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added bug vocabulary Per-word vocabulary model and language packs labels Oct 25, 2026
@derek73 derek73 self-assigned this Oct 25, 2026
@codecov

codecov Bot commented Oct 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.07%. Comparing base (08d130e) to head (01c45e8).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #873   +/-   ##
=======================================
  Coverage   99.07%   99.07%           
=======================================
  Files          47       47           
  Lines        4735     4735           
=======================================
  Hits         4691     4691           
  Misses         44       44           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@derek73 derek73 added this to the 2.6 milestone Oct 25, 2026
@derek73
derek73 merged commit 26f7bc1 into master Oct 25, 2026
12 checks passed
@derek73
derek73 deleted the fix/issue-789-wm-given-name branch October 25, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug vocabulary Per-word vocabulary model and language packs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant