Skip to content

Read a leading Md as the given name it abbreviates, not a title (#853) - #860

Merged
derek73 merged 2 commits into
masterfrom
claude/md-abbreviation-853-49ced5
Oct 24, 2026
Merged

derek73 merged 2 commits into
masterfrom
claude/md-abbreviation-853-49ced5

Conversation

@derek73

@derek73 derek73 commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Answers question 4 of #853 (whether the md title decision holds up against filed data). Questions 1–3 (title words after another title, Wing, the period-marked Ma.) stay open on the issue, so this PR does not close it.

What changes

md loses its title reading and keeps its credential reading. Its excluded academic entry in en.toml carries the reason.

Input 1.4.0 – 2.5.0 Now
Mr Md Karim Uddin title Mr Md, given Karim title Mr, given Md, middle Karim
Md Rahman title Md, given empty given Md, family Rahman
John Smith, MD Jones title MD, given Jones, family John Smith family Smith, suffix MD Jones
John Smith MD, John Smith, MD suffix MD unchanged

A leading Md now reads the way the spelled-out Mohammad already did.

Evidence

The psc-individuals local corpus (#849) has 1,300 names whose forename box starts with Md. 1,246 of those filers typed Md alone in the forename box (37 as Md.), most putting the rest of the given name in the middle box. Each candidate reading scored against the filed boxes:

Reading given = forename box given left empty
title (before this PR) 0 94
credential only (this PR) 1,207 3
bound given name, like abdul 152 0

The bound-given reading was declined: it would make Md join the next word, which Mohammad doesn't do.

Moves in the other local corpora, against the same tree with md added back as a title:

  • ClinicalTrials.gov officials: 417 moved. 379 are the John Smith, MD Jones shape, fixed.
  • FEC: 10 moved, 9 of them broken (cost 2 below).
  • UK Electoral Commission: 4 moved, all to given.
  • Committed corpora: 16 entries. The recipe and figures are in the new decisions/indic-honorifics entry.

Accepted costs

Both are pinned as case rows and recorded in the decisions entry.

  1. A particle behind Md starts the family: Md Abu Sayed → family Abu Sayed (18 PSC names). Mohammad Abu Sayed already reads this way.
  2. Uddin, Md Karim reads the given part as credentials (rules/C13) and reports suffix-or-name (9 FEC names). Titles in front don't stop it: Uddin, Mr Md Karim gives title Mr, suffix Md Karim. Marking md ambiguous would fix this, but every John Smith MD would then report too.

Not changed

Other edits

  • Case rows, rule examples (C9, C11, C12, C13, H3, H4, H6, S7), decisions Standing lines and code comments that used MD as their title/suffix dual now use RA. RA reads exactly as MD did at 1.4.0, 2.3.0 and the parent; I checked this against the wheels.
  • The pair-scan benchmark's negative control was re-taken with RA: 120 → 1,620 at 47fb2b2, 35 → 131 on this tree.
  • decisions/C13's Should a comma part opening with a credential be a suffix comma? John Smith, PhD Jones reads family John Smith #603 entry gains a supersession note, since it had kept John Smith, MD Jones at its 2.3 reading.
  • The snapshot, the CLDR agreement record and the projected corpora were re-recorded. No CLDR rendering went from agreeing to disagreeing, and three titles now agree.

Verified on this branch: the full suite on 3.11 and 3.15, ruff, mypy, sphinx-build -b doctest and the README doctest.

🤖 Generated with Claude Code

`md` loses its title reading and keeps its credential one. A leading
`Md` abbreviates Muhammad: of 1,300 UK PSC names whose forename box
opens with it, 1,209 filers typed it there alone, and the title
reading had put the forename box in `given` for none of them.
`Mr Md Karim Uddin` now reads title 'Mr', given 'Md', middle 'Karim',
as `Mohammad Karim Uddin` does; `John Smith, MD Jones` reads suffix
'MD Jones' where the title reading made 'John Smith' the family
(about 380 ClinicalTrials.gov officials).

Accepted costs, recorded in decisions/indic-honorifics and pinned as
case rows: a particle behind Md starts the family (`Md Abu Sayed`,
as `Mohammad Abu Sayed` reads), and `Uddin, Md Karim` reads the given
part as credentials (9 FEC names). The Bengali মোঃ/মো entries stay
titles.

Rows, rule examples and comments that used MD as the title/suffix
dual are respelled with RA, which reads as MD did at 1.4.0, 2.3.0
and the parent; the pair-scan benchmark's negative control was
re-taken with it (120 -> 1,620 at 47fb2b2, 35 -> 131 here).

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

codecov Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.05%. Comparing base (04f806d) to head (fd07040).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #860   +/-   ##
=======================================
  Coverage   99.05%   99.05%           
=======================================
  Files          47       47           
  Lines        4669     4669           
=======================================
  Hits         4625     4625           
  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.

- decisions/C13's #603 entry gains its supersession note: #853 moves
  `John Smith, MD Jones` and the `MD - PhD - FACS` rows it had kept.
- Four rule examples still used MD as the title/suffix dual and no
  longer exercised their clause (C9, C11, C12, H6); respelled to RA,
  as is AGENTS.md's `is_title_piece` sentence.
- The accepted comma cost reaches a given part with titles in front
  (`Uddin, Mr Md Karim`); recorded, pinned as a case row, and the
  "reads as Mohammad" claim scoped to names with no comma.
- The release bullet stated that comma reading as unchanged; it now
  names it as the limit it is. The Standing line names the `Md.`
  exception.
- The PSC and corpus figures are restated against a written recipe
  (1,246 alone, 54 with more words, 18 families lost, 37 `Md.`, 16
  committed entries moved), and the en.toml reason follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 merged commit 280a4a9 into master Oct 24, 2026
12 checks passed
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