Repository navigation
Read MD before a name word in a name of one case as Muhammad written short (#1394) - #1466
Merged
Merged
Conversation
…short (#1394) In a name written wholly in one case, a credential that is also a given name written short (`md`) with a name word behind it no longer starts rules/S8's credential run: its case is the name's and says nothing, so it reads as its Title case does (#1019). `SITI NORA MD YUSRI` gives middle 'NORA MD', family 'YUSRI', as 1.4.0 through 2.3.0 did, where 2.4.0 through 3.1.0 gave suffix 'MD YUSRI'. The decline reports `suffix-or-name`, the credential the reading not taken. `_pieces.short_given_name_in_one_case` is a fourth writing in `declined_by_the_name_behind`, so the run start, P2's chain stop and assign's family-part pass ask one predicate. It keeps the run before a word of no cased script and a maiden marker; a word in a maiden clause or brackets asks the whole name's case (S6). `run_start` records the decline in `Peel.declined` for assign to report. A numeral S10 reads as the generation is no name word behind any declining writing (`John Smith Md VI Jones` keeps the run). Rules S8 amended, decisions/S8 entry with measurements, release-log bullet, case rows, snapshot re-recorded for the new rules examples. Closes #1394 Co-Authored-By: Claude Opus 5.5 <[email protected]>
short_given_name_in_one_case opened by refusing a token without the given-abbreviation tag or a name not of one case, which both callers test inline ahead of the call; the guard and its one_case parameter go, the docstring stating the precondition. Assign's report loop asked that a declined word hold a name role, which it always does: run_start walks front to back and returns the first start, so a word it declines stands in the name core. An assert in its place held over 2,757,102 parses (19 words, 3 to 5 long, every comma position, three orders). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 19, 2026
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.
MDinside a name written wholly in one case now reads as Muhammad written short when a name word follows it, asMdin mixed case already did. It no longer reads as the medical degree taking the rest of the name. The decline reportssuffix-or-name, with the degree as the other reading.Closes #1394
The fix
SITI NORA MD YUSRISITI NORA MD. YUSRI,SITI NORA MD.YUSRIsiti nora md yusriAHMAD BIN MD RAHMANBIN MD RAHMAN, AHMADsuffix-or-namewith the credential as the alternative, saveBIN MD RAHMAN, AHMAD(see below). Master reported the run's absorbed word on all but that one too.SITI NORA MD YUSRIas this branch does; 2.4.0 through 3.1.0 read the run (wheels run outside the tree).How: rules/S8 (the credential's trailing run) gains a clause in "What is a credential here". Where no family comma divides the name, in a name written wholly in one case, a credential that is also a given name written short (
md) with a name word behind it does not start the run. Its case is the name's and says nothing, so it reads as its Title case does (#1019).The clause is
_pieces.short_given_name_in_one_case, a fourth writing indeclined_by_the_name_behind. So the run start, P2's chain stop and assign's family-part pass ask one predicate.What stays the credential
JOHN SMITH MD,JOHN SMITH MD PHD,JOHN SMITH MD JRJohn Smith MD JonesJOHN SMITH M.D. JONESSMITH, JOHN MD JONESMd)JOHN SMITH MD NÉE JONESJOHN SMITH MD VI JONESمحمد علي MD حسنMDthere shares no case with the name)JOHN SMITH née Ann Lee MD Jonesma, the other given name written short that is a credential, is an ambiguous member and starts no run in a name of one case already. No other shipped word is reached.Accepted, recorded in rules/S8 and decisions/S8
JOHN SMITH MD JONES→ middle 'SMITH MD', family 'JONES'. In one case it cannot be told from Muhammad written short.Md:JOHN SMITH MD MR→ family 'MR'.JOHN SMITH MD PROF.keeps the title, since H5 takes it first.Two neighbouring moves the review found
John Smith Md VI JonesandJohn Smith MA VI Jonesread suffix '… VI Jones', where master read family 'Md' / 'MA'. Both have rows.Measured (against 3175314)
Run with
tools/differential/measure.py --base <checkout of 3175314d>over every fetched local corpus, andlocal_agreement.py orcid-researchers --base … --list 100. Each step's moves were read by name.MD/MD.for Muhammad before a name wordMD Xin the family box, which no positional reading gives. US: 0 movedMD, the degree there, is now a middle word, reportedPer country in ORCID's agreement table, MY, BD and US move by at most 2 records each, so their rates are unchanged at one decimal.
Tests
tests/v2/cases.pygains 29 rows: the fix rows, the boundaries above under the comma shapes and three orders, and the review's shapes.parity_check.py: 0 of 639parityrows read otherwise under 1.4.0. Three rows 1.4.0 reads differently were relabelledfix(#1394).BADRUL AKMAL HISHAM MD YUSOFF(suffix 'MD YUSOFF') is reversed and renamed. It pinned Read a Title-case credential acronym before a name word as a name word (rules/S8) #1019's boundary from before ShouldMohd RahmanmatchMohammad Rahman? #1383 gavemdits given reading._STAND_IN_REREADSgains the rows where a name word in the stand-in's place makesMDMuhammad;_UNGUARDED_EFFECTtwin control stays 11;test_vocab's_MD_KEEPS_ITS_CREDENTIALcontrol: 9 of 10, the glued row having moved to the case table.John Smith90,Smith, John98, the reference row 229,John Smith MD127). The rare shape pays the whole-name case test (JOHN SMITH MD JONES150 → 178).Docs
docs/design/rules/S8: the clause, examples, a What-reports bullet and an Accepted bullet.docs/design/decisions/S8: a Standing bullet and a 2026-11-18 Log entry, with head notes on the superseded Read a Title-case credential acronym before a name word as a name word (rules/S8) #1019 entry and on decisions/vocabulary-model and decisions/indic-honorifics, which had recorded the gluedMD.NOORshape as left wrong.docs/release_log.rst: one bullet.docs/customize.rst: the "Keeping Md. a title" recipe notes that it also restores this run.AGENTS.md,nameparser/AGENTS.md, and the tag's comments in_classify.pyand_state.py: the new reader ofvocab:given-abbreviation.Not done here
BT(binti) andUDin capitals.SITI HAJAR BT KHALITstill reads suffix 'BT KHALIT'. These words have no given reading, so this clause does not reach them. Worth its own issue.BIN MD RAHMAN, AHMADreads right, unreported; master reported nothing there either.John Smith Md née Jonesloses its maiden clause on master and here, in the Title-case arm. Not touched.Checks
uv run pytest,uv run pytest -n0 -m serial,uv run mypy,uv run ruff checksphinx-build -b doctest,python -m doctest README.rsttools/vocab/build.py --check,snapshot.py --recordafter reading every moveReview aspects run
docs/design/All findings were fixed or recorded above.
🤖 Generated with Claude Code