Repository navigation
Read two capitals alone in a comma part as a credential before a later listed credential (Jane Mary Doe, MH, PhD) - #1407
Merged
derek73 merged 10 commits intoNov 16, 2026
Conversation
…r listed credential (Jane Mary Doe, MH, PhD) `Jane Mary Doe, MH, PhD` read given 'MH', family 'Jane Mary Doe' from 1.4.0 through 3.0.1: the comma decision reads the part after the first comma alone, and rules/C5's clause for two capitals before credentials (#1323) looked for the credential inside the pair's own part. A pair that is the whole part is now kept in the credential run where any later comma part is nothing but listed credentials; the head still needs two name words and the case contrast, and CapsSuffixes.OFF keeps the given name. Unchanged: a one-word head (`Smith, JO, MD`), a pair with no later listed credential (`Jane Doe, MH, Jr.`), a pair with company in its own part, and the dotted pair, which is left as an open question in decisions/C5 with its census. rules/C5 and C1, decisions/C5 (census, measurements, the two declined alternatives) and C1, the sweep note in nameparser/AGENTS.md, the release log, migrate.rst and policy.rst are amended with it. Closes #1392 Co-Authored-By: Claude Fable 5.2 <[email protected]>
…ir's own part asks (Jane Mary Doe, M.H., PhD) The dotted pair joins #1392's rule: two capitals with full stops, alone in their comma part behind two or more name words carrying the case contrast, are a credential where a later comma part is a listed credential. `unlisted_dotted_suffixes=False` keeps the dotted pair a name and `CapsSuffixes.OFF` the undotted one. Beside credentials in its own part the dotted pair still keeps the given name. Review of the first commit found the later part read more loosely than the pair's own part. It now asks the same predicates: a joined word is asked chunk by chunk (`MH, MD/Jr.` keeps the name), a particle that is also an acronym is a name's word (`MH, Mc`), a delimiter standing alone is no word of the part (`MH, MD - PhD` is a credential run), and the case contrast is asked again, since CapsSuffixes.EVERYWHERE tags the pair without it (`JANE DOE, MH, PhD` keeps the name). Rows for each, for both family-first orders and for a credential that is not the last part; rules/C5, C1 and C12, decisions/C5 and C1, the sweep note in nameparser/AGENTS.md and the user docs follow. Co-Authored-By: Claude Fable 5.2 <[email protected]>
… not ask, where each rule says otherwise Second review of #1392's fix commit, prose only (no reading moves): rules/C11 called every flip with no listed member silent, and the dotted pair's flip before a later credential is reported; rules/S3 and S9 and decisions/S9's Standing lines restated the older limits; the particle hold-back was claimed for the dotted pair, which is read by its shape whatever its letters spell; the census recipe lacked two details needed to recount it and now names PR #1407 for its script; two single letters written apart are refused as no split credential, not as ambiguous; and the joined-word gaps the shared predicate does not ask are recorded as open on both sides of the comma. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…contrast after the later part has answered Second code review of #1392's fix commit. The later part's words were read with a delimiter glued to them, where the comma decision reads the pair's own part without it, so `Jane Doe, MH, MD/Jr.;` flipped where `MH, MD/Jr.` and `BM MD/Jr.;` did not; the later part reads the stem now. The contrast is asked only once a later part has answered, so a dotted pair no later part speaks for pays 5 frames, not 29. A row for each, and for `DO`, a credential that is also a particle, which speaks for no pair on either side of the comma. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…capitals-before-later-credential
…a particle spells read as, and separate what was decided from the choices made Coordinator review of #1392's PR, prose and rows only (no reading moves). decisions/C1, C12 and S9 each kept a Standing line stating a limit the later credential now lifts; rules/C5 said undotted capitals that spell a particle stay a name, which is false of the three the vocabulary also lists as a credential (`MC`, `VD`, `DO`) and of `ST`, a title; decisions/C5 now sets the decision apart from the implementation choices, lists three readings as open rather than accepted (`MH, Md`; a dotted pair spelling a particle; `VI, PhD`), records the `locales.VI` particle-head limit and the fullwidth shapes with a row each, names the other shapes "any later part" takes with `MH, John, PhD`, accounts for the seventeenth dotted name, and marks the rule a candidate for a split. The pointer in policy.rst now points up, where its text is. Co-Authored-By: Claude Fable 5.2 <[email protected]>
tools/docs_scan.py, new on master, flagged each past its paragraph length; policy.rst now reports none and migrate.rst only master's own. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…give each shape it names a row Third review of the PR's fix commits, prose and rows only (no reading moves). `VI` and `IX` before a later credential land in the generation view as `II` does and differ only by the report; the particle-head limit belongs to any choice of languages that drops the particle's reading, not to `vi` alone; a particle with a delimiter glued to it still speaks (`MH, Mc;`), a gap of the shared tests recorded with a row; two counts are corrected (`IV` 8 times, three of the nine dotted ctgov pairs spell a particle); decisions/C16 and C6 restated the older limit; the `Md` row's note calls it open as the entry does; and `MH, de, PhD`, `MH, PhD, Smith` and `MH, Dr., PhD` get the rows the entry said they had. policy.rst's two sentences say which pairs and which later parts they mean. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…e rule's words Docs and rows only, no reading moves. Decided 2026-11-15: a later part that is a credential a given name written short also spells speaks for the pair (`Jane Doe, MH, Md`); a dotted pair whose letters spell a particle reads as a credential (`Jane Doe, A.L., PhD`), the undotted letters staying a name; and two capitals that spell an unlisted numeral read through the pair and are reported (`Jane Doe, VI, PhD`), the report's unevenness with the listed `II` accepted as it is. rules/C5 carries an Accepted bullet for each, decisions/C5 quotes the same sentences with the measured reason, and each has a case row. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…d sentences mean Review of the accepted-costs commit: undotted letters that spell a particle stay a name unless the vocabulary also lists them as a credential or a title (MC, VD, DO, ST), and only an unambiguous credential a given name written short spells (Md) speaks in any case; Ma, a member of the ambiguous class, speaks only in capitals. The rule and the entry agree word for word. Co-Authored-By: Claude Fable 5.2 <[email protected]>
derek73
deleted the
fix/issue-1392-two-capitals-before-later-credential
branch
November 16, 2026 06:28
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 #1392
What changes
Two capitals alone in a comma part, behind a full name, are read as a credential where a later comma part is a listed credential, dotted or not. Before, the comma decision read the part after the first comma alone (rules/C1), and #1323's clause looked for the credential inside the pair's own part.
Jane Mary Doe, MH, PhDJane Mary Doe, M.H., PhDJane Doe, BM, BCh, PhDSmith, JO, MD,Doe, M.H., PhDJane Doe, MH,Jane Doe, MH, Jr.Jane Doe, MH Jr., PhD,Jane Doe, M.H. PhDJANE DOE, MH, PHDThe pair needs what #1323's needs (two name words, the case contrast), and each shape keeps its own switch:
unlisted_caps_suffixes=OFFkeeps the undotted pair a name and leaves the dotted one a credential;unlisted_dotted_suffixes=Falsethe reverse;AFTER_COMMAandEVERYWHEREread both. A later part is a listed credential where every word is one the pair's own part would take as company and the vocabulary lists: no generation, particle, gated word, Title-case member, or word read by shape; a joined word is asked chunk by chunk and a delimiter standing alone is skipped. The flip reportssuffix-or-name, as the three-capital flip does.Measurements (2026-11-15; head = this branch, which merges master dfd9b77; the corpus moves re-taken against dfd9b77, whose
nameparser/is 92f4a55's)Census, every local corpus and the committed ones (script below). The shape (a part of one or two unlisted two-letter words, another part wholly listed suffix words) is written by ClinicalTrials.gov officials 430 of 352,104 names, FEC 26 of 1,893,964, ORCID 22 of 1,871,547, and no other corpus. Read by hand, every name with the pair before a listed credential behind two or more words: two capitals 142 of 142 a credential, office or title, 0 initials; dotted pairs 19 of 19 a credential, 0 initials. Master misread 59 of the two-capital names and 20 of 21 dotted ones. Initials alone between a one-word surname and a listed credential (
Smith, JO, MD) are written by no corpus.Moves at the head,
snapshot.py --local <corpus> --base <dfd9b777>:All 71 read one by one: 69 to the whole name right, 2 better and still not right for another reason (a head written family first; a compound surname), none wrong.
local_agreement.py: psc, PatentsView and cz match the base; ORCID changes 4 records whose filed boxes hold the credentials themselves.cldr_agreement.py: matches the record.match_diff.py --base: 117 pairs move under each of the 22 settings, every one a pair holding a name this PR's own matching test adds (Ji Eun Lee, MH, PhD,Ji Eun Lee, M.H., PhD, the issue's example); no pair drawn from the corpora moves, the draw holding none of the shape. The key guarantee holds. The matching gain is pinned bytest_two_capitals_before_a_later_credential_match_the_name_without_them: consistent with the name written without the pair and sharing its key, where master read a conflict and no shared key._frames_for/_calls_per_parse, one fresh process per tree): reference row 285.80 → 285.80,Smith, John136 → 136,Jane Mary Doe, MH288 → 288;Jane Mary Doe, M.H.388 → 388; a later part read and declined,Jane Mary Doe, MH, Jr.343 → 348 andJane Mary Doe, M.H., Jr.434 → 439;Jane Mary Doe, MH, PhD349 → 389;Jane Mary Doe, M.H., PhD438 → 402.CapsSuffixes.OFF, the 4 dotted under every one butunlisted_dotted_suffixes=False.Accepted costs (rules/C5 Accepted, each a case row)
García Márquez, MJ, PhD,García Márquez, M.J., PhD,Ortega y Gasset, MJ, PhD: a surname of two words reads as a full name, the cost ShouldJane Doe, BM PhDreadBMas a credential, not the given name? #1323 took forMJ PhD. No corpus holds one.Ana Ruiz, JO, MDreads suffix 'JO, MD' (a given name in two capitals; one that is also a particle,AL, stays a name).Ram Bahadur, BK, MDandRam Bahadur, B.K., MDflip, underlocales.NEtoo.Jane Doe, MH, John, PhDreads suffix 'MH, John, PhD', flaggedcomma-structurebefore and after: an unwritten shape, and a guard would keep the 5 ctgovBM, BCh, PhDnames wrong.Jane Doe, MH, Mc, PhD,MH, de, PhD,MH, PhD, Smith,MH, Dr., PhD(title 'Dr.', suffix 'MH, PhD').Bin Zhang, MH, PhDandFreiherr von Berg, MH, PhD(rules/C3 counts one name word); the dotted pair beside credentials in its own part (Jane Doe, M.H. PhD); the Title-case pair (Mh,Ph), not taken.Decided the same day after being held open, each as it ships (rules/C5 Accepted, a case row each):
Jane Doe, MH, Mdreads suffix 'MH, Md' (master: given 'MH', suffix 'Md'): a later part that is an unambiguous credential a given name written short also spells speaks for the pair in any case (Ma, a member of the ambiguous class, only in capitals), as in the pair's own part. No corpus holds a pair before a later part writtenMd, so a guard would cost and save no measured name.Jane Doe, A.L., PhDreads suffix 'A.L., PhD' (master: given 'A.', middle 'L.'), where undottedALstays a name (undottedMC,VD,DOare listed credentials andSTa title). A guard would leave 5 of the 17 dotted corpus names wrong (S.T.four times,D.A.once, all degrees read right) and save none known.Jane Doe, VI, PhDreads suffix 'VI, PhD' and reportssuffix-or-name(master: given 'VI'), whereJane Doe, II, PhDreads suffix unreported; that unevenness is accepted as it is.VIandIXfill thegenerationview asIIdoes;XIlands incredentials. No corpus writesVI,IXorXIthere, and a guard would returnVIto the given name.Limits and recorded gaps (decisions/C5)
locales.VI(de la Vega, MH, PhD),CS/HR/SK/SL(st John, MH, PhD), and strict choices lacking the particle's file. The same-part twin read so on master already.Jane Doe, M.H., PhDis no pair on either tree; a later partMDdoes not speak one comma along.MD/Mc), a word joined by a full stop (MD.Jr), and a particle or generation with a delimiter glued (MH, Mc;,MH, Jr.;;). The last is new in the later part with this PR and has a row.Declined (decisions/C5), measured as spikes on 92f4a55
bm nc mn sm rm ca dn cs mhcldr_agreementThe wide rule shows the defect is wider than two capitals (ctgov: inner-capital
AuD/DNSc191, Title-case words 172); a follow-up issue is drafted, not filed.Checks
uv run pyteston 3.11 and on 3.15 in its own environment: 49,766 passed each (the commit after it is docs and rows only, checked by the doc tests and the case table);-n0 -m serial: 38 passed; mypy, ruff,sphinx-build -E(-b doctestand-b html),python -m doctest README.rstandtools/vocab/build.py --checkclean;tools/docs_scan.pyreports nothing forpolicy.rstand only master's own three formigrate.rst.Reviews
First commit:
pr-review-toolkit:code-reviewer,pr-review-toolkit:pr-test-analyzeranddesign-docs-reviewer, each given the diff and not its author's reading. They found the later part read more loosely than the pair's own part (a joined word asked whole, a particle counted, a spaced delimiter refusing a listed part,EVERYWHEREflipping a name with no contrast), a mutant surviving on "any later part", untested family-first readings, an unstated condition in the new rule bullet, frame figures taken with another counter and a census recipe too loose to re-run. The second commit fixes each and adds the dotted pair.Second commit, reviewed in turn (
pr-review-toolkit:code-reviewerfor code and tests,design-docs-reviewer). Both reproduced the corpus moves, the frames and the wheel claims from the trees. They found: a later part's word read with a delimiter glued to it, soMH, MD/Jr.;flipped whereMH, MD/Jr.did not (fixed, fourth commit, with the contrast now asked after the later part has answered); rules/C11, S3 and S9 and decisions/S9's Standing lines still stating the older limits, C11 calling the dotted flip silent when it is reported; the particle hold-back claimed for the dotted pair, which is read by shape whatever its letters spell (A.L.: prose corrected, behaviour kept, one of the nine dotted ctgov names being such a degree); the census recipe missing two details; andM. A.refused for the wrong stated reason (third commit, prose only). Extracting the shared predicate moved none of 100,485 same-part parses.Recorded as open, not this PR's: a particle or a Title-case dual as a chunk of a joined word (
MD/Mc) and a word joined by a full stop (MD.Jr) pass as credentials on both sides of the comma, on master too for the pair's own part;DO, a credential that is also a particle, speaks for no pair on either side. rules/C5 now carries a third signal and is recorded as a candidate for a split (decisions/C5, Open).Coordinator review at 41970ce (two reviewers), then a third
design-docs-reviewerround over the fix commits: three more Standing lines and two "Elsewhere" lines qualified (decisions/C1, C12, S9, C16, C6); what undotted capitals that spell a particle read as stated exactly (MC,VD,DOcredentials,STa title, the other 14 and both connectives a name); the entry now separates the decision from the implementation choices and lists the three open readings; an error of mine corrected (VIandIXdo fill thegenerationview); counts corrected (IV8, three of nine dotted ctgov pairs); rows added for every shape the entry names. The third round re-took the frames, the 71 corpus moves and the census (430 / 26 / 22) from the trees and they reproduce. Asking the contrast last moved none of 302,400 parses against 99699e7 beyond the glued-delimiter rows it was for.Census script (reads each cached corpus.jsonl; fetches nothing)
Sweep script and its 103 names
Declined spike: the wide rule
Declined spike: vocabulary only
🤖 Generated with Claude Code