Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/customize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,9 @@ signatures:
usual way says nothing about how the name was cased.
- A suffix written in more than one case is the writer's spelling and
is kept as written (``john smith EdD`` gives ``John Smith EdD``)
unless you pass ``force=True``.
unless you pass ``force=True``. An unlisted credential read by its
mixed case after a comma (``Jane Smith, MRes``) is kept as written
even then, since nothing else says how it is spelled.

.. doctest::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Open: none in this file.

## Log

- 2026-11-10 (Derek), #1238 — INITIALS RUN TOGETHER BEHIND ONE WORD ARE THE GIVEN NAME WHATEVER THEY SPELL. `Jansen, J.P.` read suffix 'J.P.' and no given name, where `Jansen, J.Q.` read given 'J.', middle 'Q.' (rules/T7 parting it): a listed credential never reached C4's count, so the comma was a suffix comma before C5's exception was asked. Dutch lists write every name `Surname, Initials`, and a pair of initials spells a listed credential as often as letters fall together. The issue's three questions were decided on these measures, taken 2026-11-10 against master d4a8a884:
- 2026-11-10 (Derek), #1238 (its acceptance of `Smith, M.B. ChB` as given 'M.' superseded by 2026-11-21 #1517) — INITIALS RUN TOGETHER BEHIND ONE WORD ARE THE GIVEN NAME WHATEVER THEY SPELL. `Jansen, J.P.` read suffix 'J.P.' and no given name, where `Jansen, J.Q.` read given 'J.', middle 'Q.' (rules/T7 parting it): a listed credential never reached C4's count, so the comma was a suffix comma before C5's exception was asked. Dutch lists write every name `Surname, Initials`, and a pair of initials spells a listed credential as often as letters fall together. The issue's three questions were decided on these measures, taken 2026-11-10 against master d4a8a884:
GAIN. The Tweede Kamer's open data (3,083 members, initials, particle, title and surname in separate boxes; `Persoon` from the OData feed, read 2026-11-08), composed as `Surname, Initials`: 82 of 1,236 members with dotted initials lost the given name on master, 1 on the branch (`de Roo van Alderwerelt, J.K.H`, three letters behind two name words, C5's Accepted case); `Surname, Initials particle` 23 of 305 → 0; `particle Surname, Initials` 24 of 305 → 1 (`de Nerée tot Babberich, F.J.F.M.`, the same case); `Surname, Title Initials` 41 of 461 → 13, each a degree in front of the initials (`Biekman, MSc A.N.`), which reads as the credential run.
COST. `snapshot.py --local <corpus> --base <master checkout>`: ClinicalTrials.gov officials move 11 of 352,104 distinct names, every one a lone surname before `M.D`/`M.D.`/`M.S` (`Ferguson, M.D.` → given 'M.', middle 'D.', reported); FEC's 2026 individual contributors move 160 of 1,893,964 names, of which 65 are lone runs spelling no common credential (`BATES, D.M.`, `OWENS, J.P.`), 26 `J.D.`, 6 `M.S.`, 2 `M.D.`, 5 another lone two-letter credential, 33 a credential then a name past a second comma (`ARENAS, M.D., MAGDALENA C.`, which read the name as a suffix on master and reads the credential as initials now, as its unlisted twin does), and 23 a run with more behind it (`CLAYTON, A.M. TONY`, `RINEHART, J.D. JR.`, `WRIGHT, M.S. III`); PSC individuals, UK Electoral Commission donors and TSE donors move none. The committed corpora move 2 names (`Andrews, M.D.`, `Smith, A.B.C.`).
WHICH HEADS. Every comma head was declined: the 24 ClinicalTrials.gov officials with two words before the comma and a dotted credential (`Bin Zhang, M.D.`, `Le Shen, M.D., Ph.D.`) are all credentials, and would all have moved. One name word is C4's count, and one word as written too, since the count passes over a title word and reads a capitalized particle with its surname as one: the first build moved `Ashley Knight, M.S. BME` (family 'Ashley Knight') and `Bin Zhang, M.D.`, found by the ClinicalTrials.gov run and the grid. So a title word is a word here, and a particle is none only written in lower case before a word with a capital, the Dutch tussenvoegsel's writing (`de Waart, J.P.`); a lower-case particle before a word with no capital keeps the credential (`du juan, M.D.`), while a one-word head in lower case is one word (`smith, M.D.` → given 'M.'). The second review found the numeral strip dropping any word shaped like one (`Le Vi, M.D.`, `Dr. Vi, M.D.`) and a listed single letter (`Smith V, M.D.`, a whole name to C1): a numeral is passed over only in capitals, a suffix word only of two or more letters behind a word, and a title left alone is no surname (`Dr. VI, M.D.`). The code review found a lone capitalized particle (`Le, J.P.`, a Vietnamese surname) and a numeral of two or more letters ending the head (`Jansen VI, J.P.`, C3's count) kept out; both now read as one word. A suffix word is passed over only where it ends the head: one in front of a word is a word (`Dr.B. Akila., M.D`, found by the ClinicalTrials.gov run of that fix).
Expand All @@ -21,3 +21,4 @@ Open: none in this file.
WHERE IT SITS. The first draft amended rules/C5, and the design-docs review found it outside C5's When (two letters, unlisted) and its Signal, overriding C13 and contradicting C11 with neither saying so; it is rules/C16, with a precedence line in C8 and C13, a sentence in C11's first Then bullet, and a line in C1's map.
HOW. `_comma.decide` gathers the first such run and passes it to `segment_suffix_reading`, which returns no reading where the run stands in the part's leading run of titles, so the part is the given part; the run is then tagged `initial`, as a run written apart is, so the given part's walk does not peel it as a trailing suffix behind a title, and the report is made there, where the decision was taken. ACCEPTED: `Smith, M.D.` reads given 'M.', middle 'D.', the credential named in the report, the 11 ClinicalTrials.gov names and FEC's handful of lone `M.D.`/`M.S.` the cost; 1.4.0 read all of these given 'J.P.' or 'M.D.' whole, 2.0.0 through 3.0.1 suffix (wheels, 2026-11-10).
RECOMPUTE: the Tweede Kamer figures compose `Achternaam`, `Tussenvoegsel`, `Titels` and `Initialen` from the feed's `Persoon` entity in the four forms above and count the parses with an empty given name, in each tree; the local ones are `uv run python tools/differential/snapshot.py --local ctgov-officials --base <master checkout>` and the same for `fec-individuals`, `psc-individuals`, `ukec-individuals` and `tse-donors`.
- 2026-11-21 #1517 — A MIXED-CASE CREDENTIAL BEHIND THE RUN IS ITS COMPANY. Decided 2026-11-21. `Smith, M.B. ChB` reads suffix 'M.B. ChB', reported, where the #1238 entry accepted given 'M.', middle 'B. ChB' (as 1.4.0 read given 'M.B.', middle 'ChB'), because the caps shape now reads a word in mixed case that opens with two capitals or ends in one after a comma (decisions/C6's 2026-11-21 #1517 entry), and an unlisted capitals word C6 admits behind the run is company, as `Smith, J.P. AUD` read already. A credential written in neither shape stays a name word behind the run (`Smith, M.D. PhDc`, `Smith, M.D. M. Sc.` → given 'M.'), as the rule's Accepted bullet now states. The cost: a given name written in the shape behind the run is company too, so `Jansen, J.P. IJsbrand` reads suffix 'J.P. IJsbrand' and no given name, where ad9d5d20 read given 'J.', as `Jansen, J.P. IJSBRAND` already read; accepted in the rule, a list writing initials and then such a name being rarer than the credentials written so behind initials. SUPERSEDES: the #1238 entry's acceptance of `Smith, M.B. ChB`.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Standing

- After a comma, an unlisted word of letters in mixed case that opens with two capitals or ends in one is the caps shape as an all-caps word is, in C4's count, C6's contrast and C16's company (`Jane Smith, MRes` → suffix 'MRes'); a capital only inside the word, or a hyphen or slash in it, keeps it a name word (`Jane Smith, LeBron`, `Jane Smith, Pharm-D` → given), and the trailing positions under `CapsSuffixes.EVERYWHERE` read capitals alone (`Alex Lee ONeill` → family 'ONeill') — 2026-11-21 #1517.

Elsewhere: this rule's decision, that an unlisted all-caps word after the comma joins the ambiguous credential class by default behind two name words, where the name carries a case contrast (`John Smith, XYZ` → suffix 'XYZ'; `Smith, XYZ` → given 'XYZ'; `MÜLLER WEIß, HANS` → given 'HANS'), with its two-letter rule (narrowed for two capitals followed by credentials by decisions/C5's 2026-11-11 #1323 entry, and for two capitals alone before a later part's listed credential by its 2026-11-15 #1392 entry) and the mixed-run membership — decisions/S9's 2026-10-01 (Derek), #564 entry, where the caps shape's switch is decided; the contrast test reused for a suffix word ending the name before the comma — decisions/C12's 2026-10-18 (Derek), #656 entry.

Open: none in this file.
Expand All @@ -10,3 +12,11 @@ Open: none in this file.

- 2026-10-01 (Derek), #564 — AN UNLISTED ALL-CAPS WORD IS A CREDENTIAL IN THE PART AFTER A COMMA BEHIND TWO NAME WORDS, BY DEFAULT. The decision, its two-letter rule and the mixed-run membership are recorded under decisions/S9 (#564), where the caps shape's switch has always been decided; this bullet is C6's pointer to it.
- 2026-10-18 #728 — SPLIT FROM decisions/C1 with the rule. The entries above were written under decisions/C1 while this rule was part of rules/C1, and moved here unchanged but for the pointers the move broke, the measurement paragraphs, each cut to one line naming its population, counts, baseline and PR, and the superseded passages, each cut to its decision and what replaced it; where one says rules/C1 or C1, it means the rule as it then stood, which held this one.
- 2026-11-21 #1517 — A WORD IN MIXED CASE WRITTEN THE WAY A CREDENTIAL IS JOINS THE CAPS SHAPE AFTER A COMMA. Decided 2026-11-21. An unlisted word of letters in mixed case that opens with two capitals or ends in one (`MRes`, `DClinPsy`, `AuD`, `BScN`) is the caps shape wherever an all-caps word is read after a comma: C4's count, C6's contrast and C16's company (`Jane Smith, MRes` → given 'Jane', family 'Smith', suffix 'MRes', reported, where 1.4.0 through 3.1.0 read given 'MRes', family 'Jane Smith'). Such a word is written neither in capitals nor the way a name is, and no vocabulary lists every degree written so. A capital only inside the word is a name's writing (`LeBron`, `McKenzie`, `DeShawn`), and a word in mixed case holding a hyphen or a slash is left out: a first build took joined chunks too, and given boxes are full of names joined so (`Cheng-I`, `I-Chun`, `Jay-R` in hundreds of ORCID given boxes, `Gul-E` and `Noor-E` in PSC's), so `Pharm-D` stays the given name, as does `PhDc`, whose ends hold one capital.
GAIN. `snapshot.py --local <corpus> --base <ad9d5d20 export>`: ClinicalTrials.gov officials 915 moved of 539,368, 776 gaining the credential (`AuD`, `DClinPsy`, `DNSc`, `MBBChir`, `MRes`, `BMedSci` among the words taken, and `PhD` behind them), one reading `MDs` as the credential where it had read `Abd`, and 138 moving only the forced case view or a report's alternative; contacts 652 moved, 580 gaining the credential (`AuD`, `MEd`, `BScN`, `HBSc`) and 72 a case view or an alternative only; ORCID researchers 24 moved, all credentials (`CEng`, `PGDip`, `MAEd`), `local_agreement.py orcid-researchers --base` scoring 5 fixed, 0 broken, 2 changed (wrong either way); FEC, GOV.UK people, UK Electoral Commission donors, DOF signatures, PSC and PatentsView 0 moved, and PSC's and PatentsView's agreement unchanged.
COST. One name of the moved reads wrong, a Catalan given name typed with a doubled capital (`LLuís`) behind a two-word head. Beyond the moved, the shape costs a given name written in it what the all-caps shape costs one written in capitals, in two forms. Behind two or more name words and a comma, the listing form reads it as the credential (`García Márquez, JOSE` and `García López, DAndre` → suffix), which reaches a given name typed without its apostrophe (`DAndre`, `ONeill`) and a surname in capitals behind a lowercase prefix (`McDONALD`, `DiCAPRIO`), each recorded as accepted in rules/C6; narrowing the spelling to spare the second would cost about 190 of the credentials the moved names gained (ClinicalTrials.gov officials 126, contacts 63, ORCID 1), which end in a run of capitals behind a lowercase letter too (`MScPT`, `PhDMD`, `MBBChBAO`). And behind one word, a run of initials spelling a listed credential takes such a name as company, so the list loses its given name (`Jansen, J.P. IJsbrand` → suffix 'J.P. IJsbrand'; rules/C16's Accepted bullet), where ad9d5d20 read given 'J.'. A given box holding a word of the shape, unlisted, in a record of mixed case, is in 577 of ORCID's 1,831,533 records (typos such as `MAria`, initials glued to a name, and real spellings, Dutch `IJsbrand` and Serbo-Croatian `LJiljana`), 55 PatentsView records and no PSC record; no fielded corpus composes either form, so the boxes bound the exposure rather than count it.
WHY NOT EVERYWHERE'S TRAILING POSITIONS. Ending a name without a comma the shape is how a surname typed without its apostrophe is written (`ONeill`, `DSouza`, `OReilly`), and how `McCAFFREY` is: about 770 ORCID family boxes hold such a word alone, each of which would lose its family name in a name of three words under `CapsSuffixes.EVERYWHERE`. So the predicate takes the mixed-case arm only where the comma's decision asks (`caps_shape_candidate`'s `mixed_case`), and classify's trailing tag reads capitals alone (`Alex Lee ONeill` → family 'ONeill' under EVERYWHERE).
CASE REPAIR (rules/R4). A shape word in mixed case is kept as written, forced or not, where the shape's mark would otherwise send it to the acronym clause's capitals (`MRES`; on ad9d5d20 the word was the given name, forced `Mres`); and the company a C16 run takes now carries the shape's marks the count gives, so `Smith, J.P. AUD` and `Ashley Knight, M.S. BME` keep their capitals forced, where master wrote `Aud` and `Bme`.
C16. `Smith, M.B. ChB` reads suffix 'M.B. ChB', as `Smith, J.P. AUD` already did; the reversal of that part of decisions/C16's 2026-11-10 #1238 entry is decisions/C16's 2026-11-21 #1517 entry.
THE FILTER'S OWN NARROWING. The comma's C-level filter first widened `isupper()` to `not islower() and not istitle()`, which drops a word of capitals split by a caseless letter (`istitle()` reads `XיZ` title-shaped): the corpus run found the one such word ctgov-contacts holds moved from the suffix to the given name, and the filter keeps `isupper()` as an arm of its own (case row `a_caps_word_holding_a_caseless_letter_stays_a_credential`).
RECOMPUTE: the moves, `snapshot.py --local ctgov-officials --base <export of ad9d5d20>` and likewise `ctgov-contacts`, `orcid-researchers`, `fec-individuals`, `govuk-people`, `ukec-individuals`, `dof-signatures`, `psc-individuals`, `patentsview-inventors`; the box counts, over each fielded corpus's `raw.jsonl` in the tools cache (ORCID's and PatentsView's `given` box, PSC's `forename` and `middle_name`; for the 770, ORCID's `family` box holding the word alone), the words that this PR's `_vocab._mixed_capitals` admits once NFC-composed and `in_any_wordlist` refuses under the default lexicon, in records whose composed `name` is neither all upper nor all lower case, measured on 2026-11-21.
Loading