From 096e8d82729b08e53ebf5f01432d58d9f02e46a0 Mon Sep 17 00:00:00 2001 From: Derek Gulbranson Date: Fri, 20 Nov 2026 19:28:01 -0800 Subject: [PATCH 1/5] List BCh, BChir, BMBCh, the Nigerian marks and the Hong Kong honours as credentials (#1361, #1228, #1182) en.toml lists bch (cased BCh, lifting #1131's exclusion, since chb's concern does not carry over with mb listed) and bmbch (cased BMBCh); bchir with a family reading, the surname Bchir, so it is gated; the Nigerian marks mni, fwc, fsi, fnse, psc and ndc with lower-case masks; and the honours gbm, gbs, sbs, bbs and bbm. mh and sc are excluded (324 moves, mostly initials) and san waits for a Nigerian English choice. decisions/S12 and decisions/suffix-acronym-collisions record the reasons, the measurement and the accepted costs. Co-Authored-By: Claude Opus 5.5 --- .../S12-credential-split-across-a-space.md | 5 ++ .../decisions/suffix-acronym-collisions.md | 10 +++ docs/release_log.rst | 1 + nameparser/config/_compiled.py | 23 +++++++ nameparser/config/_index.py | 14 ++++ nameparser/vocab/en.toml | 65 ++++++++++++++++++- tests/v2/cases.py | 58 +++++++++++++++++ tools/differential/snapshot.jsonl | 6 +- 8 files changed, 177 insertions(+), 5 deletions(-) diff --git a/docs/design/decisions/S12-credential-split-across-a-space.md b/docs/design/decisions/S12-credential-split-across-a-space.md index 5db53a02e..c87c7606d 100644 --- a/docs/design/decisions/S12-credential-split-across-a-space.md +++ b/docs/design/decisions/S12-credential-split-across-a-space.md @@ -14,6 +14,8 @@ Examples name each field as the default order reads it; under the family-first o - Accepted: a pair opening with a single letter stays two words, so `John Smith, M. D.`, `M D` and `M. Sc.` keep the reversed reading; and a given name and its initial read as the credential their letters spell behind two name words with no comma and ending the given part after a family comma (`JOHN SMITH SAM E.` and `Smith, John Sam E.` → suffix, reported since the report entry below), and case repair then writes them as the acronym (`JOHN SMITH SAM E.` → 'John Smith SAM E.') — 2026-10-25 #752; 2026-10-25 #752, second review. - Case repair writes a pair group merged by its fold's mask, as the one-word spelling is written, on every comma path (`john smith, PHARM D` → 'Pharm D', as `PHARMD` → 'PharmD'), and unforced keeps a pair written in two cases as written, as the one-word spelling is kept (`john smith pharm D`, as `pharmD`) — 2026-10-25 #752, review; 2026-10-25 #752, second review. +- `bch` and `bmbch` are listed, so `MB BCh` is a run of two listed credentials and `BM BCh` merges into `bmbch`; `chb` stays out, its listing breaking `MB ChB` — 2026-11-20 #1361. + Open: none in this file. ## Log @@ -33,3 +35,6 @@ Open: none in this file. - 2026-10-25 #752 (Derek), the report — A SPLIT CREDENTIAL THE COUNT TAKES IS REPORTED, AS EITHER READING OF A MEMBER IS. SUPERSEDES: the first entry's SILENT paragraph. Derek, on #891's review: the merged pair is a member of the ambiguous class, which reports either reading (`John Smith MA` reports `suffix-or-name`), and with no report a given name and its initial that spell a credential become one where no caller can find them (`John Smith Ed D`, `Smith, Mary Ed D.`, `JOHN SMITH SAM E.`). So wherever the count takes the pair it reports `suffix-or-name` with one wording ("reads as a credential", a phrasing tests/v2/test_cases.py's field sweep already checks against the field the pair lands in): at assign's placement for the end of a name, the end of the given part and a run start, at `_comma.decide`'s binding for C4's count unless the flip it took part in already reports the part, and at the maiden take's release. A pair the count declines reads as its two words did unmerged and reports what they did, which on master is nothing. The cost is a report on the pairs nobody hesitates over (`John Smith Pharm D`), which the class's report carries for `John Smith MA` too. Measured 2026-10-25 against master 225f3d6f with `--base`, as the first entry: 353 ctgov-officials readings carry the report, 119 of them where master reported no `suffix-or-name` at all, the rest the `MB ChB` and run names whose absorbed-word report it replaces (so the 229 names that dropped a report in the first entry keep the kind, and ctgov moves 469 entries in all: 120 in the ambiguity kinds, each with a field move, 339 only in the force-repaired case view, and the rest in fields or case views without a kind move); the committed snapshot's rules examples gain it where the count takes a pair; tse-donors, fec-individuals, nepal-candidates and psc-individuals read as in the first entry (2, 1, none, matching the base). The field sweep's count goes from 1460 to 1487, nine case rows claiming the report under each order. - 2026-10-25 #752, review of the report — ONE PAIR REPORTED TWICE. After a comma, a pair behind a credential that opens the part (C13) was reported as a word the run absorbed and again as the pair (`Smith, MD Pharm D`, `, MD Pharm D`, `Smith, MD MB ChB`: 168 parses an order over the review's grid), where `John Smith MD Pharm D` reports it once. C13's absorbed report leaves a split pair out, so the pair reports itself (case row `a_split_credential_behind_an_opening_credential_reports_once`). The review also found the Standing line's "after a comma" wider than the code: a part the comma's decision already reports as a whole, and a part past the second comma, carry no pair report, as the Standing line now says. - 2026-10-25 #752, over #890 — RE-MEASURED: #890 merged first and took the ID S11, so this rule and file became S12. Against master b1e5a292 (phase 2h) with `--base`, every figure of the report entry above holds: ctgov-officials 469 entries, tse-donors 2, fec-individuals 1, nepal-candidates none, psc-individuals matching the base (1,004,785 of 1,039,171 agreeing on every field there, #890's own count), and the committed snapshot 2 moves and 28 new rules examples. +- 2026-11-20 #1361 — `BCH` AND `BMBCH` ARE LISTED; #1131'S EXCLUSION OF `BCH` IS LIFTED, AS `CHB`'S CONCERN DOES NOT CARRY OVER. Decided 2026-11-20. en.toml kept `bch` out on 2026-11-07 (#1131) "as chb is", but `chb` was refused because listing it alone broke `MB ChB, PhD`: the pair stopped merging into the listed `mbchb` and `MB` was left a name word. `mb` is listed, so with `bch` listed `MB BCh` is a run of two listed credentials rather than this rule's merge, and `Jane Doe MB BCh, PhD`, `Doe, Jane MB BCh`, `Jane Doe, MB, BCh` and `JANE DOE MB BCH` all still read the suffix; what the pair loses is the `suffix-or-name` report the merge drew. `bmbch` is listed too (cased `BMBCh`), so the split `BM BCh`, whose `bm` is not, merges by this rule into it (`Jane Doe, BM BCh` → suffix 'BM BCh', reported). + - **Measured** 2026-11-20 against a checkout of master `0d8c6fa8`, with `bchir` (decisions/suffix-acronym-collisions' entry of this date) and the other words of the same PR: `snapshot.py --local ctgov-officials --base`, 322 of 352,104 entries move, none emptying a given or family name or shortening a suffix (the moves grow the suffix, and 31 only drop the merge's report); `fec-individuals` 2 (`MURPHY, MARK T. BCH, FACC` gains the credential, and an `aus` case repair, decisions/vocabulary-collisions); `govuk-people` 1, a report; `local_agreement.py orcid-researchers --base` and `psc-individuals --base`, no record moved by these words; the committed snapshot, `Jane Doe, BM, BCh, PhD` dropping its `comma-structure` report. tests/v2/cases.py's `bch_after_a_comma_reads_the_credential`, `mb_bch_still_reads_as_one_suffix_run` and `bmbch_ending_a_name_reads_the_credential` pin it. + - Recompute: the two commands above with `--base `. diff --git a/docs/design/decisions/suffix-acronym-collisions.md b/docs/design/decisions/suffix-acronym-collisions.md index c4aaa18a1..3903efc4c 100644 --- a/docs/design/decisions/suffix-acronym-collisions.md +++ b/docs/design/decisions/suffix-acronym-collisions.md @@ -35,6 +35,8 @@ Not standing: the #454 bullet's note that the `fix(suffix-routing)` ledger rule Elsewhere: since phase 2a the ambiguous marking above is derived from a word's name reading rather than written as a flag, and no membership above moved — decisions/vocabulary-model's 2026-10-25 #752 — A CLASH WITH A NAME IS A NAME READING entry (phase 2a). +- `bchir` is marked ambiguous by its family reading, the surname Bchir, with no case mask; `mh` and `sc` are out, their clash being with initials; `san` waits for a Nigerian English choice of language — 2026-11-20 #1361. + Open: #1053, carried over from #965 (telling the credential `FREng`, written in mixed case, from the surname `Freng`; a case reading of S6's, held in decisions/S6). ## Log @@ -92,3 +94,11 @@ Open: #1053, carried over from #965 (telling the credential `FREng`, written in - **2026-11-09 (#998) — credentials written in two chunks joined at a full stop, a batch.** rules/S3 read an unlisted `B.Pharm` or `M.Kes` by its shape: a suffix with a suffix-or-name report where a word was to spare, a name word where none was (`Ali C.Psych` → family 'C.Psych'), and a title where a chunk is a listed title (`Ayu Pangestu, S.Pd, M.Pd` → title 'S.Pd M.Pd', `pd` being one). The same spellings without stops reversed a comma name (`Anna Gelavis, BPharm` → given 'BPharm'). **Candidates**: the spellings #998's recipe found ending a name in the six local corpora it counted, with second chunks of any length, sorted by hand. Each was put through `tools/vocab/query.py --word` (none had a reading or an exclusion) and `tools/name_usage.py` (counts taken 2026-11-09, recorded in each word's `note`). **Added** (43): 26 in en.toml (`bpharm`, `cpsych`, `mpharm`, `msci`, `mtech`, `dsci`, `mmath`, `moptom`, …), 16 in id.toml (`mkes`, `mkep`, `mkom`, `skom`, `mpd`, `spd`, `mhum`, `mkn`, `msi`, …) and `menf` in pt.toml. All but `msi` have no Census 2010, SSA or Wikidata bearer above each source's floor, and each carries its `cased` mask but `msci` (written MSCI 152 times against MSci 28 by ClinicalTrials.gov officials, so a mask would re-spell the common form) and `msi`. **Marked ambiguous**: `msi`, with a family reading and no mask, Msi being a Xhosa surname. Listed plain, it took the surname from `Andiswa Zanele Msi` in ORCID and `Mr Afikile Manduleli Msi` in PSC (suffix 'Msi'); marked, both keep it, reported. A name in one case with a word to spare still loses it (`ANDISWA ZANELE MSI` → suffix 'MSI'), the cost `mot` pays (#993), accepted because no local corpus writes the shape. Refusing it was tried and measured worse: a comma name reversed (`Jane Doe, MSi` → given 'MSi') and `Saprudin S.Sos., M.Si.` read given 'M.Si.'. **Refused**, each with an `excluded` entry giving its counts: `peng`, `ceng`, `barch`, `bchir`, `mendo`, `bed`, `ssi` (the romanized Korean honorific 씨, `Park Ji-hoon ssi`, which the committed snapshot holds), `sked`, `shut`, `merg`, `mak` and `mor`. `bed` is the Nepali given name Bed (59 nepal-candidates names), refused for the given part after a family comma: listed, `Thapa, Bed` reads suffix 'Bed'. No local corpus writes that shape. The gain refused is 6 readings of the 10 records writing the credential, 3 of them in a field (`Karina A Thiessen, BA BEd`, `John Zengulaaru (M.Phil., B.Ed)`), the other 4 already reading the suffix by rules/S3 or the comma. The same position, and the trailing given name under a family-first order, reaches `ded` and `edd`, whose Standing line this entry amends. `btech` is left unlisted, being the example of an unlisted dotted credential in eleven files; `mpdk` (`M.Pd.K.`, three chunks) was not a candidate and still reads as a title by its `pd` chunk. **Measured** (`tools/differential/measure.py --base` against master b89c5482, then ctgov-officials, orcid-researchers, psc-individuals, cz-candidates and jrc-names again on the final tree): ctgov-officials moves 407 of 536,981 readings, 122 of them in a field, each sampled one a credential leaving the given name, middle name, title or family name for the suffix (`Anna Gelavis, BPharm`, `Janice Pellow, M.Tech Hom` → suffix 'M.Tech Hom', `Veronique Michaud, BPharm. PhD`), the rest reports and case views; orcid-researchers moves 81, 50 in a field, mostly Indonesian degrees that had read as titles (`Dr. Rajab Agustini, S.Pd., M.Pd.` → title 'Dr.', suffix 'S.Pd., M.Pd.'); cz-candidates 2, jrc-names 1 (`Bernd Lange SPD` → family 'Lange', suffix 'SPD'), psc-individuals 1, its report only (`Mr Afikile Manduleli Msi`); the other local corpora, the committed snapshot and the CLDR, GND and Wikidata records do not move (opensanctions-parliaments not measured, its cache predating the datasets the tool reads). Scored: orcid-researchers 9 records agree that did not and 1 no longer does (`Saprudin S.Sos., M.Si.`, one name word, read family where the filer's given box holds it), cz-candidates 1 more agrees, psc-individuals and patentsview-inventors do not move. **Accepted**: `Ahmed Ali M.Hassan` keeps reading suffix 'M.Hassan', reported, the cost #998's proposal accepts; the division's count against it is in decisions/period-joined-words' 2026-11-09 #998 bullet. Pinned by the `two_chunk_credential_is_listed`, `two_chunk_credential_with_no_word_to_spare`, `family_comma_given_part_ends_in_two_chunk_credential`, `indonesian_credentials_after_a_comma`, `glued_initial_and_surname_still_read_by_position`, `two_chunk_credential_written_without_stops_after_a_comma`, `two_chunk_credential_in_capitals_without_stops`, `indonesian_credentials_with_no_comma`, `two_chunk_credential_after_a_one_word_head`, `ambiguous_msi_keeps_the_surname`, `ambiguous_msi_after_a_comma_is_the_credential`, `ambiguous_msi_in_capitals_takes_the_surname`, `refused_peng_keeps_the_surname`, `refused_bed_keeps_the_given_name` and `refused_ssi_keeps_the_word` case rows, and the masks by `tests/v2/test_render.py`'s `test_a_credential_written_in_two_chunks_takes_its_mask`. **Recompute**: `uv run python tools/vocab/query.py --issue 998` lists the entries; the moves by the command above against a master checkout. - **2026-11-10 (#1315) — the Royal Colleges' fellowships and memberships, a batch.** `John Smith FRCS` gave middle 'Smith', family 'FRCS', as did `Tanaka Hiroshi FRCS` under a family-first base (so #1310's group suggester voted given-first on it), and `Smith, John MRCP` gave middle 'MRCP': C6's caps shape needs a comma or a word the listing holds, and only `FACS` and `FACP` of the family were listed. 34 words listed (`en.toml`, `uv run python tools/vocab/query.py --issue 1315`): the Colleges of Surgeons, Physicians, Radiologists, Obstetricians and Gynaecologists, Ophthalmologists, Pathologists, Psychiatrists, Emergency Medicine, General Practitioners, Anaesthetists and Paediatrics, the Veterinary Surgeons (`mrcvs`), and the Canadian and Australasian royal colleges (`frcsc`, `frcpc`, `fracs`, `fracp`). **Vetted** by `tools/name_usage.py` and the local corpora: none has a Census 2010, SSA, nam_dict or Wikidata bearer, and none sits where a surname would in any local corpus (ctgov-officials, orcid-researchers, govuk-people, psc-individuals and fec-individuals hold them, all as credential runs; tse-donors, where #993 found `cota`, holds none), so none is marked ambiguous. The #993 screens were run over all 34 in lower, Title and upper case: `Jane Doe X`, `Jane Doe, X`, `JANE DOE, X`, `jane doe, x`, `Doe, Jane X`, `Jane Doe X, PhD`, and the capitals shapes with a word to spare and no comma (`JANE ANN DOE X`), and every one read the word as the suffix with no report. Each note records NPPES's count and ClinicalTrials.gov's after a comma (data 2026-10-21); `frcpglas`, `frcvs` and `frcsglasg` were left out as unwritten in every corpus, and `fasn`, `facg` and `fcps` (699 officials, Pakistan's College of Physicians and Surgeons) as not Royal College words, each worth a batch of its own. Six mixed-case ones carry a `cased` mask (`FRCPath`, `FRCOphth`, `FRCPsych`, `MRCPsych`, `FRCSEd`, `MRCSEd`). **Measured** over the committed corpora, the snapshot moved two names and none of the seven role fields: `Alex Green, FRCS (SN)` and `Andrew Wilson, MRCP (UK)` lost their `suffix-or-name` report, a listed word needing no fork. **Measured over the local corpora against master** (`tools/differential/measure.py`, 2026-11-10): ClinicalTrials.gov's officials moved 5,508 entries, 241 of them a role field; 225 of those put a listed word in the suffix where the base had it in the given, family, middle or title (`Troy Puar, MRCP UK` was given `MRCP`), and 16 went from right to wrong: 13 runs opening with `BM`, 2 with `MA BM` and 1 with `AO` after a comma (`Keith Godfrey, BM PhD FRCP`, given `BM` now). The cause was there before: `Keith Godfrey, BM PhD` and `..., BM PhD FACS` read given `BM` on master, and the unlisted `FRCP` ending the run kept it a suffix by accident, which listing it removes. Accepted as a cost of listing, and filed apart as the bug it is (#1323). **Declined: listing `bm` (Bachelor of Medicine) to remove it** (2026-11-10): it has no Census, SSA or Wikidata bearer, but an acronym is matched with every full stop removed, so it lists `B.M.` too, which Nepal's candidates write as surname initials (rules/S3's paired-initials Except, #864). Measured against master it fixed 15 ClinicalTrials.gov runs, 2 FEC names and `Whinnett, BM.BS`, and moved 6 Nepal candidates (`Chacra Bahadur B.M.`, family `B.M.` to a suffix) and 5 ORCID names where `BM` is a family-name initial (`Avinash BM`) to a suffix with the family name gone, the worse direction; the fix belongs in how a part opening with an unlisted two-capital word is read, not in the vocabulary. `ao` was left out for its own reason: a Census 2010 family reading (524) and an SSA given one (18), so it needs the ambiguous marking, and it moved 1 name. FEC, GOV.UK, ORCID and Companies House moved 1, 8, 16 and 3 entries, by the same readings, and tse-donors (where `cota` was found) and the other corpora moved none (opensanctions-parliaments could not be measured, its cached copy being stale); the committed snapshot, CLDR and GND records moved only the two reports above. A test that used `FRCS` as its example of an unlisted capitals credential (`tests/v2/pipeline/test_comma.py`) now uses `XYZW`, a word no listing will take. **Recompute**: `git diff origin/master...HEAD -- tools/differential/snapshot.jsonl` on the branch for the two moves (`snapshot.py --since v3.0.1` lists every move of the cycle, 325 entries on 2026-11-10, not this change's); the old readings are 1.4.0's too (`HumanName("John Smith FRCS")` gives last 'FRCS'). - **2026-11-19 (#1467) — `ud` LEAVES THE CREDENTIALS; `bt` STAYS.** Decided on the issue (its 2026-11-19 decision comment). `ud` came with the bulk list and is the Urdu and Arabic connective of a compound name (`Zia ud Din`). Counted over the distinct names of eight local corpora (ctgov-officials, ctgov-contacts, govuk-people, ukec-individuals, psc-individuals, fec-individuals, orcid-researchers, my-candidates), the words split at spaces with commas and full stops removed, as the vocabulary matches an acronym, 2026-11-19: `ud` stands between name words in 121 and ends a name in 7 (4 after a comma, 3 with none), and `bt` stands between name words in 35 and ends a name in 16 (7 after a comma, 9 with none), by position alone, so the 35 hold baronets with more post-nominals behind (`Bt, FRICS`) and the 16 surname-first initials (`B.T.`) among them (the decision comment's 127 and 34 counted records rather than distinct names, and its 7 and 11 another split). In lower case, in capitals within a mixed-case name, or in a name of one case, the credential reading started a run that took the rest of the name (`NADIR ZIA UD DIN` → family 'ZIA', suffix 'UD DIN', 2.4.0 through 3.1.0; 1.4.0 through 2.3.0 read middle 'ZIA UD', family 'DIN', which the change restores). The reading is removed with an `excluded` entry in en.toml carrying the counts. **The 7 names ending in it** write no credential: four are initials written `U.D`, the full stops being what the vocabulary's match removes: three ORCID holders' with no comma, now read as the family, as an unlisted pair of initials ending a name is, and an FEC donor's after a comma, read as initials before and after; one is the compound written surname first (FEC, now middle 'UD' where it read suffix 'UD'); and two are one Dutch study chair in two ClinicalTrials.gov records writing the rank universitair docent after the name and a comma, which now reads as an unlisted pair of capitals there does, initials run together: given 'UD', the name before the comma the family (written here with an invented name, `Anke Vissering, UD`), the accepted cost. Written with its full stops after a comma it reads as initials too (`Anke Vissering, U.D.` → given 'U.', middle 'D.'), and with a final full stop as a title by rules/H2's shape (`UD.`), as any unlisted word of that shape does. **`bt` is not changed**: a name reading beside the credential reads `Nur Aina bt Rosli` with family 'Rosli' and `Sir John Smith Bt` with family 'Bt', and the counts are too few to choose by; docs/customize.rst gives the recipe for a caller with Malay names (`Lexicon.default().remove("bt", kind="credential")`) and its cost on a baronet. The compound itself is not joined: `X ul/ur/ud Y` reads family 'Y'. **Measured** (`tools/differential/measure.py --base` against master 12b568f8): ctgov-officials and ctgov-contacts 1 entry each (the Dutch chair), fec-individuals 2, jrc-names 8, orcid-researchers 12, opensanctions-parliaments 1, patentsview-inventors 1; every other local corpus, the committed snapshot and the CLDR and GND records none. Scored against the filed boxes, orcid-researchers 3 records agree that did not (a Bangladeshi name holding `ud` in the given box and two Sri Lankan ones ending in `U.D`) and 6 no longer do, Pakistani holders who filed the whole compound in the family box (`ud Din` and the word before it), which the run's suffix had matched where the unjoined compound does not, with 2 more changing between two disagreements; patentsview-inventors 1 Hungarian record no longer agrees. Pinned by the `ud_inside_a_compound_name_in_capitals_is_a_name_word`, `ud_in_lower_case_inside_a_compound_name_is_a_name_word`, `ud_after_a_full_name_and_a_comma_reads_as_initials` and `bt_in_lower_case_before_the_last_word_stays_the_credential` case rows. +- **2026-11-20 (#1361, #1228, #1182) — eleven credentials listed, `bchir` marked ambiguous, `mh` and `sc` declined, `san` deferred.** Decided 2026-11-20. + - **`bchir`** (B.Chir, Bachelor of Surgery) is listed with a `family` reading, the Tunisian surname Bchir (ORCID 2 family boxes, PSC 1, Wikidata 2, each in Title case and none after a comma), so it is marked ambiguous, the `ba` shape: after a comma it is the credential, reported (`Jane Doe, BChir`); ending a name in Title case the family (`Amani Bchir`, reported). It carries no case mask, which would repair the surname to `BChir`, so `capitalized(force=True)` writes the credential `BCHIR`. Accepted: a surname written `BCHIR` in capitals ending a name of mixed case reads as the credential (`Amani BCHIR` → suffix 'BCHIR', reporting `given-or-family`), rules/S6's capitals reading; no corpus name writes it so. decisions/S12's entry of this date lists `bch` and `bmbch`. + - **The Nigerian marks** `mni`, `fwc`, `fsi`, `fnse`, `psc` and `ndc` are listed with lower-case masks, being written in lower case: case repair keeps them so in a name of mixed case or one written in capitals (`JANE DOE, MNI` → `Jane Doe, mni`), and `capitalized(force=True)` writes them lower case too (`Jane Doe, MNI` → `Jane Doe, mni`; `Maj Gen John Smith CB psc` keeps `psc`). + - **The Hong Kong and Singapore honours** `gbm`, `gbs`, `sbs`, `bbs` and `bbm` are listed, written in capitals, with no mask. Without a comma they read as the credential now (`Hon WONG Kwok-kin GBS JP` → suffix 'GBS JP'); after a comma they already did (rules/C6), and `MH, JP` already reads the run (rules/C5, #1392). The capitals family name `WONG` is `capitals_as_family`'s to read (rules/O9), and `Policy(unlisted_caps_suffixes=CapsSuffixes.EVERYWHERE)` already read the comma-less rows. + - **Accepted for both batches:** initials glued in capitals after a one-word family and a comma that spell a listed credential read as the credential, the given name lost (`Bello, MNI`, `Chan, GBS`), as rules/C16's Accepted bullet keeps the undotted spelling the credential's own (`Smith, MD`); none in the corpora. + - **Declined: `mh` and `sc`.** Listed, the two moved 324 local-corpus names, most of them wrong: the `Sc` of a split `M. Sc.` (94), capitals initials after a comma (FEC's `DOYLE, SC` shape) losing the given name, and paired initials inside a name (`M.H.`) losing the family. With `JP` behind them they read as the credential run already; a lone trailing `, MH` or `, SC` stays the given name. Neither has a name reading to mark it ambiguous by, its clash being with initials. Each carries an `excluded` entry in en.toml. + - **Deferred: `san`** (Senior Advocate of Nigeria), the given name San and es, it and fil's saint particle. As a default credential it cost 17 family names written in capitals (TSE's `ALCEU A SAN` shape) and added 143 reports; it waits for a Nigerian English choice of language, where it would be a `default = false` reading. en.toml records the exclusion; #1228 stays open for it. + - **Measured** 2026-11-20 against a checkout of master `0d8c6fa8`: `snapshot.py --local SOURCE --base` on ctgov-officials (322 entries move, decisions/S12's entry, none emptying a field), govuk-people (1, a report) and fec-individuals (2); `local_agreement.py --base` on orcid-researchers (2 records fixed, 0 broken: an `, mni` and an `aus der`) and psc-individuals (1 fixed, a surname box ending `Gbm`, and 1 company name changed); the committed snapshot, the Hong Kong lines and `Jane Doe, BM, BCh, PhD`. The `mh`/`sc` and `san` figures are the triage's of the same day, `config_diff.py diff --local all --match` over the words. Recompute: those commands with `--base `. diff --git a/docs/release_log.rst b/docs/release_log.rst index 69164b623..9f5779bde 100644 --- a/docs/release_log.rst +++ b/docs/release_log.rst @@ -4,6 +4,7 @@ Release Log nameparser 3.2 is under development. + - **Add credentials: BCh, BChir and BMBCh, the Nigerian marks mni, fwc, fsi, fnse, psc and ndc, and the Hong Kong and Singapore honours GBM, GBS, SBS, BBS and BBM.** ``parse("Jane Doe, BCh")`` gives suffix ``BCh``, where 1.4.0 through 3.1.0 gave given ``BCh``, family ``Jane Doe``; the Nigerian marks keep their lower case in ``capitalized()``. Initials written in capitals after a one-word family name and a comma read as the credential they spell (``Bello, MNI``). :issue:`1361`, :issue:`1228`, :issue:`1182` - **Fix Vanden, the Dutch and Flemish van den written as one word, which read as a middle name.** ``parse("Pieter Vanden Broeck")`` gives family ``Vanden Broeck``, as ``Vander Broeck`` reads, where 1.4.0 through 3.1.0 gave middle ``Vanden``, family ``Broeck``. :issue:`1239` - **Add thirteen military ranks written with a hyphen, such as Vice-Admiral, Air Vice-Marshal and Major-General, as titles.** ``parse("Air Vice-Marshal Ann Reed")`` gives title ``Air Vice-Marshal``, given ``Ann``, where 3.1.0 gave given ``Air``, middle ``Vice-Marshal Ann`` and 1.4.0 title ``Air``, first ``Vice-Marshal``. A hyphenated rank not listed, such as Squadron-Leader, still reads as a name word. :issue:`966` - **Add 어 and 라 to the Korean surnames.** ``parse("어수선")`` gives family ``어``, given ``수선``, where 1.4.0 through 3.1.0 kept the name whole. A foreign name written in hangul that begins with 라 is now divided too; a caller who reads such names removes the surname from the ``Lexicon``'s ``surnames``. :issue:`1215` diff --git a/nameparser/config/_compiled.py b/nameparser/config/_compiled.py index 8bf551a73..62fa29675 100644 --- a/nameparser/config/_compiled.py +++ b/nameparser/config/_compiled.py @@ -2941,6 +2941,7 @@ 'asa', 'asp', 'ba', + 'bchir', 'bem', 'caha', 'capa', @@ -3040,13 +3041,18 @@ 'atc/l', 'awb', 'ba', + 'bbm', + 'bbs', 'bca', 'bcba', + 'bch', + 'bchir', 'bcl', 'bcss', 'bds', 'bem', 'bls-i', + 'bmbch', 'bmed', 'bn', 'bnutr', @@ -3389,6 +3395,7 @@ 'fnp', 'fnp-bc', 'fnp-c', + 'fnse', 'fnss', 'fnuci', 'fp&a', @@ -3426,9 +3433,13 @@ 'frsa', 'fsa', 'fsdp', + 'fsi', + 'fwc', 'fws', 'gba', 'gbe', + 'gbm', + 'gbs', 'gcb', 'gchs', 'gcie', @@ -3599,6 +3610,7 @@ 'mmsc', 'mnaa', 'mnae', + 'mni', 'moptom', 'mot', 'mp', @@ -3659,6 +3671,7 @@ 'ncso', 'ncto', 'nd', + 'ndc', 'ndtr', 'nmd', 'nnp', @@ -3709,6 +3722,7 @@ 'pp', 'pps', 'prm', + 'psc', 'psm', 'psp', 'psyd', @@ -3762,6 +3776,7 @@ 'rvt', 'same', 'sasm', + 'sbs', 'sccp', 'scd', 'scm', @@ -3810,6 +3825,8 @@ CAPITALIZATION_EXCEPTIONS: dict[str, str] = { 'ait': 'Ait', 'aït': 'Aït', + 'bch': 'BCh', + 'bmbch': 'BMBCh', 'bmed': 'BMed', 'bnutr': 'BNutr', 'bpharm': 'BPharm', @@ -3844,6 +3861,7 @@ 'dsci': 'DSci', 'dtech': 'DTech', 'el': 'El', + 'fnse': 'fnse', 'fnuci': 'FNucI', 'fraes': 'FRAeS', 'frcophth': 'FRCOphth', @@ -3851,6 +3869,8 @@ 'frcpsych': 'FRCPsych', 'frcsed': 'FRCSEd', 'frmets': 'FRMetS', + 'fsi': 'fsi', + 'fwc': 'fwc', 'gent.le': 'Gent.le', 'gent.ma': 'Gent.ma', 'gent.mo': 'Gent.mo', @@ -3930,6 +3950,7 @@ 'mmath': 'MMath', 'mmed': 'MMed', 'mmsc': 'MMSc', + 'mni': 'mni', 'moptom': 'MOptom', 'mpd': 'MPd', 'mpharm': 'MPharm', @@ -3946,6 +3967,7 @@ 'mudr': 'MUDr', 'mvdr': 'MVDr', 'nait': 'Nait', + 'ndc': 'ndc', 'ní': 'Ní', 'oude': 'Oude', 'ould': 'Ould', @@ -3960,6 +3982,7 @@ 'preg.ma': 'Preg.ma', 'preg.mo': 'Preg.mo', 'prof.ssa': 'Prof.ssa', + 'psc': 'psc', 'psyd': 'PsyD', 'ptech': 'PTech', 'rkin': 'RKin', diff --git a/nameparser/config/_index.py b/nameparser/config/_index.py index 932f550e1..05422c673 100644 --- a/nameparser/config/_index.py +++ b/nameparser/config/_index.py @@ -307,8 +307,12 @@ ('bat', (('he', 'patronymic', ()), ('he', 'given', ()))), ('batoni', (('ka', 'salutation', (('after_given', True),)),)), ('bay', (('tr', 'family', ()),)), + ('bbm', (('en', 'credential', ()),)), + ('bbs', (('en', 'credential', ()),)), ('bca', (('cs', 'academic', (('cased', 'BcA'), ('default', False))), ('en', 'credential', ()))), ('bcba', (('en', 'credential', ()),)), + ('bch', (('en', 'credential', (('cased', 'BCh'),)),)), + ('bchir', (('en', 'credential', ()), ('en', 'family', ()))), ('bcl', (('en', 'credential', ()),)), ('bcss', (('en', 'credential', ()),)), ('bds', (('en', 'credential', ()),)), @@ -363,6 +367,7 @@ ('blogger', (('en', 'occupation', ()),)), ('bls-i', (('en', 'credential', ()),)), ('blues', (('en', 'modifier', ()),)), + ('bmbch', (('en', 'credential', (('cased', 'BMBCh'),)),)), ('bmed', (('en', 'credential', (('cased', 'BMed'),)),)), ('bn', (('en', 'credential', ()),)), ('bnutr', (('en', 'credential', (('cased', 'BNutr'),)),)), @@ -1135,6 +1140,7 @@ ('fnp', (('en', 'credential', ()),)), ('fnp-bc', (('en', 'credential', ()),)), ('fnp-c', (('en', 'credential', ()),)), + ('fnse', (('en', 'credential', (('cased', 'fnse'),)),)), ('fnss', (('en', 'credential', ()),)), ('fnuci', (('en', 'credential', (('cased', 'FNucI'),)),)), ('fo', (('pt-BR', 'agnomen', (('same_as', 'filho'),)), ('pt-BR', 'family', ()))), @@ -1203,7 +1209,9 @@ ('frú', (('is', 'salutation', ()),)), ('fsa', (('en', 'credential', ()),)), ('fsdp', (('en', 'credential', ()),)), + ('fsi', (('en', 'credential', (('cased', 'fsi'),)),)), ('full', (('en', 'modifier', ()),)), + ('fwc', (('en', 'credential', (('cased', 'fwc'),)),)), ('fws', (('en', 'credential', ()),)), ('fátima', (('es', 'given', (('after_particle', True),)), ('pt', 'given', (('after_particle', True),)))), ('född', (('sv', 'birth_marker', ()),)), @@ -1222,6 +1230,8 @@ ('gba', (('en', 'credential', ()),)), ('gbe', (('en', 'credential', ()),)), ('gbenga', (('mul', 'familiar', (('short_for', ('oluwagbenga',)),)),)), + ('gbm', (('en', 'credential', ()),)), + ('gbs', (('en', 'credential', ()),)), ('gcb', (('en', 'credential', ()),)), ('gchs', (('en', 'credential', ()),)), ('gcie', (('en', 'credential', ()),)), @@ -2040,6 +2050,7 @@ ('mmsc', (('en', 'credential', (('cased', 'MMSc'),)),)), ('mnaa', (('en', 'credential', ()),)), ('mnae', (('en', 'credential', ()),)), + ('mni', (('en', 'credential', (('cased', 'mni'),)),)), ('mo', (('en', 'familiar', (('short_for', ('maureen', 'mohamad', 'mohamed', 'mohammad', 'mohammed')),)),)), ('mobster', (('en', 'occupation', ()),)), ('moch', (('id', 'given', (('same_as', 'muhammad'),)),)), @@ -2173,6 +2184,7 @@ ('ncso', (('en', 'credential', ()),)), ('ncto', (('en', 'credential', ()),)), ('nd', (('en', 'credential', ()),)), + ('ndc', (('en', 'credential', (('cased', 'ndc'),)),)), ('ndtr', (('en', 'credential', ()),)), ('ned', (('en', 'familiar', (('short_for', ('edward',)),)),)), ('nee', (('en', 'birth_marker', (('same_as', 'née'),)), ('fr', 'birth_marker', (('same_as', 'née'),)))), @@ -2422,6 +2434,7 @@ ('provost', (('en', 'office', ()),)), ('prue', (('en', 'familiar', (('short_for', ('prudence',)),)),)), ('przemek', (('pl', 'familiar', (('short_for', ('przemyslaw', 'przemysław')),)),)), + ('psc', (('en', 'credential', (('cased', 'psc'),)),)), ('pslc', (('en', 'office', ()),)), ('psm', (('en', 'credential', ()),)), ('psp', (('en', 'credential', ()),)), @@ -2617,6 +2630,7 @@ ('satya', (('en', 'familiar', (('short_for', ('satyanarayana',)),)),)), ('sayed', (('ar', 'spelling', (('spelling_of', ('elsayed',)),)),)), ('sb', (('pt-BR', 'agnomen', (('cased', 'SB'), ('default', False), ('same_as', 'sobrinho'))), ('pt-BR', 'family', ()))), + ('sbs', (('en', 'credential', ()),)), ('sccp', (('en', 'credential', ()),)), ('scd', (('en', 'credential', (('cased', 'ScD'),)),)), ('scholar', (('en', 'occupation', ()),)), diff --git a/nameparser/vocab/en.toml b/nameparser/vocab/en.toml index 1944cf685..f07dfa935 100644 --- a/nameparser/vocab/en.toml +++ b/nameparser/vocab/en.toml @@ -2898,6 +2898,14 @@ note = "Ba is a real surname (Vietnamese; Senegalese Fula) about as common as BA text = "barch" excluded = { credential = { reason = "B.Arch, Bachelor of Architecture, is a surname: US Census 2010 672 bearers, written Barch in 9 ClinicalTrials.gov officials' names and 7 FEC ones, none after a comma (2026-11-09). B.Arch is read by its shape, rules/S3", issue = 998, decided = 2026-11-09 } } +[[word]] +text = "bbm" +credential = { expands = "Public Service Star (Singapore, Bintang Bakti Masyarakat)", note = "ends a name on Singapore's honours lists; no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 1182 } + +[[word]] +text = "bbs" +credential = { expands = "Bronze Bauhinia Star (Hong Kong)", note = "24 of the 236 distinct names on Hong Kong LegCo precedence lists 1998-2020 (2026-11-08); Czech candidates 5 as Bachelor of Business Studies; no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 1182 } + [[word]] text = "bca" credential = {} @@ -2908,11 +2916,12 @@ credential = { expands = "Board Certified Behavior Analyst", note = "NPPES 31,70 [[word]] text = "bch" -excluded = { credential = { reason = "Bachelor of Surgery (B.Ch., 270 ClinicalTrials.gov officials after a comma), the second half of the split MB BCh (rules/S12), kept out as chb is (measured 2026-11-07); B.Ch is read by its shape, rules/S3", issue = 1131, decided = 2026-11-07 } } +credential = { cased = "BCh", expands = "Bachelor of Surgery", note = "NPPES 208 US healthcare providers (August 2026 file); 273 ClinicalTrials.gov study officials write it, 271 after a comma (data 2026-10-21); no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer. Listed, it leaves rules/S12's split MB BCh a run of two listed credentials (Jane Doe MB BCh, PhD and Doe, Jane MB BCh still read suffix), which is why chb's exclusion does not carry over to it", issue = 1361 } [[word]] text = "bchir" -excluded = { credential = { reason = "B.Chir, Bachelor of Surgery (BChir 62 and B.Chir 3 of 71 ClinicalTrials.gov officials after a comma), is the Tunisian surname Bchir: Wikidata 2 family bearers, ORCID and PSC 3 names, none after a comma (2026-11-09); kept out as bch is. B.Chir is read by its shape, rules/S3", issue = 998, decided = 2026-11-09 } } +family = { wikidata = 2, as_of = 2026-11-09, note = "the Tunisian surname Bchir: ORCID 2 family boxes and PSC 1 surname, each in Title case and none after a comma (2026-11-20); this reading gates the credential (rules/S4), so a Title-case Bchir ending a name stays the family name" } +credential = { expands = "Bachelor of Surgery", note = "BChir 62 and B.Chir 3 of 71 ClinicalTrials.gov study officials after a comma (data 2026-10-21); NPPES 5. No case mask, which would repair the surname Bchir to BChir. A surname written BCHIR ending a name in capitals reads as the credential, the gated acronym's capitals reading (no corpus name writes it so, 2026-11-20)", issue = 1361 } [[word]] text = "bcl" @@ -2939,6 +2948,10 @@ credential = { note = "NPPES 0 US healthcare providers write it (healthcare only text = "bls-i" credential = {} +[[word]] +text = "bmbch" +credential = { cased = "BMBCh", expands = "Bachelor of Medicine, Bachelor of Surgery", note = "NPPES 12 US healthcare providers (August 2026 file); 58 ClinicalTrials.gov study officials after a comma (data 2026-10-21); no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 1361 } + [[word]] text = "bmed" credential = { cased = "BMed", expands = "Bachelor of Medicine", note = "NPPES 9 US healthcare providers (August 2026 file); ClinicalTrials.gov study officials 18, 18 after a comma, written BMed 11, B.Med 4, B.Med. 2; no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer (counted 2026-11-09); written in two chunks joined at a full stop, it read as a suffix only by its shape (rules/S3) with a suffix-or-name report", issue = 998 } @@ -4360,6 +4373,10 @@ credential = { expands = "Family Nurse Practitioner, Board Certified", note = "N text = "fnp-c" credential = { expands = "Family Nurse Practitioner, Certified", note = "NPPES 43,585 US healthcare providers (August 2026 file); 12 ClinicalTrials.gov study officials after a comma, as typed (data 2026-10-21) write it; no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 797 } +[[word]] +text = "fnse" +credential = { cased = "fnse", expands = "Fellow, Nigerian Society of Engineers", note = "lower case after a comma in the 2022 Nigerian national honours list, 1 (2026-11-08); no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 1228 } + [[word]] text = "fnss" credential = {} @@ -4514,6 +4531,14 @@ credential = {} text = "fsdp" credential = {} +[[word]] +text = "fsi" +credential = { cased = "fsi", expands = "Fellow, the Strategic Institute (Nigeria)", note = "lower case after a comma in the 2022 Nigerian national honours list, 1 (2026-11-08); no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 1228 } + +[[word]] +text = "fwc" +credential = { cased = "fwc", expands = "Fellow, War College (Nigeria)", note = "lower case after a comma in the 2022 Nigerian national honours list, 2 of 2 (2026-11-08); no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 1228 } + [[word]] text = "fws" credential = {} @@ -4526,6 +4551,14 @@ credential = {} text = "gbe" credential = {} +[[word]] +text = "gbm" +credential = { expands = "Grand Bauhinia Medal (Hong Kong)", note = "9 of the 236 distinct names on Hong Kong LegCo precedence lists 1998-2020 (2026-11-08); no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 1182 } + +[[word]] +text = "gbs" +credential = { expands = "Gold Bauhinia Star (Hong Kong)", note = "38 of the 236 distinct names on Hong Kong LegCo precedence lists 1998-2020 (2026-11-08); no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer. Glued capitals initials after a one-word family and a comma (Chan, GBS) read as the credential, none in the corpora (2026-11-20)", issue = 1182 } + [[word]] text = "gc" [word.excluded.credential] @@ -5102,6 +5135,10 @@ credential = {} text = "mft" credential = { expands = "Marriage and Family Therapist", note = "NPPES 13,618 US healthcare providers (August 2026 file); 3 ClinicalTrials.gov study officials after a comma, as typed (data 2026-10-21) write it; no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 993 } +[[word]] +text = "mh" +excluded = { credential = { reason = "MH, the Hong Kong Medal for Honour (18 of the 236 distinct names on LegCo precedence lists 1998-2020), is written mostly as initials: listed with sc it moved 324 local-corpus names, most of them wrong (M.H. and paired initials losing the family, 2026-11-20); MH before JP already reads as the credential run (rules/C5, #1392), and a lone trailing MH after a comma stays the given name", issue = 1182, decided = 2026-11-20 } } + [[word]] text = "mhpp" credential = { note = "NPPES 2,534 US healthcare providers (August 2026 file); no ClinicalTrials.gov study official writes it after a comma (data 2026-10-21); no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 993 } @@ -5182,6 +5219,10 @@ credential = {} text = "mnae" credential = {} +[[word]] +text = "mni" +credential = { cased = "mni", expands = "Member, National Institute for Policy and Strategic Studies (Nigeria)", note = "written in lower case after a comma, 14 of 14 times in the 2022 Nigerian national honours list (2026-11-08); ORCID 3 records (M.N.I., MNI, mni) and Nepal 1 Mni; no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer. Glued capitals initials after a one-word family and a comma (Bello, MNI) read as the credential, none in the corpora (2026-11-20)", issue = 1228 } + [[word]] text = "moid" excluded = { credential = { reason = "Moid is a borne given name, written last in South Asian and Arabic names (Syed Abdul Moid): psc-individuals writes it Moid 4, nepal-candidates 2, ORCID's given box 20 (IN 2, PK 2, US 2) and family box 14 (IN 4, US 2, 8 with no country). Listed and gated by a given reading, it would read the suffix only spelled MOID in a mixed-case name or after a comma, and take the family from a three-word name written in one case (SYED ABDUL MOID); spelled MoID, as GOV.UK writes it, it would still read as the name (rules/S6), and GOV.UK's one MoID already reads as the suffix behind a listed credential. Measured 2026-10-30 on fec-individuals (3 names writing it), govuk-people (1), orcid-researchers (0) and psc-individuals (4): no name reads differently gated or refused", issue = 965 } } @@ -5399,6 +5440,10 @@ credential = {} text = "nd" credential = {} +[[word]] +text = "ndc" +credential = { cased = "ndc", expands = "National Defence College", note = "a Commonwealth staff-college mark, written in lower case; NPPES 1 (2026-11-20); no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 1228 } + [[word]] text = "ndtr" credential = {} @@ -5627,6 +5672,10 @@ credential = {} text = "prm" credential = {} +[[word]] +text = "psc" +credential = { cased = "psc", expands = "passed Staff College", note = "a Commonwealth staff-college mark, written in lower case (Maj Gen John Smith CB psc); NPPES 81, ClinicalTrials.gov 3 as PSc, PSC 4 filers as Psc (2026-11-20); no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 1228 } + [[word]] text = "psm" credential = {} @@ -5841,10 +5890,22 @@ credential = {} text = "same" credential = {} +[[word]] +text = "san" +excluded = { credential = { reason = "SAN, Senior Advocate of Nigeria (16 times after a comma in the 2022 Nigerian national honours list, 2026-11-08), is the given name San and the saint particle (es, it, fil): as a default credential it cost 17 family names written in capitals (TSE's ALCEU A SAN shape) and added 143 reports (2026-11-20). It waits for a Nigerian English choice of language, where it would be a default = false reading", issue = 1228, decided = 2026-11-20 } } + [[word]] text = "sasm" credential = {} +[[word]] +text = "sbs" +credential = { expands = "Silver Bauhinia Star (Hong Kong)", note = "43 of the 236 distinct names on Hong Kong LegCo precedence lists 1998-2020 (2026-11-08); no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 1182 } + +[[word]] +text = "sc" +excluded = { credential = { reason = "SC, Hong Kong's Senior Counsel (4 of the 236 distinct names on LegCo precedence lists 1998-2020), is the Sc of a split M. Sc. (94 names) and capitals initials (FEC's DOYLE, SC shape): listed with mh it moved 324 local-corpus names, most of them wrong (2026-11-20); SC before JP already reads as the credential run (rules/C5, #1392)", issue = 1182, decided = 2026-11-20 } } + [[word]] text = "sccp" credential = {} diff --git a/tests/v2/cases.py b/tests/v2/cases.py index b01e6cfa9..f07ad71b9 100644 --- a/tests/v2/cases.py +++ b/tests/v2/cases.py @@ -1572,6 +1572,64 @@ def _check_cjk_shape_purity(self) -> None: "'Smith', suffix 'BA'; 1.4.0 read given 'BA'. #289 moves " "this row again: the caps lean now reads 'Smith, BA' the " "way a business form is written"), + Case("bch_after_a_comma_reads_the_credential", "Jane Doe, BCh", + {"given": "Jane", "family": "Doe", "suffix": "BCh"}, + classification="fix(#1361)", + notes="bch listed (#1131's exclusion lifted, decisions/S12); " + "1.4.0 through 3.1 read given 'BCh', family 'Jane Doe'"), + Case("mb_bch_still_reads_as_one_suffix_run", "Jane Doe MB BCh, PhD", + {"given": "Jane", "family": "Doe", "suffix": "MB BCh, PhD"}, + classification="fix(#752)", + notes="boundary, S12's since 3.0.0 (1.4.0 read middle 'Doe MB', " + "family 'BCh'): with bch listed, the split pair is a run of " + "two listed credentials, where chb's listing broke " + "MB ChB, PhD (decisions/S12, 2026-11-20 #1361)"), + Case("bmbch_ending_a_name_reads_the_credential", "Jane Doe BMBCh", + {"given": "Jane", "family": "Doe", "suffix": "BMBCh"}, + classification="fix(#1361)", + notes="read middle 'Doe', family 'BMBCh' 1.4.0 through 3.1"), + Case("bchir_after_a_comma_reads_the_credential", "Jane Doe, BChir", + {"given": "Jane", "family": "Doe", "suffix": "BChir"}, + classification="fix(#1361)", ambiguities=("suffix-or-name",), + notes="bchir is gated by its family reading (rules/C4 after the " + "comma); read given 'BChir', family 'Jane Doe' 1.4.0 " + "through 3.1"), + Case("bchir_surname_ending_a_name_keeps_the_family", "Amani Bchir", + {"given": "Amani", "family": "Bchir"}, + ambiguities=("suffix-or-name",), + notes="boundary: the family reading gates the credential, and a " + "full name in front leaves no word to spare (rules/S4); " + "the report is new with the credential reading (#1361)"), + Case("bchir_in_capitals_in_a_mixed_case_name_reads_the_credential", + "Amani BCHIR", + {"given": "Amani", "suffix": "BCHIR"}, + classification="fix(#1361)", ambiguities=("given-or-family",), + notes="the accepted cost: a gated acronym in capitals in a name " + "of mixed case reads as the credential (rules/S6); no corpus " + "name writes the surname so; read family 'BCHIR' through 3.1"), + Case("mni_after_a_comma_reads_the_credential", + "Dr. Ahmed Abubakar Audi, mni", + {"title": "Dr.", "given": "Ahmed", "middle": "Abubakar", + "family": "Audi", "suffix": "mni"}, + classification="fix(#1228)", + notes="read given 'mni', family 'Ahmed Abubakar Audi' 1.4.0 " + "through 3.1"), + Case("capitals_initials_after_one_word_and_a_comma_read_the_credential", + "Bello, MNI", + {"family": "Bello", "suffix": "MNI"}, + classification="fix(#1228)", + notes="the accepted cost: glued capitals initials spelling a " + "listed credential after a one-word family and a comma lose " + "the given name (Chan, GBS too); none in the corpora; read " + "given 'MNI' through 3.1"), + Case("hong_kong_honour_without_a_comma_reads_the_credential", + "Hon WONG Kwok-kin GBS JP", + {"title": "Hon", "given": "WONG", "family": "Kwok-kin", + "suffix": "GBS JP"}, + classification="fix(#1182)", + notes="read middle 'Kwok-kin', family 'GBS', suffix 'JP' 1.4.0 " + "through 3.1; the capitals family is capitals_as_family's " + "to read (rules/O9)"), Case("ba_is_a_suffix_when_a_family_name_remains", "John Smith BA", {"given": "John", "family": "Smith", "suffix": "BA"}, notes="the words-to-spare half: a full name in front leaves the " diff --git a/tools/differential/snapshot.jsonl b/tools/differential/snapshot.jsonl index 71d64cd9e..d654c50f7 100644 --- a/tools/differential/snapshot.jsonl +++ b/tools/differential/snapshot.jsonl @@ -1545,8 +1545,8 @@ {"name": "His Majesty King Charles", "title": "His Majesty King", "given": "Charles", "initials": "C."} {"name": "Hisham Ibrahim, CPA, CFA", "given": "Hisham", "family": "Ibrahim", "suffix": "CPA, CFA", "initials": "H. I."} {"name": "Hodan Farah Warsame", "given": "Hodan", "middle": "Farah", "family": "Warsame", "initials": "H. F. W."} -{"name": "Hon CHAN Kin-por GBS JP", "title": "Hon", "given": "CHAN", "middle": "Kin-por", "family": "GBS", "suffix": "JP", "initials": "C. K. G.", "capitalized_force": "Hon Chan Kin-Por Gbs JP"} -{"name": "Hon CHAN Kin-por, GBS, JP", "title": "Hon", "given": "CHAN", "family": "Kin-por", "suffix": "GBS, JP", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: name as given (position)"], "initials": "C. K.", "capitalized_force": "Hon Chan Kin-Por, GBS, JP"} +{"name": "Hon CHAN Kin-por GBS JP", "title": "Hon", "given": "CHAN", "family": "Kin-por", "suffix": "GBS JP", "initials": "C. K.", "capitalized_force": "Hon Chan Kin-Por GBS JP"} +{"name": "Hon CHAN Kin-por, GBS, JP", "title": "Hon", "given": "CHAN", "family": "Kin-por", "suffix": "GBS, JP", "initials": "C. K.", "capitalized_force": "Hon Chan Kin-Por, GBS, JP"} {"name": "Hon Solo", "title": "Hon", "family": "Solo", "initials": "S."} {"name": "Hon. Barrington P. Doe-Ray, Jr.", "title": "Hon.", "given": "Barrington", "middle": "P.", "family": "Doe-Ray", "suffix": "Jr.", "initials": "B. P. D.", "generation": "Jr."} {"name": "Hon. Charles J. Siragusa", "title": "Hon.", "given": "Charles", "middle": "J.", "family": "Siragusa", "initials": "C. J. S."} @@ -1864,7 +1864,7 @@ {"name": "Jane Doe, AL, PhD", "given": "AL", "family": "Jane Doe", "suffix": "PhD", "initials": "A. J. D.", "capitalized_force": "Al Jane Doe PhD"} {"name": "Jane Doe, BM Jr.", "given": "BM", "family": "Jane Doe", "suffix": "Jr.", "initials": "B. J. D.", "capitalized_force": "Bm Jane Doe Jr.", "generation": "Jr."} {"name": "Jane Doe, BM PhD", "given": "Jane", "family": "Doe", "suffix": "BM PhD", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: name as given (position)"], "initials": "J. D."} -{"name": "Jane Doe, BM, BCh, PhD", "given": "Jane", "family": "Doe", "suffix": "BM, BCh, PhD", "ambiguities": ["COMMA_STRUCTURE", "SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: name as given (position)"], "initials": "J. D.", "capitalized_force": "Jane Doe, BM, Bch, PhD"} +{"name": "Jane Doe, BM, BCh, PhD", "given": "Jane", "family": "Doe", "suffix": "BM, BCh, PhD", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: name as given (position)"], "initials": "J. D."} {"name": "Jane Doe, DL", "given": "Jane", "family": "Doe", "suffix": "DL", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: name as given (declared)"], "initials": "J. D."} {"name": "Jane Doe, II, PhD", "given": "Jane", "family": "Doe", "suffix": "II, PhD", "initials": "J. D.", "generation": "II", "credentials": "PhD"} {"name": "Jane Doe, KC", "given": "Jane", "family": "Doe", "suffix": "KC", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: name as given (declared)"], "initials": "J. D."} From 0456c8d1b9e54d028e04c4aba2a4c81e6a17c2e4 Mon Sep 17 00:00:00 2001 From: Derek Gulbranson Date: Fri, 20 Nov 2026 19:28:02 -0800 Subject: [PATCH 2/5] Read German aus as a family-name particle, with a given reading (#1284) de.toml lists aus as a preposition, on by default like auf, beside a given reading for the Arabic and Indonesian given name Aus, which keeps the word positional where it opens a name (Aus Rahman, reported); may_be_given = false folded 6 corpus names whole into the family. rules/R12's Accepted bullet takes unter der as its example, aus der now reading its particle. decisions/vocabulary-collisions records the measurement and the accepted cost (Kevin Aus Smith). Co-Authored-By: Claude Opus 5.5 --- docs/design/decisions/vocabulary-collisions.md | 4 ++++ ...cle-opening-the-family-name-with-a-capital.md | 2 +- docs/release_log.rst | 1 + nameparser/config/_compiled.py | 1 + nameparser/config/_index.py | 1 + nameparser/vocab/de.toml | 5 +++++ tests/v2/cases.py | 16 ++++++++++++++++ tools/differential/snapshot.jsonl | 2 +- 8 files changed, 30 insertions(+), 2 deletions(-) diff --git a/docs/design/decisions/vocabulary-collisions.md b/docs/design/decisions/vocabulary-collisions.md index 023013d81..699120266 100644 --- a/docs/design/decisions/vocabulary-collisions.md +++ b/docs/design/decisions/vocabulary-collisions.md @@ -31,6 +31,7 @@ Elsewhere: C-i reaches the titles through a `given` reading, which makes a title - `oude` (nl.toml) is a particle on by default, of the generic kind `particle`, no kind naming an adjective, that may be given (nam_dict's rare Dutch given name), with its case mask `Oude`: it passes rule 2 of the 2026-11-12 #1257 entry — 2026-11-18 #1455. - `ten` (nl.toml) is a preposition written `default = false`, which `locales.NL`, a pack choosing `nl` alone, turns on; it fails rule 2's mid-name test (`Kheng Ten Choo`), and zh.toml declares the Chinese given-name syllable it opens, so a plain Dutch choice keeps a leading `Ten` the given name, reported, and a strict one reads it as the family name — 2026-11-18 #1455. - `u` and `daw` (my.toml) are Burmese salutations written `default = false`, which `locales.MY`, a pack choosing `my` and nothing else, turns on; a list of nothing but Burmese names is read with the strict choice, `parser_for(locales.MY, strict=True)`, which reads Burmese name syllables (`san`, `van`, `pe`, `ei`) as name words by reading no other language's file, and my.toml copies `en.toml`'s readings of the English ranks and `sir` such lists write, `default = false`, so the strict choice keeps them — 2026-11-19 #1483; `ko`, `ma`, `maung` and the ethnic prefixes stay name words, and the military and religious styles stay out; `U.` written with its full stop is read as the title vocabulary reads `U` under the pack, so an initial can be the title (`U. S. Grant` → title 'U.', `Smith, U.` → title 'U.', no given name), which no rule vetoes — 2026-11-19 #1231. +- German `aus` is a particle by default with a `given` reading beside it, keeping `Aus` positional where it opens a name; `Kevin Aus Smith` reading family 'Aus Smith' is the accepted cost — 2026-11-20 #1284. ## Log @@ -116,3 +117,6 @@ Elsewhere: C-i reaches the titles through a `given` reading, which makes a title - **What the strict choice costs other names**, on this branch, `config_diff.py diff plain:MY strict:MY --committed --local ctgov-officials --local ctgov-contacts`: 88,009 of the 660,410 distinct names move (a name read once however many inputs hold it; per input, committed 1,884 of 7,662, ctgov-contacts 42,863 of 359,428, ctgov-officials 49,151 of 353,747), 29,233 of them in their ambiguity reports alone and 58,776 in their fields (8.9%); the words moved most are `de` 4,676 (family to middle), `master` 3,628 (title to given), `van` 3,364, `pr` 2,432, `rn` 2,404 (suffix to given), `mbchb` 1,738, `of` 1,720, `pd` 1,688, `do` 1,590. Against the pack with its fragment, on master `4b0b9441`, 45,867 of 660,392 distinct names had moved in their fields. docs/languages.rst states the cost and keeps the strict choice to a wholly Burmese list. - **`locales.VI` measured under strict, not changed** (its list shipped in 3.0.0, #1112; whether strict replaces it is a later question): `uit-vinames`, scored as `local_agreement.py` scores it, every box agreeing for 21,085 of 21,090 under `parser_for(locales.VI)` (99.98%) and 21,089 under `parser_for(locales.VI, strict=True)` (100.00%), 4 fixed and none broken; `vn-assembly` 499 of 499 under both, no name read differently. On names that are not Vietnamese, `config_diff.py diff plain:VI strict:VI --committed --local ctgov-officials --local ctgov-contacts`: 80,628 of the 660,410 distinct names move, 52,108 in their fields. - **Proposal A** (the pack removing the five credential readings) is dropped: the strict choice reads them. **Proposal B** (`ra` a name by default) is a question about Korean names as much as Burmese ones and stays open on #1483, which this change leaves open. #1232's `Mg` is read as that issue asks under the strict choice; the default and the plain pack still read the military `MG`. +- 2026-11-20 #1284 — GERMAN `AUS` IS A PARTICLE BY DEFAULT, WITH A `GIVEN` READING BESIDE IT. Decided 2026-11-20. `Karen aus der Fünten` read middle 'aus', family 'der Fünten'; de.toml lists `aus` as a `preposition`, as it lists `auf`. Unlike `auf` it is not written `may_be_given = false`: `Aus` is an Arabic and Indonesian given name (ORCID given boxes 14, PatentsView 5), and as a never-given particle rules/P1's fold read 6 corpus names opening with it whole as the family (`Aus Rahman`-shaped). With the `given` reading the word stays positional at the head, reported `particle-or-given` (`Aus Rahman`), C-i's marking. + - **Accepted:** an `Aus` written as a middle name before a surname is read into the family (`Kevin Aus Smith` → family 'Aus Smith'), none of the 24 local-corpus names holding the word; and an `AUS` ending a family before a comma is repaired in lower case (FEC's `J AUS, JENNIFER` → `Jennifer J aus`), its fields unchanged, the one such name in the corpora. + - **Measured** 2026-11-20 against a checkout of master `0d8c6fa8`: `local_agreement.py orcid-researchers --base`, 1 record fixed (an `aus der` family box), 0 broken; psc-individuals, none moved by the word; `snapshot.py --local fec-individuals --base`, the case repair above; ctgov-officials, `Karen aus der Fünten, MD, MChiro`-shaped names gaining the family; the committed snapshot, `KAREN AUS DER FÜNTEN` (family 'AUS DER FÜNTEN', repaired `Karen aus der Fünten`), which takes rules/R12's `aus der` example out of its Accepted bullet. Recompute: those commands with `--base `. diff --git a/docs/design/rules/R12-particle-opening-the-family-name-with-a-capital.md b/docs/design/rules/R12-particle-opening-the-family-name-with-a-capital.md index 3878a8778..8bc1fd281 100644 --- a/docs/design/rules/R12-particle-opening-the-family-name-with-a-capital.md +++ b/docs/design/rules/R12-particle-opening-the-family-name-with-a-capital.md @@ -36,7 +36,7 @@ **Accepted:** -- The word takes its capital whatever language it is written in, since nothing in its spelling tells the Armenian prefix from the Dutch and German particle: a Dutch surname opened by `ter` is written with a capital, and a German `der` behind a word the vocabulary does not list as a particle (`aus der`) opens the family name as far as repair can tell. +- The word takes its capital whatever language it is written in, since nothing in its spelling tells the Armenian prefix from the Dutch and German particle: a Dutch surname opened by `ter` is written with a capital, and a German `der` behind a word the vocabulary does not list as a particle (`unter der`) opens the family name as far as repair can tell. ``` "GERARD TER BORCH" → capitalized="Gerard Ter Borch" · boundary "KAREN AUS DER FÜNTEN" → capitalized="Karen Aus Der Fünten" · boundary diff --git a/docs/release_log.rst b/docs/release_log.rst index 9f5779bde..c08dd6806 100644 --- a/docs/release_log.rst +++ b/docs/release_log.rst @@ -5,6 +5,7 @@ Release Log nameparser 3.2 is under development. - **Add credentials: BCh, BChir and BMBCh, the Nigerian marks mni, fwc, fsi, fnse, psc and ndc, and the Hong Kong and Singapore honours GBM, GBS, SBS, BBS and BBM.** ``parse("Jane Doe, BCh")`` gives suffix ``BCh``, where 1.4.0 through 3.1.0 gave given ``BCh``, family ``Jane Doe``; the Nigerian marks keep their lower case in ``capitalized()``. Initials written in capitals after a one-word family name and a comma read as the credential they spell (``Bello, MNI``). :issue:`1361`, :issue:`1228`, :issue:`1182` + - **Read aus as a German family-name particle.** ``parse("Karen aus der Fünten")`` gives family ``aus der Fünten``, where 1.4.0 through 3.1.0 gave middle ``aus``, family ``der Fünten``; an Aus written as a middle name before a surname is read into the family too (``Kevin Aus Smith``). :issue:`1284` - **Fix Vanden, the Dutch and Flemish van den written as one word, which read as a middle name.** ``parse("Pieter Vanden Broeck")`` gives family ``Vanden Broeck``, as ``Vander Broeck`` reads, where 1.4.0 through 3.1.0 gave middle ``Vanden``, family ``Broeck``. :issue:`1239` - **Add thirteen military ranks written with a hyphen, such as Vice-Admiral, Air Vice-Marshal and Major-General, as titles.** ``parse("Air Vice-Marshal Ann Reed")`` gives title ``Air Vice-Marshal``, given ``Ann``, where 3.1.0 gave given ``Air``, middle ``Vice-Marshal Ann`` and 1.4.0 title ``Air``, first ``Vice-Marshal``. A hyphenated rank not listed, such as Squadron-Leader, still reads as a name word. :issue:`966` - **Add 어 and 라 to the Korean surnames.** ``parse("어수선")`` gives family ``어``, given ``수선``, where 1.4.0 through 3.1.0 kept the name whole. A foreign name written in hangul that begins with 라 is now divided too; a caller who reads such names removes the surname from the ``Lexicon``'s ``surnames``. :issue:`1215` diff --git a/nameparser/config/_compiled.py b/nameparser/config/_compiled.py index 62fa29675..09eb177b0 100644 --- a/nameparser/config/_compiled.py +++ b/nameparser/config/_compiled.py @@ -2460,6 +2460,7 @@ 'at-', 'ath-', 'auf', + 'aus', 'av', 'az-', 'aït', diff --git a/nameparser/config/_index.py b/nameparser/config/_index.py index 05422c673..5e9234c8b 100644 --- a/nameparser/config/_index.py +++ b/nameparser/config/_index.py @@ -262,6 +262,7 @@ ('auf', (('de', 'preposition', ()),)), ('aunt', (('en', 'kinship', (('addresses', 'given'),)),)), ('auntie', (('en', 'kinship', (('addresses', 'given'), ('same_as', 'aunt'))),)), + ('aus', (('de', 'preposition', ()), ('de', 'given', ()))), ('author', (('en', 'occupation', ()),)), ('av', (('nb', 'preposition', ()), ('sv', 'preposition', ()))), ('avi', (('ar', 'familiar', (('short_for', ('abraham', 'avraham')),)), ('en', 'familiar', (('short_for', ('abraham', 'avinash', 'avraham')),)), ('he', 'familiar', (('short_for', ('abraham', 'avraham')),)))), diff --git a/nameparser/vocab/de.toml b/nameparser/vocab/de.toml index b88bd6acb..6f11b86ee 100644 --- a/nameparser/vocab/de.toml +++ b/nameparser/vocab/de.toml @@ -167,6 +167,11 @@ credential = { issue = 18, expands = "Steuerberater, tax adviser" } text = "auf" preposition = { may_be_given = false, issue = 18, expands = "upon: \"auf der Heide\"" } +[[word]] +text = "aus" +preposition = { issue = 1284, expands = "out of, from: \"aus der Fünten\"", note = "the German surnames aus der and Aus Der: ORCID family boxes 21 (DE 3), PatentsView family boxes 19 (DE 9); US Census 2010 378 surname bearers (2026-11-20). With the given reading beside it, an Aus written as a middle name before a surname is read into the family (Kevin Aus Smith), none in the local corpora (2026-11-20)" } +given = { note = "the Arabic and Indonesian given name Aus: ORCID given boxes 14 (IQ 2, AU, CL, ID, IL), PatentsView given boxes 5 (DE 4, SA 1), US SSA under 5 a year; it keeps the word positional where it opens a name (Aus Rahman, reported particle-or-given), where may_be_given = false would fold the whole name into the family, as 6 corpus names showed (2026-11-20)" } + [[word]] text = "tho" given = { us_ssa = 52, as_of = 2026-10-25, note = "US SSA births summed over both sexes; nam_dict band 8 in Vietnam" } diff --git a/tests/v2/cases.py b/tests/v2/cases.py index f07ad71b9..73c29fda2 100644 --- a/tests/v2/cases.py +++ b/tests/v2/cases.py @@ -1630,6 +1630,22 @@ def _check_cjk_shape_purity(self) -> None: notes="read middle 'Kwok-kin', family 'GBS', suffix 'JP' 1.4.0 " "through 3.1; the capitals family is capitals_as_family's " "to read (rules/O9)"), + Case("aus_opens_a_german_family_name", "Karen aus der Fünten", + {"given": "Karen", "family": "aus der Fünten"}, + classification="fix(#1284)", + notes="aus is a de.toml preposition; read middle 'aus', family " + "'der Fünten' 1.4.0 through 3.1"), + Case("aus_opening_a_name_stays_the_given_name", "Aus Rahman", + {"given": "Aus", "family": "Rahman"}, + ambiguities=("particle-or-given",), + notes="boundary: aus's given reading keeps the word positional at " + "the head, where may_be_given = false would fold the whole " + "name into the family (#1284)"), + Case("aus_as_a_middle_name_is_read_into_the_family", "Kevin Aus Smith", + {"given": "Kevin", "family": "Aus Smith"}, + classification="fix(#1284)", + notes="the accepted cost of listing aus: no corpus name has the " + "shape; read middle 'Aus' 1.4.0 through 3.1"), Case("ba_is_a_suffix_when_a_family_name_remains", "John Smith BA", {"given": "John", "family": "Smith", "suffix": "BA"}, notes="the words-to-spare half: a full name in front leaves the " diff --git a/tools/differential/snapshot.jsonl b/tools/differential/snapshot.jsonl index d654c50f7..ac77ec364 100644 --- a/tools/differential/snapshot.jsonl +++ b/tools/differential/snapshot.jsonl @@ -2710,7 +2710,7 @@ {"name": "K.T. Smith", "given": "K.", "middle": "T.", "family": "Smith", "initials": "K. T. S."} {"name": "KALAM Alɛ Mustafa", "order": "FAMILY_FIRST", "given": "Alɛ", "middle": "Mustafa", "family": "KALAM", "initials": "A. M. K.", "capitalized_force": "Kalam Alɛ Mustafa"} {"name": "KANSULO Iiɖa", "order": "FAMILY_FIRST", "given": "Iiɖa", "family": "KANSULO", "initials": "I. K.", "capitalized_force": "Kansulo Iiɖa"} -{"name": "KAREN AUS DER FÜNTEN", "given": "KAREN", "middle": "AUS", "family": "DER FÜNTEN", "initials": "K. A. F.", "capitalized": "Karen Aus Der Fünten"} +{"name": "KAREN AUS DER FÜNTEN", "given": "KAREN", "family": "AUS DER FÜNTEN", "initials": "K. F.", "capitalized": "Karen aus der Fünten"} {"name": "KIM, AE-RA", "family": "KIM", "suffix": "AE-RA", "initials": "K.", "capitalized": "Kim, AE-RA"} {"name": "KIM, MA-AE", "family": "KIM", "suffix": "MA-AE", "initials": "K.", "capitalized": "Kim, MA-AE"} {"name": "Kajal Patel Hiring Globally", "given": "Kajal", "middle": "Patel Hiring", "family": "Globally", "initials": "K. P. H. G."} From e3dec640af326c47fb4e0c78f33bde316d56b8b4 Mon Sep 17 00:00:00 2001 From: Derek Gulbranson Date: Fri, 20 Nov 2026 19:40:16 -0800 Subject: [PATCH 3/5] Fix the review findings: examples, costs and history for the new credentials and aus The rules examples and the render test that used aus der and GBS as unlisted words take unter der and MH; the case row pinning C2's flag on an unlisted part writes Xq, the BCh spelling getting a row of its own; the sweep counts are re-taken. The decisions entries state the widest form of each accepted cost (aus after the head and in case repair, the lower-case masks on a name, MH and SC with no comma), cite C13 for Bello, MNI, supersede decisions/R12's aus der cost, and give recipes; two case notes correct their release history. Co-Authored-By: Claude Opus 5.5 --- ...-opening-the-family-name-with-a-capital.md | 2 +- .../S12-credential-split-across-a-space.md | 2 +- .../decisions/suffix-acronym-collisions.md | 11 +++++----- .../design/decisions/vocabulary-collisions.md | 6 ++--- .../O9-words-in-capitals-as-the-family.md | 2 +- ...-opening-the-family-name-with-a-capital.md | 2 +- docs/release_log.rst | 2 +- nameparser/vocab/en.toml | 6 ++--- tests/v2/cases.py | 22 +++++++++++++------ tests/v2/test_cases.py | 14 +++++++----- tests/v2/test_render.py | 2 +- tools/differential/corpus_rules.jsonl | 4 ++-- tools/differential/snapshot.jsonl | 4 ++-- 13 files changed, 46 insertions(+), 33 deletions(-) diff --git a/docs/design/decisions/R12-particle-opening-the-family-name-with-a-capital.md b/docs/design/decisions/R12-particle-opening-the-family-name-with-a-capital.md index 6ac7d0c24..4da63a356 100644 --- a/docs/design/decisions/R12-particle-opening-the-family-name-with-a-capital.md +++ b/docs/design/decisions/R12-particle-opening-the-family-name-with-a-capital.md @@ -8,4 +8,4 @@ Elsewhere: a particle opening a hyphenated word and the question this rule answe ## Log -- 2026-11-09 #1224, decided in chat — A TER OR DER OPENING THE FAMILY NAME TAKES ITS CAPITAL. decisions/R4's #1224 entry left the spaced Armenian prefix lowercase (`LEVON TER PETROSYAN` → 'Levon ter Petrosyan', `ARMEN DER KIUREGHIAN` → 'Armen der Kiureghian', as 1.4.0 through 3.0.1 give it) and put it to the maintainer, who decided that a spaced `ter` or `der` opening the family name is written with a capital and one following another particle keeps its lowercase. Measured 2026-11-09 over every mixed-case name in the committed corpora (`tools/differential/corpus*.jsonl` save `corpus_rules.jsonl`, which holds the rules' own examples) and the 16 local corpora under `~/.cache/nameparser-tools/local` (each source's `raw.jsonl` where it has one, else its `corpus.jsonl`), every occurrence counted, on the tree before the change: a name split on whitespace (a comma its own token), each `ter` or `der` word, case-insensitive, that is neither the name's first nor its last word and has a word after it, classed as OPENING or AFTER A PARTICLE by whether the previous written word's last hyphen part is one of `van von de den in op uit vd v.d. zu auf d v vom aan onder voor bij la le`, and by its first letter's case (a word all in capitals counted apart). `der` opening: 45 capitalized (4 more written in capitals) to 28 lowercase, and none of the 28 a surname the word opens: `Karen aus der Fünten` (`aus` is no particle in the vocabulary), the epithets of `Alexandre Dumas der Ältere`, `Willem-Alexander der Nederlanden`, and text that is no name. The 45 capitalized are Armenian surnames (`Peter Der Manuelian`, `Cheryl Der Ananian`), Taiwanese given names (`Jung Der Wang`, `Ja Der Liang`; four of the 45 from Taiwan by the source's country), German epithets (`Peter Der Grosse`, `Manfred von Richthofen Der Rote Baron`) and others (`Iba Der THIAM`). `der` after a particle: 1,087 capitalized to 2,814 lowercase. `ter` opening: 70 capitalized (1 more in capitals) to 81 lowercase; with a next word matching `(yan|ian|ean|jan|ants|unts|ounian|ouni)$`, case-insensitive, 17 capitalized (counting the one in capitals) to 0, a count JRC-Names inflates with its many spellings of one person (`Levon Ter Petrosian`, `Ter Petrossian`, `Ter Petrosjan`); by the country a source records, the Netherlands writes the opening `ter` both ways, 26 (and 7 more of nationality `Dutch`) capitalized to 39 lowercase. So the opening `der` is capitalized by its writers and the opening `ter` is split, and only the particle before the word separates the Dutch and German `der` written lowercase (`van der`, `von der`), which keeps its lowercase. The property is a reading's (`capital_opening`), not a kind's: `ter` is a `preposition` and `der` an `article`, the kind `de` and `la` are too. The word before is read in the family name as the family view joins its words, so a particle folded in after a comma counts (`DER BERG, JAN VAN` → 'Jan van der Berg'); it counts as a particle by its tag or by its last hyphen part being particle vocabulary. Where the word opens the family name, the word written right before it counts the same way whatever its role, decided in chat after review: a Dutch surname written without a given name capitalizes only its first particle, which the parse reads as the given name (`VAN DER WALT` → 'Van der Walt', `VAN TER HORST` → 'Van ter Horst', `DR. VAN TER HORST` → 'Dr. Van ter Horst', a nickname too, `JAN "VAN" TER HORST` → 'Jan "Van" ter Horst', and a given name revised in, `revise(parse("JAN TER BERG"), given="JAN VAN")` → 'Jan Van ter Berg'), DECIDED; the reading where a word of another role was no particle of the family's, which a first fix of the review built, gave 'Van Der Walt' forced and moved three entries of the snapshot's forced view (`Van der Walt`, `Van der Merwe Jan`, `Sr. van der Berg, PhD`), which now read as before the change. The last middle word also counts by its hyphen part alone, the case of `DER ZEE, ANKE MAITLAND-VAN` → 'Anke Maitland-van der Zee', whose `Maitland-van` the parse reads as a middle name. A middle `ter` keeps its lowercase (`JAN TER HORST VAN DER BERG` → 'Jan ter Horst van der Berg'). A family spliced in as raw text is read by the vocabulary, the word and the word before it alike, so `replace(family="TER PETROSYAN")` repairs as `revise()` and a fresh parse do ('Ter'). The first build read the word before in the written order, which review found breaking the comma shapes (`DER BERG, JAN VAN` gave 'van Der Berg'), so the family name is read in its own order; a first fix of that review also read a word of another role as no particle, which the decision above reversed, restoring the any-role reading for the word written right before the family name. Review also found that only `ANNA AZ- DER BERG` told the tag test from the hyphen test, that only `MAITLAND-VAN DER ZEE, ANKE` tested a hyphenated word ending in a particle inside the family name, and that only `MAITLAND-VAN DER ZEE` (given `Maitland-Van`) tested one written right before it. A title that is also a particle counts as the particle before it, by the same any-role reading (`FREIHERR TER HORST` → 'Freiherr ter Horst', `ST. TER HORST` → 'St. ter Horst'), where a title that is not keeps the word its capital (`SIR TER HORST` → 'Sir Ter Horst'). DECLINED: a next word matching the regex above as the signal for the Armenian prefix, which would keep `Gerard ter Borch` lowercase, but reads a language from a Latin spelling (AGENTS.md's design philosophy). THE COSTS, accepted: a Dutch surname opened by `ter` takes the capital (`GERARD TER BORCH` → 'Gerard Ter Borch'), as 26 of the 65 Netherlands rows write it; a German `der` behind a word the vocabulary does not list as a particle opens the family name (`KAREN AUS DER FÜNTEN` → 'Karen Aus Der Fünten', `aus` not added to the vocabulary); a German epithet the parse places in the family name takes the capital (`ALEXANDRE DUMAS DER ÄLTERE` → 'Alexandre Dumas Der Ältere', `JOHANN DER JÜNGERE` → 'Johann Der Jüngere', where 1.4.0 through 3.0.1 give 'der'); and the Taiwanese given-name syllable `Der`, which the parse puts in the family name (`JA DER LIANG` → family 'Der Liang', unchanged), now takes the capital its writers give it ('Ja Der Liang'). Pinned by rules/R12's examples, test_a_ter_or_der_opening_the_family_name_takes_a_capital and test_a_spliced_ter_reads_as_a_revised_one. +- 2026-11-09 #1224, decided in chat (its `KAREN AUS DER FÜNTEN` cost superseded by decisions/vocabulary-collisions' 2026-11-20 #1284 entry, `aus` now a listed particle) — A TER OR DER OPENING THE FAMILY NAME TAKES ITS CAPITAL. decisions/R4's #1224 entry left the spaced Armenian prefix lowercase (`LEVON TER PETROSYAN` → 'Levon ter Petrosyan', `ARMEN DER KIUREGHIAN` → 'Armen der Kiureghian', as 1.4.0 through 3.0.1 give it) and put it to the maintainer, who decided that a spaced `ter` or `der` opening the family name is written with a capital and one following another particle keeps its lowercase. Measured 2026-11-09 over every mixed-case name in the committed corpora (`tools/differential/corpus*.jsonl` save `corpus_rules.jsonl`, which holds the rules' own examples) and the 16 local corpora under `~/.cache/nameparser-tools/local` (each source's `raw.jsonl` where it has one, else its `corpus.jsonl`), every occurrence counted, on the tree before the change: a name split on whitespace (a comma its own token), each `ter` or `der` word, case-insensitive, that is neither the name's first nor its last word and has a word after it, classed as OPENING or AFTER A PARTICLE by whether the previous written word's last hyphen part is one of `van von de den in op uit vd v.d. zu auf d v vom aan onder voor bij la le`, and by its first letter's case (a word all in capitals counted apart). `der` opening: 45 capitalized (4 more written in capitals) to 28 lowercase, and none of the 28 a surname the word opens: `Karen aus der Fünten` (`aus` is no particle in the vocabulary), the epithets of `Alexandre Dumas der Ältere`, `Willem-Alexander der Nederlanden`, and text that is no name. The 45 capitalized are Armenian surnames (`Peter Der Manuelian`, `Cheryl Der Ananian`), Taiwanese given names (`Jung Der Wang`, `Ja Der Liang`; four of the 45 from Taiwan by the source's country), German epithets (`Peter Der Grosse`, `Manfred von Richthofen Der Rote Baron`) and others (`Iba Der THIAM`). `der` after a particle: 1,087 capitalized to 2,814 lowercase. `ter` opening: 70 capitalized (1 more in capitals) to 81 lowercase; with a next word matching `(yan|ian|ean|jan|ants|unts|ounian|ouni)$`, case-insensitive, 17 capitalized (counting the one in capitals) to 0, a count JRC-Names inflates with its many spellings of one person (`Levon Ter Petrosian`, `Ter Petrossian`, `Ter Petrosjan`); by the country a source records, the Netherlands writes the opening `ter` both ways, 26 (and 7 more of nationality `Dutch`) capitalized to 39 lowercase. So the opening `der` is capitalized by its writers and the opening `ter` is split, and only the particle before the word separates the Dutch and German `der` written lowercase (`van der`, `von der`), which keeps its lowercase. The property is a reading's (`capital_opening`), not a kind's: `ter` is a `preposition` and `der` an `article`, the kind `de` and `la` are too. The word before is read in the family name as the family view joins its words, so a particle folded in after a comma counts (`DER BERG, JAN VAN` → 'Jan van der Berg'); it counts as a particle by its tag or by its last hyphen part being particle vocabulary. Where the word opens the family name, the word written right before it counts the same way whatever its role, decided in chat after review: a Dutch surname written without a given name capitalizes only its first particle, which the parse reads as the given name (`VAN DER WALT` → 'Van der Walt', `VAN TER HORST` → 'Van ter Horst', `DR. VAN TER HORST` → 'Dr. Van ter Horst', a nickname too, `JAN "VAN" TER HORST` → 'Jan "Van" ter Horst', and a given name revised in, `revise(parse("JAN TER BERG"), given="JAN VAN")` → 'Jan Van ter Berg'), DECIDED; the reading where a word of another role was no particle of the family's, which a first fix of the review built, gave 'Van Der Walt' forced and moved three entries of the snapshot's forced view (`Van der Walt`, `Van der Merwe Jan`, `Sr. van der Berg, PhD`), which now read as before the change. The last middle word also counts by its hyphen part alone, the case of `DER ZEE, ANKE MAITLAND-VAN` → 'Anke Maitland-van der Zee', whose `Maitland-van` the parse reads as a middle name. A middle `ter` keeps its lowercase (`JAN TER HORST VAN DER BERG` → 'Jan ter Horst van der Berg'). A family spliced in as raw text is read by the vocabulary, the word and the word before it alike, so `replace(family="TER PETROSYAN")` repairs as `revise()` and a fresh parse do ('Ter'). The first build read the word before in the written order, which review found breaking the comma shapes (`DER BERG, JAN VAN` gave 'van Der Berg'), so the family name is read in its own order; a first fix of that review also read a word of another role as no particle, which the decision above reversed, restoring the any-role reading for the word written right before the family name. Review also found that only `ANNA AZ- DER BERG` told the tag test from the hyphen test, that only `MAITLAND-VAN DER ZEE, ANKE` tested a hyphenated word ending in a particle inside the family name, and that only `MAITLAND-VAN DER ZEE` (given `Maitland-Van`) tested one written right before it. A title that is also a particle counts as the particle before it, by the same any-role reading (`FREIHERR TER HORST` → 'Freiherr ter Horst', `ST. TER HORST` → 'St. ter Horst'), where a title that is not keeps the word its capital (`SIR TER HORST` → 'Sir Ter Horst'). DECLINED: a next word matching the regex above as the signal for the Armenian prefix, which would keep `Gerard ter Borch` lowercase, but reads a language from a Latin spelling (AGENTS.md's design philosophy). THE COSTS, accepted: a Dutch surname opened by `ter` takes the capital (`GERARD TER BORCH` → 'Gerard Ter Borch'), as 26 of the 65 Netherlands rows write it; a German `der` behind a word the vocabulary does not list as a particle opens the family name (`KAREN AUS DER FÜNTEN` → 'Karen Aus Der Fünten', `aus` not added to the vocabulary); a German epithet the parse places in the family name takes the capital (`ALEXANDRE DUMAS DER ÄLTERE` → 'Alexandre Dumas Der Ältere', `JOHANN DER JÜNGERE` → 'Johann Der Jüngere', where 1.4.0 through 3.0.1 give 'der'); and the Taiwanese given-name syllable `Der`, which the parse puts in the family name (`JA DER LIANG` → family 'Der Liang', unchanged), now takes the capital its writers give it ('Ja Der Liang'). Pinned by rules/R12's examples, test_a_ter_or_der_opening_the_family_name_takes_a_capital and test_a_spliced_ter_reads_as_a_revised_one. diff --git a/docs/design/decisions/S12-credential-split-across-a-space.md b/docs/design/decisions/S12-credential-split-across-a-space.md index c87c7606d..60cf3d9b7 100644 --- a/docs/design/decisions/S12-credential-split-across-a-space.md +++ b/docs/design/decisions/S12-credential-split-across-a-space.md @@ -35,6 +35,6 @@ Open: none in this file. - 2026-10-25 #752 (Derek), the report — A SPLIT CREDENTIAL THE COUNT TAKES IS REPORTED, AS EITHER READING OF A MEMBER IS. SUPERSEDES: the first entry's SILENT paragraph. Derek, on #891's review: the merged pair is a member of the ambiguous class, which reports either reading (`John Smith MA` reports `suffix-or-name`), and with no report a given name and its initial that spell a credential become one where no caller can find them (`John Smith Ed D`, `Smith, Mary Ed D.`, `JOHN SMITH SAM E.`). So wherever the count takes the pair it reports `suffix-or-name` with one wording ("reads as a credential", a phrasing tests/v2/test_cases.py's field sweep already checks against the field the pair lands in): at assign's placement for the end of a name, the end of the given part and a run start, at `_comma.decide`'s binding for C4's count unless the flip it took part in already reports the part, and at the maiden take's release. A pair the count declines reads as its two words did unmerged and reports what they did, which on master is nothing. The cost is a report on the pairs nobody hesitates over (`John Smith Pharm D`), which the class's report carries for `John Smith MA` too. Measured 2026-10-25 against master 225f3d6f with `--base`, as the first entry: 353 ctgov-officials readings carry the report, 119 of them where master reported no `suffix-or-name` at all, the rest the `MB ChB` and run names whose absorbed-word report it replaces (so the 229 names that dropped a report in the first entry keep the kind, and ctgov moves 469 entries in all: 120 in the ambiguity kinds, each with a field move, 339 only in the force-repaired case view, and the rest in fields or case views without a kind move); the committed snapshot's rules examples gain it where the count takes a pair; tse-donors, fec-individuals, nepal-candidates and psc-individuals read as in the first entry (2, 1, none, matching the base). The field sweep's count goes from 1460 to 1487, nine case rows claiming the report under each order. - 2026-10-25 #752, review of the report — ONE PAIR REPORTED TWICE. After a comma, a pair behind a credential that opens the part (C13) was reported as a word the run absorbed and again as the pair (`Smith, MD Pharm D`, `, MD Pharm D`, `Smith, MD MB ChB`: 168 parses an order over the review's grid), where `John Smith MD Pharm D` reports it once. C13's absorbed report leaves a split pair out, so the pair reports itself (case row `a_split_credential_behind_an_opening_credential_reports_once`). The review also found the Standing line's "after a comma" wider than the code: a part the comma's decision already reports as a whole, and a part past the second comma, carry no pair report, as the Standing line now says. - 2026-10-25 #752, over #890 — RE-MEASURED: #890 merged first and took the ID S11, so this rule and file became S12. Against master b1e5a292 (phase 2h) with `--base`, every figure of the report entry above holds: ctgov-officials 469 entries, tse-donors 2, fec-individuals 1, nepal-candidates none, psc-individuals matching the base (1,004,785 of 1,039,171 agreeing on every field there, #890's own count), and the committed snapshot 2 moves and 28 new rules examples. -- 2026-11-20 #1361 — `BCH` AND `BMBCH` ARE LISTED; #1131'S EXCLUSION OF `BCH` IS LIFTED, AS `CHB`'S CONCERN DOES NOT CARRY OVER. Decided 2026-11-20. en.toml kept `bch` out on 2026-11-07 (#1131) "as chb is", but `chb` was refused because listing it alone broke `MB ChB, PhD`: the pair stopped merging into the listed `mbchb` and `MB` was left a name word. `mb` is listed, so with `bch` listed `MB BCh` is a run of two listed credentials rather than this rule's merge, and `Jane Doe MB BCh, PhD`, `Doe, Jane MB BCh`, `Jane Doe, MB, BCh` and `JANE DOE MB BCH` all still read the suffix; what the pair loses is the `suffix-or-name` report the merge drew. `bmbch` is listed too (cased `BMBCh`), so the split `BM BCh`, whose `bm` is not, merges by this rule into it (`Jane Doe, BM BCh` → suffix 'BM BCh', reported). +- 2026-11-20 #1361 — `BCH` AND `BMBCH` ARE LISTED; #1131'S EXCLUSION OF `BCH` IS LIFTED, AS `CHB`'S CONCERN DOES NOT CARRY OVER. Decided 2026-11-20. en.toml kept `bch` out on 2026-11-07 (#1131) "as chb is", but `chb` was refused because listing it alone broke `MB ChB, PhD`: the pair stopped merging into the listed `mbchb` and `MB` was left a name word. `mb` is listed, so with `bch` listed `MB BCh` is a run of two listed credentials rather than this rule's merge, and `Jane Doe MB BCh, PhD`, `Doe, Jane MB BCh`, `Jane Doe, MB, BCh` and `JANE DOE MB BCH` all still read the suffix; what the pair loses is the `suffix-or-name` report the merge drew, and the comma form, never merged, the `comma-structure` report its unlisted `BCh` drew. `bmbch` is listed too (cased `BMBCh`), so the split `BM BCh`, whose `bm` is not, merges by this rule into it (`Jane Doe, BM BCh` → suffix 'BM BCh', reported). - **Measured** 2026-11-20 against a checkout of master `0d8c6fa8`, with `bchir` (decisions/suffix-acronym-collisions' entry of this date) and the other words of the same PR: `snapshot.py --local ctgov-officials --base`, 322 of 352,104 entries move, none emptying a given or family name or shortening a suffix (the moves grow the suffix, and 31 only drop the merge's report); `fec-individuals` 2 (`MURPHY, MARK T. BCH, FACC` gains the credential, and an `aus` case repair, decisions/vocabulary-collisions); `govuk-people` 1, a report; `local_agreement.py orcid-researchers --base` and `psc-individuals --base`, no record moved by these words; the committed snapshot, `Jane Doe, BM, BCh, PhD` dropping its `comma-structure` report. tests/v2/cases.py's `bch_after_a_comma_reads_the_credential`, `mb_bch_still_reads_as_one_suffix_run` and `bmbch_ending_a_name_reads_the_credential` pin it. - Recompute: the two commands above with `--base `. diff --git a/docs/design/decisions/suffix-acronym-collisions.md b/docs/design/decisions/suffix-acronym-collisions.md index 3903efc4c..cf24b0831 100644 --- a/docs/design/decisions/suffix-acronym-collisions.md +++ b/docs/design/decisions/suffix-acronym-collisions.md @@ -35,6 +35,7 @@ Not standing: the #454 bullet's note that the `fix(suffix-routing)` ledger rule Elsewhere: since phase 2a the ambiguous marking above is derived from a word's name reading rather than written as a flag, and no membership above moved — decisions/vocabulary-model's 2026-10-25 #752 — A CLASH WITH A NAME IS A NAME READING entry (phase 2a). +- The Nigerian marks `mni`, `fwc`, `fsi`, `fnse`, `psc` and `ndc`, repaired in lower case, and the honours `gbm`, `gbs`, `sbs`, `bbs` and `bbm` are credentials; initials glued after a one-word family and a comma that spell one read as it (`Bello, MNI`) — 2026-11-20 #1361. - `bchir` is marked ambiguous by its family reading, the surname Bchir, with no case mask; `mh` and `sc` are out, their clash being with initials; `san` waits for a Nigerian English choice of language — 2026-11-20 #1361. Open: #1053, carried over from #965 (telling the credential `FREng`, written in mixed case, from the surname `Freng`; a case reading of S6's, held in decisions/S6). @@ -94,11 +95,11 @@ Open: #1053, carried over from #965 (telling the credential `FREng`, written in - **2026-11-09 (#998) — credentials written in two chunks joined at a full stop, a batch.** rules/S3 read an unlisted `B.Pharm` or `M.Kes` by its shape: a suffix with a suffix-or-name report where a word was to spare, a name word where none was (`Ali C.Psych` → family 'C.Psych'), and a title where a chunk is a listed title (`Ayu Pangestu, S.Pd, M.Pd` → title 'S.Pd M.Pd', `pd` being one). The same spellings without stops reversed a comma name (`Anna Gelavis, BPharm` → given 'BPharm'). **Candidates**: the spellings #998's recipe found ending a name in the six local corpora it counted, with second chunks of any length, sorted by hand. Each was put through `tools/vocab/query.py --word` (none had a reading or an exclusion) and `tools/name_usage.py` (counts taken 2026-11-09, recorded in each word's `note`). **Added** (43): 26 in en.toml (`bpharm`, `cpsych`, `mpharm`, `msci`, `mtech`, `dsci`, `mmath`, `moptom`, …), 16 in id.toml (`mkes`, `mkep`, `mkom`, `skom`, `mpd`, `spd`, `mhum`, `mkn`, `msi`, …) and `menf` in pt.toml. All but `msi` have no Census 2010, SSA or Wikidata bearer above each source's floor, and each carries its `cased` mask but `msci` (written MSCI 152 times against MSci 28 by ClinicalTrials.gov officials, so a mask would re-spell the common form) and `msi`. **Marked ambiguous**: `msi`, with a family reading and no mask, Msi being a Xhosa surname. Listed plain, it took the surname from `Andiswa Zanele Msi` in ORCID and `Mr Afikile Manduleli Msi` in PSC (suffix 'Msi'); marked, both keep it, reported. A name in one case with a word to spare still loses it (`ANDISWA ZANELE MSI` → suffix 'MSI'), the cost `mot` pays (#993), accepted because no local corpus writes the shape. Refusing it was tried and measured worse: a comma name reversed (`Jane Doe, MSi` → given 'MSi') and `Saprudin S.Sos., M.Si.` read given 'M.Si.'. **Refused**, each with an `excluded` entry giving its counts: `peng`, `ceng`, `barch`, `bchir`, `mendo`, `bed`, `ssi` (the romanized Korean honorific 씨, `Park Ji-hoon ssi`, which the committed snapshot holds), `sked`, `shut`, `merg`, `mak` and `mor`. `bed` is the Nepali given name Bed (59 nepal-candidates names), refused for the given part after a family comma: listed, `Thapa, Bed` reads suffix 'Bed'. No local corpus writes that shape. The gain refused is 6 readings of the 10 records writing the credential, 3 of them in a field (`Karina A Thiessen, BA BEd`, `John Zengulaaru (M.Phil., B.Ed)`), the other 4 already reading the suffix by rules/S3 or the comma. The same position, and the trailing given name under a family-first order, reaches `ded` and `edd`, whose Standing line this entry amends. `btech` is left unlisted, being the example of an unlisted dotted credential in eleven files; `mpdk` (`M.Pd.K.`, three chunks) was not a candidate and still reads as a title by its `pd` chunk. **Measured** (`tools/differential/measure.py --base` against master b89c5482, then ctgov-officials, orcid-researchers, psc-individuals, cz-candidates and jrc-names again on the final tree): ctgov-officials moves 407 of 536,981 readings, 122 of them in a field, each sampled one a credential leaving the given name, middle name, title or family name for the suffix (`Anna Gelavis, BPharm`, `Janice Pellow, M.Tech Hom` → suffix 'M.Tech Hom', `Veronique Michaud, BPharm. PhD`), the rest reports and case views; orcid-researchers moves 81, 50 in a field, mostly Indonesian degrees that had read as titles (`Dr. Rajab Agustini, S.Pd., M.Pd.` → title 'Dr.', suffix 'S.Pd., M.Pd.'); cz-candidates 2, jrc-names 1 (`Bernd Lange SPD` → family 'Lange', suffix 'SPD'), psc-individuals 1, its report only (`Mr Afikile Manduleli Msi`); the other local corpora, the committed snapshot and the CLDR, GND and Wikidata records do not move (opensanctions-parliaments not measured, its cache predating the datasets the tool reads). Scored: orcid-researchers 9 records agree that did not and 1 no longer does (`Saprudin S.Sos., M.Si.`, one name word, read family where the filer's given box holds it), cz-candidates 1 more agrees, psc-individuals and patentsview-inventors do not move. **Accepted**: `Ahmed Ali M.Hassan` keeps reading suffix 'M.Hassan', reported, the cost #998's proposal accepts; the division's count against it is in decisions/period-joined-words' 2026-11-09 #998 bullet. Pinned by the `two_chunk_credential_is_listed`, `two_chunk_credential_with_no_word_to_spare`, `family_comma_given_part_ends_in_two_chunk_credential`, `indonesian_credentials_after_a_comma`, `glued_initial_and_surname_still_read_by_position`, `two_chunk_credential_written_without_stops_after_a_comma`, `two_chunk_credential_in_capitals_without_stops`, `indonesian_credentials_with_no_comma`, `two_chunk_credential_after_a_one_word_head`, `ambiguous_msi_keeps_the_surname`, `ambiguous_msi_after_a_comma_is_the_credential`, `ambiguous_msi_in_capitals_takes_the_surname`, `refused_peng_keeps_the_surname`, `refused_bed_keeps_the_given_name` and `refused_ssi_keeps_the_word` case rows, and the masks by `tests/v2/test_render.py`'s `test_a_credential_written_in_two_chunks_takes_its_mask`. **Recompute**: `uv run python tools/vocab/query.py --issue 998` lists the entries; the moves by the command above against a master checkout. - **2026-11-10 (#1315) — the Royal Colleges' fellowships and memberships, a batch.** `John Smith FRCS` gave middle 'Smith', family 'FRCS', as did `Tanaka Hiroshi FRCS` under a family-first base (so #1310's group suggester voted given-first on it), and `Smith, John MRCP` gave middle 'MRCP': C6's caps shape needs a comma or a word the listing holds, and only `FACS` and `FACP` of the family were listed. 34 words listed (`en.toml`, `uv run python tools/vocab/query.py --issue 1315`): the Colleges of Surgeons, Physicians, Radiologists, Obstetricians and Gynaecologists, Ophthalmologists, Pathologists, Psychiatrists, Emergency Medicine, General Practitioners, Anaesthetists and Paediatrics, the Veterinary Surgeons (`mrcvs`), and the Canadian and Australasian royal colleges (`frcsc`, `frcpc`, `fracs`, `fracp`). **Vetted** by `tools/name_usage.py` and the local corpora: none has a Census 2010, SSA, nam_dict or Wikidata bearer, and none sits where a surname would in any local corpus (ctgov-officials, orcid-researchers, govuk-people, psc-individuals and fec-individuals hold them, all as credential runs; tse-donors, where #993 found `cota`, holds none), so none is marked ambiguous. The #993 screens were run over all 34 in lower, Title and upper case: `Jane Doe X`, `Jane Doe, X`, `JANE DOE, X`, `jane doe, x`, `Doe, Jane X`, `Jane Doe X, PhD`, and the capitals shapes with a word to spare and no comma (`JANE ANN DOE X`), and every one read the word as the suffix with no report. Each note records NPPES's count and ClinicalTrials.gov's after a comma (data 2026-10-21); `frcpglas`, `frcvs` and `frcsglasg` were left out as unwritten in every corpus, and `fasn`, `facg` and `fcps` (699 officials, Pakistan's College of Physicians and Surgeons) as not Royal College words, each worth a batch of its own. Six mixed-case ones carry a `cased` mask (`FRCPath`, `FRCOphth`, `FRCPsych`, `MRCPsych`, `FRCSEd`, `MRCSEd`). **Measured** over the committed corpora, the snapshot moved two names and none of the seven role fields: `Alex Green, FRCS (SN)` and `Andrew Wilson, MRCP (UK)` lost their `suffix-or-name` report, a listed word needing no fork. **Measured over the local corpora against master** (`tools/differential/measure.py`, 2026-11-10): ClinicalTrials.gov's officials moved 5,508 entries, 241 of them a role field; 225 of those put a listed word in the suffix where the base had it in the given, family, middle or title (`Troy Puar, MRCP UK` was given `MRCP`), and 16 went from right to wrong: 13 runs opening with `BM`, 2 with `MA BM` and 1 with `AO` after a comma (`Keith Godfrey, BM PhD FRCP`, given `BM` now). The cause was there before: `Keith Godfrey, BM PhD` and `..., BM PhD FACS` read given `BM` on master, and the unlisted `FRCP` ending the run kept it a suffix by accident, which listing it removes. Accepted as a cost of listing, and filed apart as the bug it is (#1323). **Declined: listing `bm` (Bachelor of Medicine) to remove it** (2026-11-10): it has no Census, SSA or Wikidata bearer, but an acronym is matched with every full stop removed, so it lists `B.M.` too, which Nepal's candidates write as surname initials (rules/S3's paired-initials Except, #864). Measured against master it fixed 15 ClinicalTrials.gov runs, 2 FEC names and `Whinnett, BM.BS`, and moved 6 Nepal candidates (`Chacra Bahadur B.M.`, family `B.M.` to a suffix) and 5 ORCID names where `BM` is a family-name initial (`Avinash BM`) to a suffix with the family name gone, the worse direction; the fix belongs in how a part opening with an unlisted two-capital word is read, not in the vocabulary. `ao` was left out for its own reason: a Census 2010 family reading (524) and an SSA given one (18), so it needs the ambiguous marking, and it moved 1 name. FEC, GOV.UK, ORCID and Companies House moved 1, 8, 16 and 3 entries, by the same readings, and tse-donors (where `cota` was found) and the other corpora moved none (opensanctions-parliaments could not be measured, its cached copy being stale); the committed snapshot, CLDR and GND records moved only the two reports above. A test that used `FRCS` as its example of an unlisted capitals credential (`tests/v2/pipeline/test_comma.py`) now uses `XYZW`, a word no listing will take. **Recompute**: `git diff origin/master...HEAD -- tools/differential/snapshot.jsonl` on the branch for the two moves (`snapshot.py --since v3.0.1` lists every move of the cycle, 325 entries on 2026-11-10, not this change's); the old readings are 1.4.0's too (`HumanName("John Smith FRCS")` gives last 'FRCS'). - **2026-11-19 (#1467) — `ud` LEAVES THE CREDENTIALS; `bt` STAYS.** Decided on the issue (its 2026-11-19 decision comment). `ud` came with the bulk list and is the Urdu and Arabic connective of a compound name (`Zia ud Din`). Counted over the distinct names of eight local corpora (ctgov-officials, ctgov-contacts, govuk-people, ukec-individuals, psc-individuals, fec-individuals, orcid-researchers, my-candidates), the words split at spaces with commas and full stops removed, as the vocabulary matches an acronym, 2026-11-19: `ud` stands between name words in 121 and ends a name in 7 (4 after a comma, 3 with none), and `bt` stands between name words in 35 and ends a name in 16 (7 after a comma, 9 with none), by position alone, so the 35 hold baronets with more post-nominals behind (`Bt, FRICS`) and the 16 surname-first initials (`B.T.`) among them (the decision comment's 127 and 34 counted records rather than distinct names, and its 7 and 11 another split). In lower case, in capitals within a mixed-case name, or in a name of one case, the credential reading started a run that took the rest of the name (`NADIR ZIA UD DIN` → family 'ZIA', suffix 'UD DIN', 2.4.0 through 3.1.0; 1.4.0 through 2.3.0 read middle 'ZIA UD', family 'DIN', which the change restores). The reading is removed with an `excluded` entry in en.toml carrying the counts. **The 7 names ending in it** write no credential: four are initials written `U.D`, the full stops being what the vocabulary's match removes: three ORCID holders' with no comma, now read as the family, as an unlisted pair of initials ending a name is, and an FEC donor's after a comma, read as initials before and after; one is the compound written surname first (FEC, now middle 'UD' where it read suffix 'UD'); and two are one Dutch study chair in two ClinicalTrials.gov records writing the rank universitair docent after the name and a comma, which now reads as an unlisted pair of capitals there does, initials run together: given 'UD', the name before the comma the family (written here with an invented name, `Anke Vissering, UD`), the accepted cost. Written with its full stops after a comma it reads as initials too (`Anke Vissering, U.D.` → given 'U.', middle 'D.'), and with a final full stop as a title by rules/H2's shape (`UD.`), as any unlisted word of that shape does. **`bt` is not changed**: a name reading beside the credential reads `Nur Aina bt Rosli` with family 'Rosli' and `Sir John Smith Bt` with family 'Bt', and the counts are too few to choose by; docs/customize.rst gives the recipe for a caller with Malay names (`Lexicon.default().remove("bt", kind="credential")`) and its cost on a baronet. The compound itself is not joined: `X ul/ur/ud Y` reads family 'Y'. **Measured** (`tools/differential/measure.py --base` against master 12b568f8): ctgov-officials and ctgov-contacts 1 entry each (the Dutch chair), fec-individuals 2, jrc-names 8, orcid-researchers 12, opensanctions-parliaments 1, patentsview-inventors 1; every other local corpus, the committed snapshot and the CLDR and GND records none. Scored against the filed boxes, orcid-researchers 3 records agree that did not (a Bangladeshi name holding `ud` in the given box and two Sri Lankan ones ending in `U.D`) and 6 no longer do, Pakistani holders who filed the whole compound in the family box (`ud Din` and the word before it), which the run's suffix had matched where the unjoined compound does not, with 2 more changing between two disagreements; patentsview-inventors 1 Hungarian record no longer agrees. Pinned by the `ud_inside_a_compound_name_in_capitals_is_a_name_word`, `ud_in_lower_case_inside_a_compound_name_is_a_name_word`, `ud_after_a_full_name_and_a_comma_reads_as_initials` and `bt_in_lower_case_before_the_last_word_stays_the_credential` case rows. -- **2026-11-20 (#1361, #1228, #1182) — eleven credentials listed, `bchir` marked ambiguous, `mh` and `sc` declined, `san` deferred.** Decided 2026-11-20. - - **`bchir`** (B.Chir, Bachelor of Surgery) is listed with a `family` reading, the Tunisian surname Bchir (ORCID 2 family boxes, PSC 1, Wikidata 2, each in Title case and none after a comma), so it is marked ambiguous, the `ba` shape: after a comma it is the credential, reported (`Jane Doe, BChir`); ending a name in Title case the family (`Amani Bchir`, reported). It carries no case mask, which would repair the surname to `BChir`, so `capitalized(force=True)` writes the credential `BCHIR`. Accepted: a surname written `BCHIR` in capitals ending a name of mixed case reads as the credential (`Amani BCHIR` → suffix 'BCHIR', reporting `given-or-family`), rules/S6's capitals reading; no corpus name writes it so. decisions/S12's entry of this date lists `bch` and `bmbch`. +- **2026-11-20 (#1361, #1228, #1182) — ELEVEN CREDENTIALS ARE LISTED, `BCHIR` IS MARKED AMBIGUOUS, `MH` AND `SC` ARE DECLINED AND `SAN` IS DEFERRED.** Decided 2026-11-20. + - **`bchir`** (B.Chir, Bachelor of Surgery; written so with no comma it stays a name word, `Jane Doe BChir` → family 'BChir', reported, as master read it) is listed with a `family` reading, the Tunisian surname Bchir (ORCID 2 family boxes, PSC 1, Wikidata 2, each in Title case and none after a comma), so it is marked ambiguous, the `ba` shape: after a comma it is the credential, reported (`Jane Doe, BChir`); ending a name in Title case the family (`Amani Bchir`, reported). It carries no case mask, which would repair the surname to `BChir`, so `capitalized(force=True)` writes the credential `BCHIR`. Accepted: a surname written `BCHIR` in capitals ending a name of mixed case reads as the credential (`Amani BCHIR` → suffix 'BCHIR', reporting `given-or-family`), rules/S6's capitals reading; no corpus name writes it so. decisions/S12's entry of this date lists `bch` and `bmbch`. - **The Nigerian marks** `mni`, `fwc`, `fsi`, `fnse`, `psc` and `ndc` are listed with lower-case masks, being written in lower case: case repair keeps them so in a name of mixed case or one written in capitals (`JANE DOE, MNI` → `Jane Doe, mni`), and `capitalized(force=True)` writes them lower case too (`Jane Doe, MNI` → `Jane Doe, mni`; `Maj Gen John Smith CB psc` keeps `psc`). - **The Hong Kong and Singapore honours** `gbm`, `gbs`, `sbs`, `bbs` and `bbm` are listed, written in capitals, with no mask. Without a comma they read as the credential now (`Hon WONG Kwok-kin GBS JP` → suffix 'GBS JP'); after a comma they already did (rules/C6), and `MH, JP` already reads the run (rules/C5, #1392). The capitals family name `WONG` is `capitals_as_family`'s to read (rules/O9), and `Policy(unlisted_caps_suffixes=CapsSuffixes.EVERYWHERE)` already read the comma-less rows. - - **Accepted for both batches:** initials glued in capitals after a one-word family and a comma that spell a listed credential read as the credential, the given name lost (`Bello, MNI`, `Chan, GBS`), as rules/C16's Accepted bullet keeps the undotted spelling the credential's own (`Smith, MD`); none in the corpora. - - **Declined: `mh` and `sc`.** Listed, the two moved 324 local-corpus names, most of them wrong: the `Sc` of a split `M. Sc.` (94), capitals initials after a comma (FEC's `DOYLE, SC` shape) losing the given name, and paired initials inside a name (`M.H.`) losing the family. With `JP` behind them they read as the credential run already; a lone trailing `, MH` or `, SC` stays the given name. Neither has a name reading to mark it ambiguous by, its clash being with initials. Each carries an `excluded` entry in en.toml. + - **Accepted for both batches:** initials glued in capitals after a one-word family and a comma that spell a listed credential read as the credential, the given name lost (`Bello, MNI`, `Chan, GBS`), as `Smith, MD` reads, a credential opening the part after a family comma making it the postnominal part (rules/C13); none in the corpora. The lower-case masks apply in every role, so a word written so as a name is repaired in lower case (`RAM MNI GURUNG` → `Ram mni Gurung`; Nepal's candidates hold one `Mni`, PSC's filers four `Psc`), and a Title-case word after a one-word family and a comma reads as the credential too (`Gurung, Mni` → family 'Gurung', suffix 'Mni'). + - **Declined: `mh` and `sc`.** Listed, the two moved 324 local-corpus names, most of them wrong: the `Sc` of a split `M. Sc.` (94), capitals initials after a comma (FEC's `DOYLE, SC` shape) losing the given name, and paired initials inside a name (`M.H.`) losing the family. After a comma with `JP` behind them they read as the credential run already (rules/C5, #1392). Accepted with the decline: a lone trailing `, MH` or `, SC` stays the given name, and with no comma each reads as the family (`Hon WONG Kwok-kin MH JP` → family 'MH', suffix 'JP'), as 18 MH and 4 SC names of the LegCo lists are written. Neither has a name reading to mark it ambiguous by, its clash being with initials. Each carries an `excluded` entry in en.toml. - **Deferred: `san`** (Senior Advocate of Nigeria), the given name San and es, it and fil's saint particle. As a default credential it cost 17 family names written in capitals (TSE's `ALCEU A SAN` shape) and added 143 reports; it waits for a Nigerian English choice of language, where it would be a `default = false` reading. en.toml records the exclusion; #1228 stays open for it. - - **Measured** 2026-11-20 against a checkout of master `0d8c6fa8`: `snapshot.py --local SOURCE --base` on ctgov-officials (322 entries move, decisions/S12's entry, none emptying a field), govuk-people (1, a report) and fec-individuals (2); `local_agreement.py --base` on orcid-researchers (2 records fixed, 0 broken: an `, mni` and an `aus der`) and psc-individuals (1 fixed, a surname box ending `Gbm`, and 1 company name changed); the committed snapshot, the Hong Kong lines and `Jane Doe, BM, BCh, PhD`. The `mh`/`sc` and `san` figures are the triage's of the same day, `config_diff.py diff --local all --match` over the words. Recompute: those commands with `--base `. + - **Measured** 2026-11-20 against a checkout of master `0d8c6fa8`: `snapshot.py --local SOURCE --base` on ctgov-officials (322 entries move, decisions/S12's entry, none emptying a field), govuk-people (1, a report) and fec-individuals (2); `local_agreement.py --base` on orcid-researchers (2 records fixed, 0 broken: an `, mni` and an `aus der`) and psc-individuals (1 fixed, a surname box ending `Gbm`, and 1 company name changed); the committed snapshot, the Hong Kong lines and `Jane Doe, BM, BCh, PhD`. The `mh`/`sc` and `san` figures are the triage's of the same day. Recompute: those commands with `--base `; for the declined and deferred words, `config_diff.py diff default` against an `expr:` lexicon adding them as credentials, `--local all --match` over the words; the bearer counts are on the words (`tools/vocab/query.py --word bchir`, `tools/name_usage.py mni --boxes`). diff --git a/docs/design/decisions/vocabulary-collisions.md b/docs/design/decisions/vocabulary-collisions.md index 699120266..ab140a8b7 100644 --- a/docs/design/decisions/vocabulary-collisions.md +++ b/docs/design/decisions/vocabulary-collisions.md @@ -117,6 +117,6 @@ Elsewhere: C-i reaches the titles through a `given` reading, which makes a title - **What the strict choice costs other names**, on this branch, `config_diff.py diff plain:MY strict:MY --committed --local ctgov-officials --local ctgov-contacts`: 88,009 of the 660,410 distinct names move (a name read once however many inputs hold it; per input, committed 1,884 of 7,662, ctgov-contacts 42,863 of 359,428, ctgov-officials 49,151 of 353,747), 29,233 of them in their ambiguity reports alone and 58,776 in their fields (8.9%); the words moved most are `de` 4,676 (family to middle), `master` 3,628 (title to given), `van` 3,364, `pr` 2,432, `rn` 2,404 (suffix to given), `mbchb` 1,738, `of` 1,720, `pd` 1,688, `do` 1,590. Against the pack with its fragment, on master `4b0b9441`, 45,867 of 660,392 distinct names had moved in their fields. docs/languages.rst states the cost and keeps the strict choice to a wholly Burmese list. - **`locales.VI` measured under strict, not changed** (its list shipped in 3.0.0, #1112; whether strict replaces it is a later question): `uit-vinames`, scored as `local_agreement.py` scores it, every box agreeing for 21,085 of 21,090 under `parser_for(locales.VI)` (99.98%) and 21,089 under `parser_for(locales.VI, strict=True)` (100.00%), 4 fixed and none broken; `vn-assembly` 499 of 499 under both, no name read differently. On names that are not Vietnamese, `config_diff.py diff plain:VI strict:VI --committed --local ctgov-officials --local ctgov-contacts`: 80,628 of the 660,410 distinct names move, 52,108 in their fields. - **Proposal A** (the pack removing the five credential readings) is dropped: the strict choice reads them. **Proposal B** (`ra` a name by default) is a question about Korean names as much as Burmese ones and stays open on #1483, which this change leaves open. #1232's `Mg` is read as that issue asks under the strict choice; the default and the plain pack still read the military `MG`. -- 2026-11-20 #1284 — GERMAN `AUS` IS A PARTICLE BY DEFAULT, WITH A `GIVEN` READING BESIDE IT. Decided 2026-11-20. `Karen aus der Fünten` read middle 'aus', family 'der Fünten'; de.toml lists `aus` as a `preposition`, as it lists `auf`. Unlike `auf` it is not written `may_be_given = false`: `Aus` is an Arabic and Indonesian given name (ORCID given boxes 14, PatentsView 5), and as a never-given particle rules/P1's fold read 6 corpus names opening with it whole as the family (`Aus Rahman`-shaped). With the `given` reading the word stays positional at the head, reported `particle-or-given` (`Aus Rahman`), C-i's marking. - - **Accepted:** an `Aus` written as a middle name before a surname is read into the family (`Kevin Aus Smith` → family 'Aus Smith'), none of the 24 local-corpus names holding the word; and an `AUS` ending a family before a comma is repaired in lower case (FEC's `J AUS, JENNIFER` → `Jennifer J aus`), its fields unchanged, the one such name in the corpora. - - **Measured** 2026-11-20 against a checkout of master `0d8c6fa8`: `local_agreement.py orcid-researchers --base`, 1 record fixed (an `aus der` family box), 0 broken; psc-individuals, none moved by the word; `snapshot.py --local fec-individuals --base`, the case repair above; ctgov-officials, `Karen aus der Fünten, MD, MChiro`-shaped names gaining the family; the committed snapshot, `KAREN AUS DER FÜNTEN` (family 'AUS DER FÜNTEN', repaired `Karen aus der Fünten`), which takes rules/R12's `aus der` example out of its Accepted bullet. Recompute: those commands with `--base `. +- 2026-11-20 #1284 — GERMAN `AUS` IS A PARTICLE BY DEFAULT, WITH A `GIVEN` READING BESIDE IT. Decided 2026-11-20. SUPERSEDES: decisions/R12's 2026-11-09 #1224 entry's accepted `KAREN AUS DER FÜNTEN` → 'Karen Aus Der Fünten', `aus` being listed now. `Karen aus der Fünten` read middle 'aus', family 'der Fünten'; de.toml lists `aus` as a `preposition`, as it lists `auf`. Unlike `auf` it is not written `may_be_given = false`: `Aus` is an Arabic and Indonesian given name (ORCID given boxes 14, PatentsView 5), and as a never-given particle rules/P1's fold read 6 corpus names opening with it whole as the family (`Aus Rahman`-shaped). With the `given` reading the word stays positional at the head, reported `particle-or-given` (`Aus Rahman`), C-i's marking. + - **Accepted:** the given reading protects the head of a name only (`Aus Rahman`, `Dr. Aus Rahman`). Anywhere after it `Aus` starts the family and takes the rest of the name (`Kevin Aus Smith` → family 'Aus Smith'; `Mohammed Aus Khalid Rahman` → family 'Aus Khalid Rahman'), and ending the given part after a family comma it joins the family (`Rahman, Mohammed Aus` → family 'Aus Rahman', reported `particle-or-given`); none of the 24 local-corpus names holding the word takes either shape. Case repair writes the particle lower case, in a name written in capitals (`MOHAMMED AUS RAHMAN` → `Mohammed aus Rahman`; FEC's `J AUS, JENNIFER` → `Jennifer J aus`, the one such name in the corpora, its fields unchanged) and under `force=True` (`Ahmad Aus Ibrahim` → `Ahmad aus Ibrahim`). Under both family-first orders a leading capital `Aus` is placed like `Van` (`Aus der Fünten Karen` → family 'Aus', reported), the lower-case `aus der Fünten Karen` reading right. + - **Measured** 2026-11-20 against a checkout of master `0d8c6fa8`: `local_agreement.py orcid-researchers --base`, 1 record fixed (an `aus der` family box), 0 broken; psc-individuals, none moved by the word; `snapshot.py --local fec-individuals --base`, the case repair above; ctgov-officials, `Karen aus der Fünten, MD, MChiro`-shaped names gaining the family; the committed snapshot, `KAREN AUS DER FÜNTEN` (family 'AUS DER FÜNTEN', repaired `Karen aus der Fünten`), which takes rules/R12's `aus der` example out of its Accepted bullet (`unter der` stands there now). Recompute: those commands with `--base `; the 6 names and the 24 by `config_diff.py diff default` against an `expr:` lexicon adding `aus` as a never-given preposition, `--local all --match` over the word, which lists the names matched and moved; the bearer counts are on the word (`tools/vocab/query.py --word aus`). diff --git a/docs/design/rules/O9-words-in-capitals-as-the-family.md b/docs/design/rules/O9-words-in-capitals-as-the-family.md index 882704a57..0198b6455 100644 --- a/docs/design/rules/O9-words-in-capitals-as-the-family.md +++ b/docs/design/rules/O9-words-in-capitals-as-the-family.md @@ -195,7 +195,7 @@ ``` - An unlisted post-nominal after a listed one, with no comma, is the last run, so it reads as the family once the listed one peels off. ``` - "Hon CHAN Kin-por GBS JP" capitals_as_family → family="GBS" + "Hon CHAN Kin-por MH JP" capitals_as_family → family="MH" ``` - `capitalized()` leaves a name in mixed case as written, so the family keeps its capitals; `capitalized(force=True)` recases them, the family being named by its field by then (R5). - A title written in capitals with no full stop is a capitals word, so where no other word of the name is in capitals it reads as the family, save a title-particle (P4), which stays the title (`ST Anna Berg`, `FREIHERR Anna Berg`): such a name writes no family in capitals and is not in the convention the switch is for, a name that marks its family in capitals writing its title in mixed case about 650 times to 8 (counted 2026-11-19, decisions/O9). Where the family is in capitals too, the title keeps its place. diff --git a/docs/design/rules/R12-particle-opening-the-family-name-with-a-capital.md b/docs/design/rules/R12-particle-opening-the-family-name-with-a-capital.md index 8bc1fd281..71428404a 100644 --- a/docs/design/rules/R12-particle-opening-the-family-name-with-a-capital.md +++ b/docs/design/rules/R12-particle-opening-the-family-name-with-a-capital.md @@ -39,7 +39,7 @@ - The word takes its capital whatever language it is written in, since nothing in its spelling tells the Armenian prefix from the Dutch and German particle: a Dutch surname opened by `ter` is written with a capital, and a German `der` behind a word the vocabulary does not list as a particle (`unter der`) opens the family name as far as repair can tell. ``` "GERARD TER BORCH" → capitalized="Gerard Ter Borch" · boundary - "KAREN AUS DER FÜNTEN" → capitalized="Karen Aus Der Fünten" · boundary + "HANS UNTER DER LINDE" → capitalized="Hans Unter Der Linde" · boundary ``` - A German epithet the parse places in the family name takes the capital too, its article opening the family name there. ``` diff --git a/docs/release_log.rst b/docs/release_log.rst index c08dd6806..6e3bb99bb 100644 --- a/docs/release_log.rst +++ b/docs/release_log.rst @@ -4,7 +4,7 @@ Release Log nameparser 3.2 is under development. - - **Add credentials: BCh, BChir and BMBCh, the Nigerian marks mni, fwc, fsi, fnse, psc and ndc, and the Hong Kong and Singapore honours GBM, GBS, SBS, BBS and BBM.** ``parse("Jane Doe, BCh")`` gives suffix ``BCh``, where 1.4.0 through 3.1.0 gave given ``BCh``, family ``Jane Doe``; the Nigerian marks keep their lower case in ``capitalized()``. Initials written in capitals after a one-word family name and a comma read as the credential they spell (``Bello, MNI``). :issue:`1361`, :issue:`1228`, :issue:`1182` + - **Add credentials: BCh, BChir and BMBCh, the Nigerian marks mni, fwc, fsi, fnse, psc and ndc, and the Hong Kong and Singapore honours GBM, GBS, SBS, BBS and BBM.** ``parse("Jane Doe, BCh")`` gives suffix ``BCh``, where 1.4.0 through 3.1.0 gave given ``BCh``, family ``Jane Doe``. Initials written in capitals after a one-word family name and a comma read as the credential they spell (``Bello, MNI``). :issue:`1361`, :issue:`1228`, :issue:`1182` - **Read aus as a German family-name particle.** ``parse("Karen aus der Fünten")`` gives family ``aus der Fünten``, where 1.4.0 through 3.1.0 gave middle ``aus``, family ``der Fünten``; an Aus written as a middle name before a surname is read into the family too (``Kevin Aus Smith``). :issue:`1284` - **Fix Vanden, the Dutch and Flemish van den written as one word, which read as a middle name.** ``parse("Pieter Vanden Broeck")`` gives family ``Vanden Broeck``, as ``Vander Broeck`` reads, where 1.4.0 through 3.1.0 gave middle ``Vanden``, family ``Broeck``. :issue:`1239` - **Add thirteen military ranks written with a hyphen, such as Vice-Admiral, Air Vice-Marshal and Major-General, as titles.** ``parse("Air Vice-Marshal Ann Reed")`` gives title ``Air Vice-Marshal``, given ``Ann``, where 3.1.0 gave given ``Air``, middle ``Vice-Marshal Ann`` and 1.4.0 title ``Air``, first ``Vice-Marshal``. A hyphenated rank not listed, such as Squadron-Leader, still reads as a name word. :issue:`966` diff --git a/nameparser/vocab/en.toml b/nameparser/vocab/en.toml index f07dfa935..a5a424259 100644 --- a/nameparser/vocab/en.toml +++ b/nameparser/vocab/en.toml @@ -5137,7 +5137,7 @@ credential = { expands = "Marriage and Family Therapist", note = "NPPES 13,618 U [[word]] text = "mh" -excluded = { credential = { reason = "MH, the Hong Kong Medal for Honour (18 of the 236 distinct names on LegCo precedence lists 1998-2020), is written mostly as initials: listed with sc it moved 324 local-corpus names, most of them wrong (M.H. and paired initials losing the family, 2026-11-20); MH before JP already reads as the credential run (rules/C5, #1392), and a lone trailing MH after a comma stays the given name", issue = 1182, decided = 2026-11-20 } } +excluded = { credential = { reason = "MH, the Hong Kong Medal for Honour (18 of the 236 distinct names on LegCo precedence lists 1998-2020), is written mostly as initials: listed with sc it moved 324 local-corpus names, most of them wrong (M.H. and paired initials losing the family, 2026-11-20); after a comma MH before JP already reads as the credential run (rules/C5, #1392); a lone trailing MH after a comma stays the given name, and with no comma MH JP reads MH as the family (Hon WONG Kwok-kin MH JP), costs accepted with the decline", issue = 1182, decided = 2026-11-20 } } [[word]] text = "mhpp" @@ -5221,7 +5221,7 @@ credential = {} [[word]] text = "mni" -credential = { cased = "mni", expands = "Member, National Institute for Policy and Strategic Studies (Nigeria)", note = "written in lower case after a comma, 14 of 14 times in the 2022 Nigerian national honours list (2026-11-08); ORCID 3 records (M.N.I., MNI, mni) and Nepal 1 Mni; no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer. Glued capitals initials after a one-word family and a comma (Bello, MNI) read as the credential, none in the corpora (2026-11-20)", issue = 1228 } +credential = { cased = "mni", expands = "Member, National Institute for Policy and Strategic Studies (Nigeria)", note = "written in lower case after a comma, 14 of 14 times in the 2022 Nigerian national honours list (2026-11-08); ORCID 3 records (M.N.I., MNI, mni), 2 of them in a Nigerian family box, and Nepal 1 Mni, a name the lower-case mask repairs to mni; no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer. Glued capitals initials after a one-word family and a comma (Bello, MNI) read as the credential, none in the corpora (2026-11-20)", issue = 1228 } [[word]] text = "moid" @@ -5904,7 +5904,7 @@ credential = { expands = "Silver Bauhinia Star (Hong Kong)", note = "43 of the 2 [[word]] text = "sc" -excluded = { credential = { reason = "SC, Hong Kong's Senior Counsel (4 of the 236 distinct names on LegCo precedence lists 1998-2020), is the Sc of a split M. Sc. (94 names) and capitals initials (FEC's DOYLE, SC shape): listed with mh it moved 324 local-corpus names, most of them wrong (2026-11-20); SC before JP already reads as the credential run (rules/C5, #1392)", issue = 1182, decided = 2026-11-20 } } +excluded = { credential = { reason = "SC, Hong Kong's Senior Counsel (4 of the 236 distinct names on LegCo precedence lists 1998-2020), is the Sc of a split M. Sc. (94 names) and capitals initials (FEC's DOYLE, SC shape): listed with mh it moved 324 local-corpus names, most of them wrong (2026-11-20); after a comma SC before JP already reads as the credential run (rules/C5, #1392); with no comma SC JP reads SC as the family, a cost accepted with the decline", issue = 1182, decided = 2026-11-20 } } [[word]] text = "sccp" diff --git a/tests/v2/cases.py b/tests/v2/cases.py index 73c29fda2..637b34ada 100644 --- a/tests/v2/cases.py +++ b/tests/v2/cases.py @@ -1580,7 +1580,7 @@ def _check_cjk_shape_purity(self) -> None: Case("mb_bch_still_reads_as_one_suffix_run", "Jane Doe MB BCh, PhD", {"given": "Jane", "family": "Doe", "suffix": "MB BCh, PhD"}, classification="fix(#752)", - notes="boundary, S12's since 3.0.0 (1.4.0 read middle 'Doe MB', " + notes="boundary, S12's since 2.6.0 (1.4.0 read middle 'Doe MB', " "family 'BCh'): with bch listed, the split pair is a run of " "two listed credentials, where chb's listing broke " "MB ChB, PhD (decisions/S12, 2026-11-20 #1361)"), @@ -1612,8 +1612,8 @@ def _check_cjk_shape_purity(self) -> None: {"title": "Dr.", "given": "Ahmed", "middle": "Abubakar", "family": "Audi", "suffix": "mni"}, classification="fix(#1228)", - notes="read given 'mni', family 'Ahmed Abubakar Audi' 1.4.0 " - "through 3.1"), + notes="read given 'mni', family 'Ahmed Abubakar Audi' 2.8.2 and " + "3.1, and family 'Dr. Ahmed Abubakar Audi', no title, 1.4.0"), Case("capitals_initials_after_one_word_and_a_comma_read_the_credential", "Bello, MNI", {"family": "Bello", "suffix": "MNI"}, @@ -6969,13 +6969,21 @@ def _check_cjk_shape_purity(self) -> None: "in its own part does ('Jane Doe, BM PhD'). 1.4.0 through " "3.0.1 read given 'MH', family 'Jane Mary Doe'"), Case("two_caps_alone_before_an_unlisted_part_and_a_listed_credential", - "Jane Doe, BM, BCh, PhD", - {"given": "Jane", "family": "Doe", "suffix": "BM, BCh, PhD"}, + "Jane Doe, BM, Xq, PhD", + {"given": "Jane", "family": "Doe", "suffix": "BM, Xq, PhD"}, classification="fix(#1392)", ambiguities=("comma-structure", "suffix-or-name"), notes="rules/C5 (#1392): any later part answers, not only the " - "next; 'BCh' is unlisted and keeps rules/C2's flag. 1.4.0 " - "through 3.0.1 read given 'BM', family 'Jane Doe'"), + "next; 'Xq' is unlisted and keeps rules/C2's flag (the row " + "wrote 'BCh' until #1361 listed it)"), + Case("two_caps_alone_before_two_listed_credentials", + "Jane Doe, BM, BCh, PhD", + {"given": "Jane", "family": "Doe", "suffix": "BM, BCh, PhD"}, + classification="fix(#1392)", + ambiguities=("suffix-or-name",), + notes="rules/C5 (#1392), every later part listed since #1361, so " + "no rules/C2 flag; 1.4.0 through 3.0.1 read given 'BM', " + "family 'Jane Doe'"), Case("two_caps_alone_before_a_generation_and_a_listed_credential", "Jane Doe, MH, Jr., PhD", {"given": "Jane", "family": "Doe", "suffix": "MH, Jr., PhD"}, diff --git a/tests/v2/test_cases.py b/tests/v2/test_cases.py index 3e703f0ba..d45d1d555 100644 --- a/tests/v2/test_cases.py +++ b/tests/v2/test_cases.py @@ -519,9 +519,12 @@ def test_the_field_sweep_sees_the_claims_it_checks() -> None: # Smith @ JJ Jr. née') under three orders; 2238 -> 2242 the same day, # #1239's 'Broeck, Pieter Vanden' under three orders and 'Vanden # Broeck Pieter' under its declared policy, each reporting - # particle-or-given. - assert claims == 2242, ( - f"the field sweep checks {claims} claims, recorded as 2242 on " + # particle-or-given; 2242 -> 2257 the same day, #1361's, #1284's + # and #1392's rows under three orders (the bchir rows' suffix-or-name + # and given-or-family, 'Aus Rahman's particle-or-given, and the two + # 'Jane Doe, BM, ...' rows). + assert claims == 2257, ( + f"the field sweep checks {claims} claims, recorded as 2257 on " f"2026-11-20") @@ -1012,8 +1015,9 @@ def test_the_alternative_sweep_sees_the_fields_it_checks() -> None: # day, from its fix review's three suffix-or-name rows; 500 -> 509 # the same day, its second fix review's two rows, their reports all # skipped; 614 -> 617 the same day, #1239's 'Broeck, Pieter Vanden' - # under three orders - assert (checked, skipped) == (617, 509), (checked, skipped) + # under three orders; 617 -> 620 and 509 -> 512 the same day, #1361's + # and #1284's rows under three orders + assert (checked, skipped) == (620, 512), (checked, skipped) def test_every_case_name_is_unique() -> None: diff --git a/tests/v2/test_render.py b/tests/v2/test_render.py index f95e31e45..887b91a97 100644 --- a/tests/v2/test_render.py +++ b/tests/v2/test_render.py @@ -1117,7 +1117,7 @@ def test_a_ter_or_der_opening_the_family_name_takes_a_capital() -> None: # a der behind an unlisted word, a German epithet ("GERARD TER BORCH", "Gerard Ter Borch"), ("JA DER LIANG", "Ja Der Liang"), - ("KAREN AUS DER FÜNTEN", "Karen Aus Der Fünten"), + ("HANS UNTER DER LINDE", "Hans Unter Der Linde"), ("ALEXANDRE DUMAS DER ÄLTERE", "Alexandre Dumas Der Ältere"), ("JOHANN DER JÜNGERE", "Johann Der Jüngere"), # a particle right before the family counts whatever its diff --git a/tools/differential/corpus_rules.jsonl b/tools/differential/corpus_rules.jsonl index 6e43cfa7a..63edcc2e9 100644 --- a/tools/differential/corpus_rules.jsonl +++ b/tools/differential/corpus_rules.jsonl @@ -486,6 +486,7 @@ "Guy Andre Junior Francois" "Gyani Zail Singh" "Gülcan B.TURAN" +"HANS UNTER DER LINDE" "Haddad, Nadia Abd Karim" "Hans Meier Priv.-Doz." "Hans „Erster“ und “Zweiter” Müller" @@ -504,7 +505,7 @@ "His Excellency Lord Duncan" "His Grace John Smith" "His Majesty King Charles" -"Hon CHAN Kin-por GBS JP" +"Hon CHAN Kin-por MH JP" "Hon CHAN Kin-por, GBS, JP" "Hon. U.K. Ambassador Jane Smith" "Hon. U.S. Grant" @@ -1192,7 +1193,6 @@ "Justin (MD.) Stearns" "Justin (R.N.) Stearns" "K.T. Smith" -"KAREN AUS DER FÜNTEN" "KIM, AE-RA" "KIM, MA-AE" "Karim AL Haddadi" diff --git a/tools/differential/snapshot.jsonl b/tools/differential/snapshot.jsonl index ac77ec364..ab282d6f9 100644 --- a/tools/differential/snapshot.jsonl +++ b/tools/differential/snapshot.jsonl @@ -1455,6 +1455,7 @@ {"name": "Gössmann, Elisabeth", "given": "Elisabeth", "family": "Gössmann", "initials": "E. G."} {"name": "Gülcan B.TURAN", "given": "Gülcan", "middle": "B.", "family": "TURAN", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: credential as suffix (shape)"], "initials": "G. B. T.", "capitalized_force": "Gülcan B.Turan"} {"name": "H. Budi Santoso", "given": "H.", "middle": "Budi", "family": "Santoso", "initials": "H. B. S."} +{"name": "HANS UNTER DER LINDE", "given": "HANS", "middle": "UNTER", "family": "DER LINDE", "initials": "H. U. L.", "capitalized": "Hans Unter Der Linde"} {"name": "Habib Pacha es-Saad", "given": "Habib", "middle": "Pacha", "family": "es-Saad", "initials": "H. P. e.", "capitalized_force": "Habib Pacha Es-Saad"} {"name": "Haddad, Nadia Abd Karim", "given": "Nadia", "middle": "Abd Karim", "family": "Haddad", "initials": "N. A. K. H."} {"name": "Hafis al-Assad", "given": "Hafis", "family": "al-Assad", "initials": "H. a.", "capitalized_force": "Hafis Al-Assad"} @@ -1545,7 +1546,7 @@ {"name": "His Majesty King Charles", "title": "His Majesty King", "given": "Charles", "initials": "C."} {"name": "Hisham Ibrahim, CPA, CFA", "given": "Hisham", "family": "Ibrahim", "suffix": "CPA, CFA", "initials": "H. I."} {"name": "Hodan Farah Warsame", "given": "Hodan", "middle": "Farah", "family": "Warsame", "initials": "H. F. W."} -{"name": "Hon CHAN Kin-por GBS JP", "title": "Hon", "given": "CHAN", "family": "Kin-por", "suffix": "GBS JP", "initials": "C. K.", "capitalized_force": "Hon Chan Kin-Por GBS JP"} +{"name": "Hon CHAN Kin-por MH JP", "title": "Hon", "given": "CHAN", "middle": "Kin-por", "family": "MH", "suffix": "JP", "initials": "C. K. M.", "capitalized_force": "Hon Chan Kin-Por Mh JP"} {"name": "Hon CHAN Kin-por, GBS, JP", "title": "Hon", "given": "CHAN", "family": "Kin-por", "suffix": "GBS, JP", "initials": "C. K.", "capitalized_force": "Hon Chan Kin-Por, GBS, JP"} {"name": "Hon Solo", "title": "Hon", "family": "Solo", "initials": "S."} {"name": "Hon. Barrington P. Doe-Ray, Jr.", "title": "Hon.", "given": "Barrington", "middle": "P.", "family": "Doe-Ray", "suffix": "Jr.", "initials": "B. P. D.", "generation": "Jr."} @@ -2710,7 +2711,6 @@ {"name": "K.T. Smith", "given": "K.", "middle": "T.", "family": "Smith", "initials": "K. T. S."} {"name": "KALAM Alɛ Mustafa", "order": "FAMILY_FIRST", "given": "Alɛ", "middle": "Mustafa", "family": "KALAM", "initials": "A. M. K.", "capitalized_force": "Kalam Alɛ Mustafa"} {"name": "KANSULO Iiɖa", "order": "FAMILY_FIRST", "given": "Iiɖa", "family": "KANSULO", "initials": "I. K.", "capitalized_force": "Kansulo Iiɖa"} -{"name": "KAREN AUS DER FÜNTEN", "given": "KAREN", "family": "AUS DER FÜNTEN", "initials": "K. F.", "capitalized": "Karen aus der Fünten"} {"name": "KIM, AE-RA", "family": "KIM", "suffix": "AE-RA", "initials": "K.", "capitalized": "Kim, AE-RA"} {"name": "KIM, MA-AE", "family": "KIM", "suffix": "MA-AE", "initials": "K.", "capitalized": "Kim, MA-AE"} {"name": "Kajal Patel Hiring Globally", "given": "Kajal", "middle": "Patel Hiring", "family": "Globally", "initials": "K. P. H. G."} From 3613d20c6958ceaa6a93347cbc3ac997c1b4c8f3 Mon Sep 17 00:00:00 2001 From: Derek Gulbranson Date: Fri, 20 Nov 2026 19:45:36 -0800 Subject: [PATCH 4/5] Widen the accepted costs to what the parse does, and fix a recipe The second review of the fix commit: decisions/R12's Standing line takes unter der; the aus Standing line and entry name every shape it reaches (after the head, the comma part, its FAMILY_FIRST writing, case repair); the credentials' cost names a word that is also a name wherever it reads as the credential (Gurung, Mni Ram; Ram Bahadur Mni); the aus recipe removes the given reading, a buildable lexicon; Jane Doe BChir's report is new, not master's. Co-Authored-By: Claude Opus 5.5 --- .../R12-particle-opening-the-family-name-with-a-capital.md | 2 +- docs/design/decisions/suffix-acronym-collisions.md | 6 +++--- docs/design/decisions/vocabulary-collisions.md | 6 +++--- docs/release_log.rst | 2 +- nameparser/vocab/en.toml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/design/decisions/R12-particle-opening-the-family-name-with-a-capital.md b/docs/design/decisions/R12-particle-opening-the-family-name-with-a-capital.md index 4da63a356..df2976d70 100644 --- a/docs/design/decisions/R12-particle-opening-the-family-name-with-a-capital.md +++ b/docs/design/decisions/R12-particle-opening-the-family-name-with-a-capital.md @@ -2,7 +2,7 @@ ## Standing -- A family word whose particle reading is written `capital_opening` (`ter` in nl.toml, `der` in de.toml and nl.toml, compiled into the private `CAPITAL_OPENING_PARTICLES`) is written with a capital where the word before it in the family name, in the order the family view joins its words, is no particle by its tag or by its last hyphen part, where it opens the family name the word written right before it counting whatever its role and a last middle word ending in a particle part counting too (`LEVON TER PETROSYAN` → 'Levon Ter Petrosyan', `ARMEN DER KIUREGHIAN` → 'Armen Der Kiureghian'), and keeps its lowercase after one (`JAN VAN DER BERG` → 'Jan van der Berg', `DER BERG, JAN VAN` → 'Jan van der Berg', `ANKE MAITLAND-VAN DER ZEE` → 'Anke Maitland-van der Zee', `VAN DER WALT` → 'Van der Walt'); a middle `ter` keeps its lowercase (`JAN TER HORST VAN DER BERG` → 'Jan ter Horst van der Berg'); the costs are a Dutch surname opened by `ter` (`GERARD TER BORCH` → 'Gerard Ter Borch'), a German `der` behind an unlisted word (`KAREN AUS DER FÜNTEN` → 'Karen Aus Der Fünten') and a German epithet (`JOHANN DER JÜNGERE` → 'Johann Der Jüngere') — 2026-11-09 #1224, DECIDED. +- A family word whose particle reading is written `capital_opening` (`ter` in nl.toml, `der` in de.toml and nl.toml, compiled into the private `CAPITAL_OPENING_PARTICLES`) is written with a capital where the word before it in the family name, in the order the family view joins its words, is no particle by its tag or by its last hyphen part, where it opens the family name the word written right before it counting whatever its role and a last middle word ending in a particle part counting too (`LEVON TER PETROSYAN` → 'Levon Ter Petrosyan', `ARMEN DER KIUREGHIAN` → 'Armen Der Kiureghian'), and keeps its lowercase after one (`JAN VAN DER BERG` → 'Jan van der Berg', `DER BERG, JAN VAN` → 'Jan van der Berg', `ANKE MAITLAND-VAN DER ZEE` → 'Anke Maitland-van der Zee', `VAN DER WALT` → 'Van der Walt'); a middle `ter` keeps its lowercase (`JAN TER HORST VAN DER BERG` → 'Jan ter Horst van der Berg'); the costs are a Dutch surname opened by `ter` (`GERARD TER BORCH` → 'Gerard Ter Borch'), a German `der` behind an unlisted word (`HANS UNTER DER LINDE` → 'Hans Unter Der Linde'; `aus` listed since 2026-11-20 #1284) and a German epithet (`JOHANN DER JÜNGERE` → 'Johann Der Jüngere') — 2026-11-09 #1224, DECIDED. Elsewhere: a particle opening a hyphenated word and the question this rule answers, decisions/R4's 2026-11-08 #1224 entry; how a particle is written otherwise, decisions/R4. diff --git a/docs/design/decisions/suffix-acronym-collisions.md b/docs/design/decisions/suffix-acronym-collisions.md index cf24b0831..cfe80d76a 100644 --- a/docs/design/decisions/suffix-acronym-collisions.md +++ b/docs/design/decisions/suffix-acronym-collisions.md @@ -35,7 +35,7 @@ Not standing: the #454 bullet's note that the `fix(suffix-routing)` ledger rule Elsewhere: since phase 2a the ambiguous marking above is derived from a word's name reading rather than written as a flag, and no membership above moved — decisions/vocabulary-model's 2026-10-25 #752 — A CLASH WITH A NAME IS A NAME READING entry (phase 2a). -- The Nigerian marks `mni`, `fwc`, `fsi`, `fnse`, `psc` and `ndc`, repaired in lower case, and the honours `gbm`, `gbs`, `sbs`, `bbs` and `bbm` are credentials; initials glued after a one-word family and a comma that spell one read as it (`Bello, MNI`) — 2026-11-20 #1361. +- The Nigerian marks `mni`, `fwc`, `fsi`, `fnse`, `psc` and `ndc`, repaired in lower case, and the honours `gbm`, `gbs`, `sbs`, `bbs` and `bbm` are credentials; a word spelling one after a one-word family and a comma reads as it, in capitals or Title case (`Bello, MNI`, `Gurung, Mni`), and so does one opening the given part there or ending a name — 2026-11-20 #1361. - `bchir` is marked ambiguous by its family reading, the surname Bchir, with no case mask; `mh` and `sc` are out, their clash being with initials; `san` waits for a Nigerian English choice of language — 2026-11-20 #1361. Open: #1053, carried over from #965 (telling the credential `FREng`, written in mixed case, from the surname `Freng`; a case reading of S6's, held in decisions/S6). @@ -96,10 +96,10 @@ Open: #1053, carried over from #965 (telling the credential `FREng`, written in - **2026-11-10 (#1315) — the Royal Colleges' fellowships and memberships, a batch.** `John Smith FRCS` gave middle 'Smith', family 'FRCS', as did `Tanaka Hiroshi FRCS` under a family-first base (so #1310's group suggester voted given-first on it), and `Smith, John MRCP` gave middle 'MRCP': C6's caps shape needs a comma or a word the listing holds, and only `FACS` and `FACP` of the family were listed. 34 words listed (`en.toml`, `uv run python tools/vocab/query.py --issue 1315`): the Colleges of Surgeons, Physicians, Radiologists, Obstetricians and Gynaecologists, Ophthalmologists, Pathologists, Psychiatrists, Emergency Medicine, General Practitioners, Anaesthetists and Paediatrics, the Veterinary Surgeons (`mrcvs`), and the Canadian and Australasian royal colleges (`frcsc`, `frcpc`, `fracs`, `fracp`). **Vetted** by `tools/name_usage.py` and the local corpora: none has a Census 2010, SSA, nam_dict or Wikidata bearer, and none sits where a surname would in any local corpus (ctgov-officials, orcid-researchers, govuk-people, psc-individuals and fec-individuals hold them, all as credential runs; tse-donors, where #993 found `cota`, holds none), so none is marked ambiguous. The #993 screens were run over all 34 in lower, Title and upper case: `Jane Doe X`, `Jane Doe, X`, `JANE DOE, X`, `jane doe, x`, `Doe, Jane X`, `Jane Doe X, PhD`, and the capitals shapes with a word to spare and no comma (`JANE ANN DOE X`), and every one read the word as the suffix with no report. Each note records NPPES's count and ClinicalTrials.gov's after a comma (data 2026-10-21); `frcpglas`, `frcvs` and `frcsglasg` were left out as unwritten in every corpus, and `fasn`, `facg` and `fcps` (699 officials, Pakistan's College of Physicians and Surgeons) as not Royal College words, each worth a batch of its own. Six mixed-case ones carry a `cased` mask (`FRCPath`, `FRCOphth`, `FRCPsych`, `MRCPsych`, `FRCSEd`, `MRCSEd`). **Measured** over the committed corpora, the snapshot moved two names and none of the seven role fields: `Alex Green, FRCS (SN)` and `Andrew Wilson, MRCP (UK)` lost their `suffix-or-name` report, a listed word needing no fork. **Measured over the local corpora against master** (`tools/differential/measure.py`, 2026-11-10): ClinicalTrials.gov's officials moved 5,508 entries, 241 of them a role field; 225 of those put a listed word in the suffix where the base had it in the given, family, middle or title (`Troy Puar, MRCP UK` was given `MRCP`), and 16 went from right to wrong: 13 runs opening with `BM`, 2 with `MA BM` and 1 with `AO` after a comma (`Keith Godfrey, BM PhD FRCP`, given `BM` now). The cause was there before: `Keith Godfrey, BM PhD` and `..., BM PhD FACS` read given `BM` on master, and the unlisted `FRCP` ending the run kept it a suffix by accident, which listing it removes. Accepted as a cost of listing, and filed apart as the bug it is (#1323). **Declined: listing `bm` (Bachelor of Medicine) to remove it** (2026-11-10): it has no Census, SSA or Wikidata bearer, but an acronym is matched with every full stop removed, so it lists `B.M.` too, which Nepal's candidates write as surname initials (rules/S3's paired-initials Except, #864). Measured against master it fixed 15 ClinicalTrials.gov runs, 2 FEC names and `Whinnett, BM.BS`, and moved 6 Nepal candidates (`Chacra Bahadur B.M.`, family `B.M.` to a suffix) and 5 ORCID names where `BM` is a family-name initial (`Avinash BM`) to a suffix with the family name gone, the worse direction; the fix belongs in how a part opening with an unlisted two-capital word is read, not in the vocabulary. `ao` was left out for its own reason: a Census 2010 family reading (524) and an SSA given one (18), so it needs the ambiguous marking, and it moved 1 name. FEC, GOV.UK, ORCID and Companies House moved 1, 8, 16 and 3 entries, by the same readings, and tse-donors (where `cota` was found) and the other corpora moved none (opensanctions-parliaments could not be measured, its cached copy being stale); the committed snapshot, CLDR and GND records moved only the two reports above. A test that used `FRCS` as its example of an unlisted capitals credential (`tests/v2/pipeline/test_comma.py`) now uses `XYZW`, a word no listing will take. **Recompute**: `git diff origin/master...HEAD -- tools/differential/snapshot.jsonl` on the branch for the two moves (`snapshot.py --since v3.0.1` lists every move of the cycle, 325 entries on 2026-11-10, not this change's); the old readings are 1.4.0's too (`HumanName("John Smith FRCS")` gives last 'FRCS'). - **2026-11-19 (#1467) — `ud` LEAVES THE CREDENTIALS; `bt` STAYS.** Decided on the issue (its 2026-11-19 decision comment). `ud` came with the bulk list and is the Urdu and Arabic connective of a compound name (`Zia ud Din`). Counted over the distinct names of eight local corpora (ctgov-officials, ctgov-contacts, govuk-people, ukec-individuals, psc-individuals, fec-individuals, orcid-researchers, my-candidates), the words split at spaces with commas and full stops removed, as the vocabulary matches an acronym, 2026-11-19: `ud` stands between name words in 121 and ends a name in 7 (4 after a comma, 3 with none), and `bt` stands between name words in 35 and ends a name in 16 (7 after a comma, 9 with none), by position alone, so the 35 hold baronets with more post-nominals behind (`Bt, FRICS`) and the 16 surname-first initials (`B.T.`) among them (the decision comment's 127 and 34 counted records rather than distinct names, and its 7 and 11 another split). In lower case, in capitals within a mixed-case name, or in a name of one case, the credential reading started a run that took the rest of the name (`NADIR ZIA UD DIN` → family 'ZIA', suffix 'UD DIN', 2.4.0 through 3.1.0; 1.4.0 through 2.3.0 read middle 'ZIA UD', family 'DIN', which the change restores). The reading is removed with an `excluded` entry in en.toml carrying the counts. **The 7 names ending in it** write no credential: four are initials written `U.D`, the full stops being what the vocabulary's match removes: three ORCID holders' with no comma, now read as the family, as an unlisted pair of initials ending a name is, and an FEC donor's after a comma, read as initials before and after; one is the compound written surname first (FEC, now middle 'UD' where it read suffix 'UD'); and two are one Dutch study chair in two ClinicalTrials.gov records writing the rank universitair docent after the name and a comma, which now reads as an unlisted pair of capitals there does, initials run together: given 'UD', the name before the comma the family (written here with an invented name, `Anke Vissering, UD`), the accepted cost. Written with its full stops after a comma it reads as initials too (`Anke Vissering, U.D.` → given 'U.', middle 'D.'), and with a final full stop as a title by rules/H2's shape (`UD.`), as any unlisted word of that shape does. **`bt` is not changed**: a name reading beside the credential reads `Nur Aina bt Rosli` with family 'Rosli' and `Sir John Smith Bt` with family 'Bt', and the counts are too few to choose by; docs/customize.rst gives the recipe for a caller with Malay names (`Lexicon.default().remove("bt", kind="credential")`) and its cost on a baronet. The compound itself is not joined: `X ul/ur/ud Y` reads family 'Y'. **Measured** (`tools/differential/measure.py --base` against master 12b568f8): ctgov-officials and ctgov-contacts 1 entry each (the Dutch chair), fec-individuals 2, jrc-names 8, orcid-researchers 12, opensanctions-parliaments 1, patentsview-inventors 1; every other local corpus, the committed snapshot and the CLDR and GND records none. Scored against the filed boxes, orcid-researchers 3 records agree that did not (a Bangladeshi name holding `ud` in the given box and two Sri Lankan ones ending in `U.D`) and 6 no longer do, Pakistani holders who filed the whole compound in the family box (`ud Din` and the word before it), which the run's suffix had matched where the unjoined compound does not, with 2 more changing between two disagreements; patentsview-inventors 1 Hungarian record no longer agrees. Pinned by the `ud_inside_a_compound_name_in_capitals_is_a_name_word`, `ud_in_lower_case_inside_a_compound_name_is_a_name_word`, `ud_after_a_full_name_and_a_comma_reads_as_initials` and `bt_in_lower_case_before_the_last_word_stays_the_credential` case rows. - **2026-11-20 (#1361, #1228, #1182) — ELEVEN CREDENTIALS ARE LISTED, `BCHIR` IS MARKED AMBIGUOUS, `MH` AND `SC` ARE DECLINED AND `SAN` IS DEFERRED.** Decided 2026-11-20. - - **`bchir`** (B.Chir, Bachelor of Surgery; written so with no comma it stays a name word, `Jane Doe BChir` → family 'BChir', reported, as master read it) is listed with a `family` reading, the Tunisian surname Bchir (ORCID 2 family boxes, PSC 1, Wikidata 2, each in Title case and none after a comma), so it is marked ambiguous, the `ba` shape: after a comma it is the credential, reported (`Jane Doe, BChir`); ending a name in Title case the family (`Amani Bchir`, reported). It carries no case mask, which would repair the surname to `BChir`, so `capitalized(force=True)` writes the credential `BCHIR`. Accepted: a surname written `BCHIR` in capitals ending a name of mixed case reads as the credential (`Amani BCHIR` → suffix 'BCHIR', reporting `given-or-family`), rules/S6's capitals reading; no corpus name writes it so. decisions/S12's entry of this date lists `bch` and `bmbch`. + - **`bchir`** (B.Chir, Bachelor of Surgery; written so with no comma it stays a name word, `Jane Doe BChir` → family 'BChir' as master read it, now reported) is listed with a `family` reading, the Tunisian surname Bchir (ORCID 2 family boxes, PSC 1, Wikidata 2, each in Title case and none after a comma), so it is marked ambiguous, the `ba` shape: after a comma it is the credential, reported (`Jane Doe, BChir`); ending a name in Title case the family (`Amani Bchir`, reported). It carries no case mask, which would repair the surname to `BChir`, so `capitalized(force=True)` writes the credential `BCHIR`. Accepted: a surname written `BCHIR` in capitals ending a name of mixed case reads as the credential (`Amani BCHIR` → suffix 'BCHIR', reporting `given-or-family`), rules/S6's capitals reading; no corpus name writes it so. decisions/S12's entry of this date lists `bch` and `bmbch`. - **The Nigerian marks** `mni`, `fwc`, `fsi`, `fnse`, `psc` and `ndc` are listed with lower-case masks, being written in lower case: case repair keeps them so in a name of mixed case or one written in capitals (`JANE DOE, MNI` → `Jane Doe, mni`), and `capitalized(force=True)` writes them lower case too (`Jane Doe, MNI` → `Jane Doe, mni`; `Maj Gen John Smith CB psc` keeps `psc`). - **The Hong Kong and Singapore honours** `gbm`, `gbs`, `sbs`, `bbs` and `bbm` are listed, written in capitals, with no mask. Without a comma they read as the credential now (`Hon WONG Kwok-kin GBS JP` → suffix 'GBS JP'); after a comma they already did (rules/C6), and `MH, JP` already reads the run (rules/C5, #1392). The capitals family name `WONG` is `capitals_as_family`'s to read (rules/O9), and `Policy(unlisted_caps_suffixes=CapsSuffixes.EVERYWHERE)` already read the comma-less rows. - - **Accepted for both batches:** initials glued in capitals after a one-word family and a comma that spell a listed credential read as the credential, the given name lost (`Bello, MNI`, `Chan, GBS`), as `Smith, MD` reads, a credential opening the part after a family comma making it the postnominal part (rules/C13); none in the corpora. The lower-case masks apply in every role, so a word written so as a name is repaired in lower case (`RAM MNI GURUNG` → `Ram mni Gurung`; Nepal's candidates hold one `Mni`, PSC's filers four `Psc`), and a Title-case word after a one-word family and a comma reads as the credential too (`Gurung, Mni` → family 'Gurung', suffix 'Mni'). + - **Accepted for both batches:** initials glued in capitals after a one-word family and a comma that spell a listed credential read as the credential, the given name lost (`Bello, MNI`, `Chan, GBS`), as `Smith, MD` reads, a credential opening the part after a family comma making it the postnominal part (rules/C13); none in the corpora. The lower-case masks apply in every role, so a word written so as a name is repaired in lower case (`RAM MNI GURUNG` → `Ram mni Gurung`; Nepal's candidates hold one `Mni`, PSC's filers four `Psc`), and a word that is also a name reads as the credential wherever an unambiguous one does: in Title case after a one-word family and a comma (`Gurung, Mni` → family 'Gurung', suffix 'Mni'), opening the given part there, which C13 then reads whole as postnominal (`Gurung, Mni Ram` → suffix 'Mni Ram', reported `suffix-or-name`), and ending a name with no comma (`Ram Bahadur Mni` → family 'Bahadur', suffix 'Mni', unreported; `John Psc` → suffix 'Psc', reported `given-or-family`). The bearers are few, and none of them was marked ambiguous for it, a `given` or `family` reading with counts being what would gate a word (the `ba` shape). - **Declined: `mh` and `sc`.** Listed, the two moved 324 local-corpus names, most of them wrong: the `Sc` of a split `M. Sc.` (94), capitals initials after a comma (FEC's `DOYLE, SC` shape) losing the given name, and paired initials inside a name (`M.H.`) losing the family. After a comma with `JP` behind them they read as the credential run already (rules/C5, #1392). Accepted with the decline: a lone trailing `, MH` or `, SC` stays the given name, and with no comma each reads as the family (`Hon WONG Kwok-kin MH JP` → family 'MH', suffix 'JP'), as 18 MH and 4 SC names of the LegCo lists are written. Neither has a name reading to mark it ambiguous by, its clash being with initials. Each carries an `excluded` entry in en.toml. - **Deferred: `san`** (Senior Advocate of Nigeria), the given name San and es, it and fil's saint particle. As a default credential it cost 17 family names written in capitals (TSE's `ALCEU A SAN` shape) and added 143 reports; it waits for a Nigerian English choice of language, where it would be a `default = false` reading. en.toml records the exclusion; #1228 stays open for it. - **Measured** 2026-11-20 against a checkout of master `0d8c6fa8`: `snapshot.py --local SOURCE --base` on ctgov-officials (322 entries move, decisions/S12's entry, none emptying a field), govuk-people (1, a report) and fec-individuals (2); `local_agreement.py --base` on orcid-researchers (2 records fixed, 0 broken: an `, mni` and an `aus der`) and psc-individuals (1 fixed, a surname box ending `Gbm`, and 1 company name changed); the committed snapshot, the Hong Kong lines and `Jane Doe, BM, BCh, PhD`. The `mh`/`sc` and `san` figures are the triage's of the same day. Recompute: those commands with `--base `; for the declined and deferred words, `config_diff.py diff default` against an `expr:` lexicon adding them as credentials, `--local all --match` over the words; the bearer counts are on the words (`tools/vocab/query.py --word bchir`, `tools/name_usage.py mni --boxes`). diff --git a/docs/design/decisions/vocabulary-collisions.md b/docs/design/decisions/vocabulary-collisions.md index ab140a8b7..596e4350b 100644 --- a/docs/design/decisions/vocabulary-collisions.md +++ b/docs/design/decisions/vocabulary-collisions.md @@ -31,7 +31,7 @@ Elsewhere: C-i reaches the titles through a `given` reading, which makes a title - `oude` (nl.toml) is a particle on by default, of the generic kind `particle`, no kind naming an adjective, that may be given (nam_dict's rare Dutch given name), with its case mask `Oude`: it passes rule 2 of the 2026-11-12 #1257 entry — 2026-11-18 #1455. - `ten` (nl.toml) is a preposition written `default = false`, which `locales.NL`, a pack choosing `nl` alone, turns on; it fails rule 2's mid-name test (`Kheng Ten Choo`), and zh.toml declares the Chinese given-name syllable it opens, so a plain Dutch choice keeps a leading `Ten` the given name, reported, and a strict one reads it as the family name — 2026-11-18 #1455. - `u` and `daw` (my.toml) are Burmese salutations written `default = false`, which `locales.MY`, a pack choosing `my` and nothing else, turns on; a list of nothing but Burmese names is read with the strict choice, `parser_for(locales.MY, strict=True)`, which reads Burmese name syllables (`san`, `van`, `pe`, `ei`) as name words by reading no other language's file, and my.toml copies `en.toml`'s readings of the English ranks and `sir` such lists write, `default = false`, so the strict choice keeps them — 2026-11-19 #1483; `ko`, `ma`, `maung` and the ethnic prefixes stay name words, and the military and religious styles stay out; `U.` written with its full stop is read as the title vocabulary reads `U` under the pack, so an initial can be the title (`U. S. Grant` → title 'U.', `Smith, U.` → title 'U.', no given name), which no rule vetoes — 2026-11-19 #1231. -- German `aus` is a particle by default with a `given` reading beside it, keeping `Aus` positional where it opens a name; `Kevin Aus Smith` reading family 'Aus Smith' is the accepted cost — 2026-11-20 #1284. +- German `aus` is a particle by default with a `given` reading beside it, keeping `Aus` positional where it opens a name; the accepted cost is that anywhere after the head it starts the family (`Kevin Aus Smith`, `Rahman, Mohammed Aus`, and under FAMILY_FIRST `Rahman Mohammed Aus`), that case repair writes it lower case, and that a capital `Aus` opening a family-first name is placed like `Van` — 2026-11-20 #1284. ## Log @@ -118,5 +118,5 @@ Elsewhere: C-i reaches the titles through a `given` reading, which makes a title - **`locales.VI` measured under strict, not changed** (its list shipped in 3.0.0, #1112; whether strict replaces it is a later question): `uit-vinames`, scored as `local_agreement.py` scores it, every box agreeing for 21,085 of 21,090 under `parser_for(locales.VI)` (99.98%) and 21,089 under `parser_for(locales.VI, strict=True)` (100.00%), 4 fixed and none broken; `vn-assembly` 499 of 499 under both, no name read differently. On names that are not Vietnamese, `config_diff.py diff plain:VI strict:VI --committed --local ctgov-officials --local ctgov-contacts`: 80,628 of the 660,410 distinct names move, 52,108 in their fields. - **Proposal A** (the pack removing the five credential readings) is dropped: the strict choice reads them. **Proposal B** (`ra` a name by default) is a question about Korean names as much as Burmese ones and stays open on #1483, which this change leaves open. #1232's `Mg` is read as that issue asks under the strict choice; the default and the plain pack still read the military `MG`. - 2026-11-20 #1284 — GERMAN `AUS` IS A PARTICLE BY DEFAULT, WITH A `GIVEN` READING BESIDE IT. Decided 2026-11-20. SUPERSEDES: decisions/R12's 2026-11-09 #1224 entry's accepted `KAREN AUS DER FÜNTEN` → 'Karen Aus Der Fünten', `aus` being listed now. `Karen aus der Fünten` read middle 'aus', family 'der Fünten'; de.toml lists `aus` as a `preposition`, as it lists `auf`. Unlike `auf` it is not written `may_be_given = false`: `Aus` is an Arabic and Indonesian given name (ORCID given boxes 14, PatentsView 5), and as a never-given particle rules/P1's fold read 6 corpus names opening with it whole as the family (`Aus Rahman`-shaped). With the `given` reading the word stays positional at the head, reported `particle-or-given` (`Aus Rahman`), C-i's marking. - - **Accepted:** the given reading protects the head of a name only (`Aus Rahman`, `Dr. Aus Rahman`). Anywhere after it `Aus` starts the family and takes the rest of the name (`Kevin Aus Smith` → family 'Aus Smith'; `Mohammed Aus Khalid Rahman` → family 'Aus Khalid Rahman'), and ending the given part after a family comma it joins the family (`Rahman, Mohammed Aus` → family 'Aus Rahman', reported `particle-or-given`); none of the 24 local-corpus names holding the word takes either shape. Case repair writes the particle lower case, in a name written in capitals (`MOHAMMED AUS RAHMAN` → `Mohammed aus Rahman`; FEC's `J AUS, JENNIFER` → `Jennifer J aus`, the one such name in the corpora, its fields unchanged) and under `force=True` (`Ahmad Aus Ibrahim` → `Ahmad aus Ibrahim`). Under both family-first orders a leading capital `Aus` is placed like `Van` (`Aus der Fünten Karen` → family 'Aus', reported), the lower-case `aus der Fünten Karen` reading right. - - **Measured** 2026-11-20 against a checkout of master `0d8c6fa8`: `local_agreement.py orcid-researchers --base`, 1 record fixed (an `aus der` family box), 0 broken; psc-individuals, none moved by the word; `snapshot.py --local fec-individuals --base`, the case repair above; ctgov-officials, `Karen aus der Fünten, MD, MChiro`-shaped names gaining the family; the committed snapshot, `KAREN AUS DER FÜNTEN` (family 'AUS DER FÜNTEN', repaired `Karen aus der Fünten`), which takes rules/R12's `aus der` example out of its Accepted bullet (`unter der` stands there now). Recompute: those commands with `--base `; the 6 names and the 24 by `config_diff.py diff default` against an `expr:` lexicon adding `aus` as a never-given preposition, `--local all --match` over the word, which lists the names matched and moved; the bearer counts are on the word (`tools/vocab/query.py --word aus`). + - **Accepted:** the given reading protects the head of a name only (`Aus Rahman`, `Dr. Aus Rahman`). Anywhere after it `Aus` starts the family and takes the rest of the name (`Kevin Aus Smith` → family 'Aus Smith'; `Mohammed Aus Khalid Rahman` → family 'Aus Khalid Rahman'), and ending the given part after a family comma it joins the family (`Rahman, Mohammed Aus` → family 'Aus Rahman', reported `particle-or-given`), as it does in that name's family-first writing under FAMILY_FIRST (`Rahman Mohammed Aus` → family 'Aus Rahman', where FAMILY_FIRST_GIVEN_LAST still reads given 'Aus'); none of the 24 local-corpus names holding the word takes either shape. Case repair writes the particle lower case, in a name written in capitals (`MOHAMMED AUS RAHMAN` → `Mohammed aus Rahman`; FEC's `J AUS, JENNIFER` → `Jennifer J aus`, the one such name in the corpora, its fields unchanged) and under `force=True` (`Ahmad Aus Ibrahim` → `Ahmad aus Ibrahim`). Under both family-first orders a leading capital `Aus` is placed like `Van` (`Aus der Fünten Karen` → family 'Aus', reported), the lower-case `aus der Fünten Karen` reading right. + - **Measured** 2026-11-20 against a checkout of master `0d8c6fa8`: `local_agreement.py orcid-researchers --base`, 1 record fixed (an `aus der` family box), 0 broken; psc-individuals, none moved by the word; `snapshot.py --local fec-individuals --base`, the case repair above; ctgov-officials, `Karen aus der Fünten, MD, MChiro`-shaped names gaining the family; the committed snapshot, `KAREN AUS DER FÜNTEN` (family 'AUS DER FÜNTEN', repaired `Karen aus der Fünten`), which takes rules/R12's `aus der` example out of its Accepted bullet (`unter der` stands there now). Recompute: those commands with `--base `; the 6 names and the 24 by `config_diff.py diff default 'expr:Parser(lexicon=Lexicon.default().remove("aus", kind="given"))' --local all --match` over the word, the given reading removed leaving the never-given particle, which lists the names matched and moved; the bearer counts are on the word (`tools/vocab/query.py --word aus`). diff --git a/docs/release_log.rst b/docs/release_log.rst index 6e3bb99bb..650eb8779 100644 --- a/docs/release_log.rst +++ b/docs/release_log.rst @@ -4,7 +4,7 @@ Release Log nameparser 3.2 is under development. - - **Add credentials: BCh, BChir and BMBCh, the Nigerian marks mni, fwc, fsi, fnse, psc and ndc, and the Hong Kong and Singapore honours GBM, GBS, SBS, BBS and BBM.** ``parse("Jane Doe, BCh")`` gives suffix ``BCh``, where 1.4.0 through 3.1.0 gave given ``BCh``, family ``Jane Doe``. Initials written in capitals after a one-word family name and a comma read as the credential they spell (``Bello, MNI``). :issue:`1361`, :issue:`1228`, :issue:`1182` + - **Add credentials: BCh, BChir and BMBCh, the Nigerian marks mni, fwc, fsi, fnse, psc and ndc, and the Hong Kong and Singapore honours GBM, GBS, SBS, BBS and BBM.** ``parse("Jane Doe, BCh")`` gives suffix ``BCh``, where 1.4.0 through 3.1.0 gave given ``BCh``, family ``Jane Doe``. A word spelling one of them after a one-word family name and a comma, or ending a name, reads as the credential (``Bello, MNI``). :issue:`1361`, :issue:`1228`, :issue:`1182` - **Read aus as a German family-name particle.** ``parse("Karen aus der Fünten")`` gives family ``aus der Fünten``, where 1.4.0 through 3.1.0 gave middle ``aus``, family ``der Fünten``; an Aus written as a middle name before a surname is read into the family too (``Kevin Aus Smith``). :issue:`1284` - **Fix Vanden, the Dutch and Flemish van den written as one word, which read as a middle name.** ``parse("Pieter Vanden Broeck")`` gives family ``Vanden Broeck``, as ``Vander Broeck`` reads, where 1.4.0 through 3.1.0 gave middle ``Vanden``, family ``Broeck``. :issue:`1239` - **Add thirteen military ranks written with a hyphen, such as Vice-Admiral, Air Vice-Marshal and Major-General, as titles.** ``parse("Air Vice-Marshal Ann Reed")`` gives title ``Air Vice-Marshal``, given ``Ann``, where 3.1.0 gave given ``Air``, middle ``Vice-Marshal Ann`` and 1.4.0 title ``Air``, first ``Vice-Marshal``. A hyphenated rank not listed, such as Squadron-Leader, still reads as a name word. :issue:`966` diff --git a/nameparser/vocab/en.toml b/nameparser/vocab/en.toml index a5a424259..91d8b508a 100644 --- a/nameparser/vocab/en.toml +++ b/nameparser/vocab/en.toml @@ -5221,7 +5221,7 @@ credential = {} [[word]] text = "mni" -credential = { cased = "mni", expands = "Member, National Institute for Policy and Strategic Studies (Nigeria)", note = "written in lower case after a comma, 14 of 14 times in the 2022 Nigerian national honours list (2026-11-08); ORCID 3 records (M.N.I., MNI, mni), 2 of them in a Nigerian family box, and Nepal 1 Mni, a name the lower-case mask repairs to mni; no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer. Glued capitals initials after a one-word family and a comma (Bello, MNI) read as the credential, none in the corpora (2026-11-20)", issue = 1228 } +credential = { cased = "mni", expands = "Member, National Institute for Policy and Strategic Studies (Nigeria)", note = "written in lower case after a comma, 14 of 14 times in the 2022 Nigerian national honours list (2026-11-08); ORCID 3 records (M.N.I., MNI, mni), 2 of them in a Nigerian family box, and Nepal 1 Mni, a name the lower-case mask repairs to mni and which, ending a name, reads as the credential (Ram Bahadur Mni); no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer. Glued capitals initials after a one-word family and a comma (Bello, MNI) read as the credential, none in the corpora (2026-11-20)", issue = 1228 } [[word]] text = "moid" From 79d43e2d0d70f73925fe45185ff1460be7df03ad Mon Sep 17 00:00:00 2001 From: Derek Gulbranson Date: Fri, 20 Nov 2026 20:13:25 -0800 Subject: [PATCH 5/5] Leave psc without a case mask, the surname Psc being written (#1228) PSC's four filers surnamed Psc make psc a name a lower-case mask would repair in every role, so it repairs as an unmasked credential does; the other five Nigerian marks keep theirs. The decisions entry counts the batch as fourteen credentials, which it is. Co-Authored-By: Claude Opus 5.5 --- docs/design/decisions/suffix-acronym-collisions.md | 8 ++++---- nameparser/config/_compiled.py | 1 - nameparser/config/_index.py | 2 +- nameparser/vocab/en.toml | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/design/decisions/suffix-acronym-collisions.md b/docs/design/decisions/suffix-acronym-collisions.md index cfe80d76a..e40f552fb 100644 --- a/docs/design/decisions/suffix-acronym-collisions.md +++ b/docs/design/decisions/suffix-acronym-collisions.md @@ -35,7 +35,7 @@ Not standing: the #454 bullet's note that the `fix(suffix-routing)` ledger rule Elsewhere: since phase 2a the ambiguous marking above is derived from a word's name reading rather than written as a flag, and no membership above moved — decisions/vocabulary-model's 2026-10-25 #752 — A CLASH WITH A NAME IS A NAME READING entry (phase 2a). -- The Nigerian marks `mni`, `fwc`, `fsi`, `fnse`, `psc` and `ndc`, repaired in lower case, and the honours `gbm`, `gbs`, `sbs`, `bbs` and `bbm` are credentials; a word spelling one after a one-word family and a comma reads as it, in capitals or Title case (`Bello, MNI`, `Gurung, Mni`), and so does one opening the given part there or ending a name — 2026-11-20 #1361. +- The Nigerian marks `mni`, `fwc`, `fsi`, `fnse`, `psc` and `ndc`, all but `psc` repaired in lower case (`psc` being a surname, so unmasked), and the honours `gbm`, `gbs`, `sbs`, `bbs` and `bbm` are credentials; a word spelling one after a one-word family and a comma reads as it, in capitals or Title case (`Bello, MNI`, `Gurung, Mni`), and so does one opening the given part there or ending a name — 2026-11-20 #1361. - `bchir` is marked ambiguous by its family reading, the surname Bchir, with no case mask; `mh` and `sc` are out, their clash being with initials; `san` waits for a Nigerian English choice of language — 2026-11-20 #1361. Open: #1053, carried over from #965 (telling the credential `FREng`, written in mixed case, from the surname `Freng`; a case reading of S6's, held in decisions/S6). @@ -95,11 +95,11 @@ Open: #1053, carried over from #965 (telling the credential `FREng`, written in - **2026-11-09 (#998) — credentials written in two chunks joined at a full stop, a batch.** rules/S3 read an unlisted `B.Pharm` or `M.Kes` by its shape: a suffix with a suffix-or-name report where a word was to spare, a name word where none was (`Ali C.Psych` → family 'C.Psych'), and a title where a chunk is a listed title (`Ayu Pangestu, S.Pd, M.Pd` → title 'S.Pd M.Pd', `pd` being one). The same spellings without stops reversed a comma name (`Anna Gelavis, BPharm` → given 'BPharm'). **Candidates**: the spellings #998's recipe found ending a name in the six local corpora it counted, with second chunks of any length, sorted by hand. Each was put through `tools/vocab/query.py --word` (none had a reading or an exclusion) and `tools/name_usage.py` (counts taken 2026-11-09, recorded in each word's `note`). **Added** (43): 26 in en.toml (`bpharm`, `cpsych`, `mpharm`, `msci`, `mtech`, `dsci`, `mmath`, `moptom`, …), 16 in id.toml (`mkes`, `mkep`, `mkom`, `skom`, `mpd`, `spd`, `mhum`, `mkn`, `msi`, …) and `menf` in pt.toml. All but `msi` have no Census 2010, SSA or Wikidata bearer above each source's floor, and each carries its `cased` mask but `msci` (written MSCI 152 times against MSci 28 by ClinicalTrials.gov officials, so a mask would re-spell the common form) and `msi`. **Marked ambiguous**: `msi`, with a family reading and no mask, Msi being a Xhosa surname. Listed plain, it took the surname from `Andiswa Zanele Msi` in ORCID and `Mr Afikile Manduleli Msi` in PSC (suffix 'Msi'); marked, both keep it, reported. A name in one case with a word to spare still loses it (`ANDISWA ZANELE MSI` → suffix 'MSI'), the cost `mot` pays (#993), accepted because no local corpus writes the shape. Refusing it was tried and measured worse: a comma name reversed (`Jane Doe, MSi` → given 'MSi') and `Saprudin S.Sos., M.Si.` read given 'M.Si.'. **Refused**, each with an `excluded` entry giving its counts: `peng`, `ceng`, `barch`, `bchir`, `mendo`, `bed`, `ssi` (the romanized Korean honorific 씨, `Park Ji-hoon ssi`, which the committed snapshot holds), `sked`, `shut`, `merg`, `mak` and `mor`. `bed` is the Nepali given name Bed (59 nepal-candidates names), refused for the given part after a family comma: listed, `Thapa, Bed` reads suffix 'Bed'. No local corpus writes that shape. The gain refused is 6 readings of the 10 records writing the credential, 3 of them in a field (`Karina A Thiessen, BA BEd`, `John Zengulaaru (M.Phil., B.Ed)`), the other 4 already reading the suffix by rules/S3 or the comma. The same position, and the trailing given name under a family-first order, reaches `ded` and `edd`, whose Standing line this entry amends. `btech` is left unlisted, being the example of an unlisted dotted credential in eleven files; `mpdk` (`M.Pd.K.`, three chunks) was not a candidate and still reads as a title by its `pd` chunk. **Measured** (`tools/differential/measure.py --base` against master b89c5482, then ctgov-officials, orcid-researchers, psc-individuals, cz-candidates and jrc-names again on the final tree): ctgov-officials moves 407 of 536,981 readings, 122 of them in a field, each sampled one a credential leaving the given name, middle name, title or family name for the suffix (`Anna Gelavis, BPharm`, `Janice Pellow, M.Tech Hom` → suffix 'M.Tech Hom', `Veronique Michaud, BPharm. PhD`), the rest reports and case views; orcid-researchers moves 81, 50 in a field, mostly Indonesian degrees that had read as titles (`Dr. Rajab Agustini, S.Pd., M.Pd.` → title 'Dr.', suffix 'S.Pd., M.Pd.'); cz-candidates 2, jrc-names 1 (`Bernd Lange SPD` → family 'Lange', suffix 'SPD'), psc-individuals 1, its report only (`Mr Afikile Manduleli Msi`); the other local corpora, the committed snapshot and the CLDR, GND and Wikidata records do not move (opensanctions-parliaments not measured, its cache predating the datasets the tool reads). Scored: orcid-researchers 9 records agree that did not and 1 no longer does (`Saprudin S.Sos., M.Si.`, one name word, read family where the filer's given box holds it), cz-candidates 1 more agrees, psc-individuals and patentsview-inventors do not move. **Accepted**: `Ahmed Ali M.Hassan` keeps reading suffix 'M.Hassan', reported, the cost #998's proposal accepts; the division's count against it is in decisions/period-joined-words' 2026-11-09 #998 bullet. Pinned by the `two_chunk_credential_is_listed`, `two_chunk_credential_with_no_word_to_spare`, `family_comma_given_part_ends_in_two_chunk_credential`, `indonesian_credentials_after_a_comma`, `glued_initial_and_surname_still_read_by_position`, `two_chunk_credential_written_without_stops_after_a_comma`, `two_chunk_credential_in_capitals_without_stops`, `indonesian_credentials_with_no_comma`, `two_chunk_credential_after_a_one_word_head`, `ambiguous_msi_keeps_the_surname`, `ambiguous_msi_after_a_comma_is_the_credential`, `ambiguous_msi_in_capitals_takes_the_surname`, `refused_peng_keeps_the_surname`, `refused_bed_keeps_the_given_name` and `refused_ssi_keeps_the_word` case rows, and the masks by `tests/v2/test_render.py`'s `test_a_credential_written_in_two_chunks_takes_its_mask`. **Recompute**: `uv run python tools/vocab/query.py --issue 998` lists the entries; the moves by the command above against a master checkout. - **2026-11-10 (#1315) — the Royal Colleges' fellowships and memberships, a batch.** `John Smith FRCS` gave middle 'Smith', family 'FRCS', as did `Tanaka Hiroshi FRCS` under a family-first base (so #1310's group suggester voted given-first on it), and `Smith, John MRCP` gave middle 'MRCP': C6's caps shape needs a comma or a word the listing holds, and only `FACS` and `FACP` of the family were listed. 34 words listed (`en.toml`, `uv run python tools/vocab/query.py --issue 1315`): the Colleges of Surgeons, Physicians, Radiologists, Obstetricians and Gynaecologists, Ophthalmologists, Pathologists, Psychiatrists, Emergency Medicine, General Practitioners, Anaesthetists and Paediatrics, the Veterinary Surgeons (`mrcvs`), and the Canadian and Australasian royal colleges (`frcsc`, `frcpc`, `fracs`, `fracp`). **Vetted** by `tools/name_usage.py` and the local corpora: none has a Census 2010, SSA, nam_dict or Wikidata bearer, and none sits where a surname would in any local corpus (ctgov-officials, orcid-researchers, govuk-people, psc-individuals and fec-individuals hold them, all as credential runs; tse-donors, where #993 found `cota`, holds none), so none is marked ambiguous. The #993 screens were run over all 34 in lower, Title and upper case: `Jane Doe X`, `Jane Doe, X`, `JANE DOE, X`, `jane doe, x`, `Doe, Jane X`, `Jane Doe X, PhD`, and the capitals shapes with a word to spare and no comma (`JANE ANN DOE X`), and every one read the word as the suffix with no report. Each note records NPPES's count and ClinicalTrials.gov's after a comma (data 2026-10-21); `frcpglas`, `frcvs` and `frcsglasg` were left out as unwritten in every corpus, and `fasn`, `facg` and `fcps` (699 officials, Pakistan's College of Physicians and Surgeons) as not Royal College words, each worth a batch of its own. Six mixed-case ones carry a `cased` mask (`FRCPath`, `FRCOphth`, `FRCPsych`, `MRCPsych`, `FRCSEd`, `MRCSEd`). **Measured** over the committed corpora, the snapshot moved two names and none of the seven role fields: `Alex Green, FRCS (SN)` and `Andrew Wilson, MRCP (UK)` lost their `suffix-or-name` report, a listed word needing no fork. **Measured over the local corpora against master** (`tools/differential/measure.py`, 2026-11-10): ClinicalTrials.gov's officials moved 5,508 entries, 241 of them a role field; 225 of those put a listed word in the suffix where the base had it in the given, family, middle or title (`Troy Puar, MRCP UK` was given `MRCP`), and 16 went from right to wrong: 13 runs opening with `BM`, 2 with `MA BM` and 1 with `AO` after a comma (`Keith Godfrey, BM PhD FRCP`, given `BM` now). The cause was there before: `Keith Godfrey, BM PhD` and `..., BM PhD FACS` read given `BM` on master, and the unlisted `FRCP` ending the run kept it a suffix by accident, which listing it removes. Accepted as a cost of listing, and filed apart as the bug it is (#1323). **Declined: listing `bm` (Bachelor of Medicine) to remove it** (2026-11-10): it has no Census, SSA or Wikidata bearer, but an acronym is matched with every full stop removed, so it lists `B.M.` too, which Nepal's candidates write as surname initials (rules/S3's paired-initials Except, #864). Measured against master it fixed 15 ClinicalTrials.gov runs, 2 FEC names and `Whinnett, BM.BS`, and moved 6 Nepal candidates (`Chacra Bahadur B.M.`, family `B.M.` to a suffix) and 5 ORCID names where `BM` is a family-name initial (`Avinash BM`) to a suffix with the family name gone, the worse direction; the fix belongs in how a part opening with an unlisted two-capital word is read, not in the vocabulary. `ao` was left out for its own reason: a Census 2010 family reading (524) and an SSA given one (18), so it needs the ambiguous marking, and it moved 1 name. FEC, GOV.UK, ORCID and Companies House moved 1, 8, 16 and 3 entries, by the same readings, and tse-donors (where `cota` was found) and the other corpora moved none (opensanctions-parliaments could not be measured, its cached copy being stale); the committed snapshot, CLDR and GND records moved only the two reports above. A test that used `FRCS` as its example of an unlisted capitals credential (`tests/v2/pipeline/test_comma.py`) now uses `XYZW`, a word no listing will take. **Recompute**: `git diff origin/master...HEAD -- tools/differential/snapshot.jsonl` on the branch for the two moves (`snapshot.py --since v3.0.1` lists every move of the cycle, 325 entries on 2026-11-10, not this change's); the old readings are 1.4.0's too (`HumanName("John Smith FRCS")` gives last 'FRCS'). - **2026-11-19 (#1467) — `ud` LEAVES THE CREDENTIALS; `bt` STAYS.** Decided on the issue (its 2026-11-19 decision comment). `ud` came with the bulk list and is the Urdu and Arabic connective of a compound name (`Zia ud Din`). Counted over the distinct names of eight local corpora (ctgov-officials, ctgov-contacts, govuk-people, ukec-individuals, psc-individuals, fec-individuals, orcid-researchers, my-candidates), the words split at spaces with commas and full stops removed, as the vocabulary matches an acronym, 2026-11-19: `ud` stands between name words in 121 and ends a name in 7 (4 after a comma, 3 with none), and `bt` stands between name words in 35 and ends a name in 16 (7 after a comma, 9 with none), by position alone, so the 35 hold baronets with more post-nominals behind (`Bt, FRICS`) and the 16 surname-first initials (`B.T.`) among them (the decision comment's 127 and 34 counted records rather than distinct names, and its 7 and 11 another split). In lower case, in capitals within a mixed-case name, or in a name of one case, the credential reading started a run that took the rest of the name (`NADIR ZIA UD DIN` → family 'ZIA', suffix 'UD DIN', 2.4.0 through 3.1.0; 1.4.0 through 2.3.0 read middle 'ZIA UD', family 'DIN', which the change restores). The reading is removed with an `excluded` entry in en.toml carrying the counts. **The 7 names ending in it** write no credential: four are initials written `U.D`, the full stops being what the vocabulary's match removes: three ORCID holders' with no comma, now read as the family, as an unlisted pair of initials ending a name is, and an FEC donor's after a comma, read as initials before and after; one is the compound written surname first (FEC, now middle 'UD' where it read suffix 'UD'); and two are one Dutch study chair in two ClinicalTrials.gov records writing the rank universitair docent after the name and a comma, which now reads as an unlisted pair of capitals there does, initials run together: given 'UD', the name before the comma the family (written here with an invented name, `Anke Vissering, UD`), the accepted cost. Written with its full stops after a comma it reads as initials too (`Anke Vissering, U.D.` → given 'U.', middle 'D.'), and with a final full stop as a title by rules/H2's shape (`UD.`), as any unlisted word of that shape does. **`bt` is not changed**: a name reading beside the credential reads `Nur Aina bt Rosli` with family 'Rosli' and `Sir John Smith Bt` with family 'Bt', and the counts are too few to choose by; docs/customize.rst gives the recipe for a caller with Malay names (`Lexicon.default().remove("bt", kind="credential")`) and its cost on a baronet. The compound itself is not joined: `X ul/ur/ud Y` reads family 'Y'. **Measured** (`tools/differential/measure.py --base` against master 12b568f8): ctgov-officials and ctgov-contacts 1 entry each (the Dutch chair), fec-individuals 2, jrc-names 8, orcid-researchers 12, opensanctions-parliaments 1, patentsview-inventors 1; every other local corpus, the committed snapshot and the CLDR and GND records none. Scored against the filed boxes, orcid-researchers 3 records agree that did not (a Bangladeshi name holding `ud` in the given box and two Sri Lankan ones ending in `U.D`) and 6 no longer do, Pakistani holders who filed the whole compound in the family box (`ud Din` and the word before it), which the run's suffix had matched where the unjoined compound does not, with 2 more changing between two disagreements; patentsview-inventors 1 Hungarian record no longer agrees. Pinned by the `ud_inside_a_compound_name_in_capitals_is_a_name_word`, `ud_in_lower_case_inside_a_compound_name_is_a_name_word`, `ud_after_a_full_name_and_a_comma_reads_as_initials` and `bt_in_lower_case_before_the_last_word_stays_the_credential` case rows. -- **2026-11-20 (#1361, #1228, #1182) — ELEVEN CREDENTIALS ARE LISTED, `BCHIR` IS MARKED AMBIGUOUS, `MH` AND `SC` ARE DECLINED AND `SAN` IS DEFERRED.** Decided 2026-11-20. +- **2026-11-20 (#1361, #1228, #1182) — FOURTEEN CREDENTIALS ARE LISTED, `BCHIR` IS MARKED AMBIGUOUS, `MH` AND `SC` ARE DECLINED AND `SAN` IS DEFERRED.** Decided 2026-11-20. - **`bchir`** (B.Chir, Bachelor of Surgery; written so with no comma it stays a name word, `Jane Doe BChir` → family 'BChir' as master read it, now reported) is listed with a `family` reading, the Tunisian surname Bchir (ORCID 2 family boxes, PSC 1, Wikidata 2, each in Title case and none after a comma), so it is marked ambiguous, the `ba` shape: after a comma it is the credential, reported (`Jane Doe, BChir`); ending a name in Title case the family (`Amani Bchir`, reported). It carries no case mask, which would repair the surname to `BChir`, so `capitalized(force=True)` writes the credential `BCHIR`. Accepted: a surname written `BCHIR` in capitals ending a name of mixed case reads as the credential (`Amani BCHIR` → suffix 'BCHIR', reporting `given-or-family`), rules/S6's capitals reading; no corpus name writes it so. decisions/S12's entry of this date lists `bch` and `bmbch`. - - **The Nigerian marks** `mni`, `fwc`, `fsi`, `fnse`, `psc` and `ndc` are listed with lower-case masks, being written in lower case: case repair keeps them so in a name of mixed case or one written in capitals (`JANE DOE, MNI` → `Jane Doe, mni`), and `capitalized(force=True)` writes them lower case too (`Jane Doe, MNI` → `Jane Doe, mni`; `Maj Gen John Smith CB psc` keeps `psc`). + - **The Nigerian marks** `mni`, `fwc`, `fsi`, `fnse`, `psc` and `ndc` are listed, all but `psc` with lower-case masks, being written in lower case: case repair keeps those so in a name of mixed case or one written in capitals (`JANE DOE, MNI` → `Jane Doe, mni`), and `capitalized(force=True)` writes them lower case too (`Jane Doe, MNI` → `Jane Doe, mni`). `psc` carries no mask (decided 2026-11-20): PSC's four filers surnamed `Psc` make it a surname, which a mask, applying in every role, would repair to lower case, so it repairs as an unmasked credential does: kept as written in a name of mixed case (`Maj Gen John Smith CB psc`), in capitals under `force=True` and in a name written in lower case (`ali bello, psc` → `Ali Bello, PSC`). - **The Hong Kong and Singapore honours** `gbm`, `gbs`, `sbs`, `bbs` and `bbm` are listed, written in capitals, with no mask. Without a comma they read as the credential now (`Hon WONG Kwok-kin GBS JP` → suffix 'GBS JP'); after a comma they already did (rules/C6), and `MH, JP` already reads the run (rules/C5, #1392). The capitals family name `WONG` is `capitals_as_family`'s to read (rules/O9), and `Policy(unlisted_caps_suffixes=CapsSuffixes.EVERYWHERE)` already read the comma-less rows. - - **Accepted for both batches:** initials glued in capitals after a one-word family and a comma that spell a listed credential read as the credential, the given name lost (`Bello, MNI`, `Chan, GBS`), as `Smith, MD` reads, a credential opening the part after a family comma making it the postnominal part (rules/C13); none in the corpora. The lower-case masks apply in every role, so a word written so as a name is repaired in lower case (`RAM MNI GURUNG` → `Ram mni Gurung`; Nepal's candidates hold one `Mni`, PSC's filers four `Psc`), and a word that is also a name reads as the credential wherever an unambiguous one does: in Title case after a one-word family and a comma (`Gurung, Mni` → family 'Gurung', suffix 'Mni'), opening the given part there, which C13 then reads whole as postnominal (`Gurung, Mni Ram` → suffix 'Mni Ram', reported `suffix-or-name`), and ending a name with no comma (`Ram Bahadur Mni` → family 'Bahadur', suffix 'Mni', unreported; `John Psc` → suffix 'Psc', reported `given-or-family`). The bearers are few, and none of them was marked ambiguous for it, a `given` or `family` reading with counts being what would gate a word (the `ba` shape). + - **Accepted for both batches:** initials glued in capitals after a one-word family and a comma that spell a listed credential read as the credential, the given name lost (`Bello, MNI`, `Chan, GBS`), as `Smith, MD` reads, a credential opening the part after a family comma making it the postnominal part (rules/C13); none in the corpora. The lower-case masks apply in every role, so a word written so as a name is repaired in lower case (`RAM MNI GURUNG` → `Ram mni Gurung`; Nepal's candidates hold one `Mni`), and a word that is also a name reads as the credential wherever an unambiguous one does: in Title case after a one-word family and a comma (`Gurung, Mni` → family 'Gurung', suffix 'Mni'), opening the given part there, which C13 then reads whole as postnominal (`Gurung, Mni Ram` → suffix 'Mni Ram', reported `suffix-or-name`), and ending a name with no comma (`Ram Bahadur Mni` → family 'Bahadur', suffix 'Mni', unreported; `John Psc` → suffix 'Psc', reported `given-or-family`). The bearers are few, and none of them was marked ambiguous for it, a `given` or `family` reading with counts being what would gate a word (the `ba` shape). - **Declined: `mh` and `sc`.** Listed, the two moved 324 local-corpus names, most of them wrong: the `Sc` of a split `M. Sc.` (94), capitals initials after a comma (FEC's `DOYLE, SC` shape) losing the given name, and paired initials inside a name (`M.H.`) losing the family. After a comma with `JP` behind them they read as the credential run already (rules/C5, #1392). Accepted with the decline: a lone trailing `, MH` or `, SC` stays the given name, and with no comma each reads as the family (`Hon WONG Kwok-kin MH JP` → family 'MH', suffix 'JP'), as 18 MH and 4 SC names of the LegCo lists are written. Neither has a name reading to mark it ambiguous by, its clash being with initials. Each carries an `excluded` entry in en.toml. - **Deferred: `san`** (Senior Advocate of Nigeria), the given name San and es, it and fil's saint particle. As a default credential it cost 17 family names written in capitals (TSE's `ALCEU A SAN` shape) and added 143 reports; it waits for a Nigerian English choice of language, where it would be a `default = false` reading. en.toml records the exclusion; #1228 stays open for it. - **Measured** 2026-11-20 against a checkout of master `0d8c6fa8`: `snapshot.py --local SOURCE --base` on ctgov-officials (322 entries move, decisions/S12's entry, none emptying a field), govuk-people (1, a report) and fec-individuals (2); `local_agreement.py --base` on orcid-researchers (2 records fixed, 0 broken: an `, mni` and an `aus der`) and psc-individuals (1 fixed, a surname box ending `Gbm`, and 1 company name changed); the committed snapshot, the Hong Kong lines and `Jane Doe, BM, BCh, PhD`. The `mh`/`sc` and `san` figures are the triage's of the same day. Recompute: those commands with `--base `; for the declined and deferred words, `config_diff.py diff default` against an `expr:` lexicon adding them as credentials, `--local all --match` over the words; the bearer counts are on the words (`tools/vocab/query.py --word bchir`, `tools/name_usage.py mni --boxes`). diff --git a/nameparser/config/_compiled.py b/nameparser/config/_compiled.py index 09eb177b0..4b190a40e 100644 --- a/nameparser/config/_compiled.py +++ b/nameparser/config/_compiled.py @@ -3983,7 +3983,6 @@ 'preg.ma': 'Preg.ma', 'preg.mo': 'Preg.mo', 'prof.ssa': 'Prof.ssa', - 'psc': 'psc', 'psyd': 'PsyD', 'ptech': 'PTech', 'rkin': 'RKin', diff --git a/nameparser/config/_index.py b/nameparser/config/_index.py index 5e9234c8b..173bfc002 100644 --- a/nameparser/config/_index.py +++ b/nameparser/config/_index.py @@ -2435,7 +2435,7 @@ ('provost', (('en', 'office', ()),)), ('prue', (('en', 'familiar', (('short_for', ('prudence',)),)),)), ('przemek', (('pl', 'familiar', (('short_for', ('przemyslaw', 'przemysław')),)),)), - ('psc', (('en', 'credential', (('cased', 'psc'),)),)), + ('psc', (('en', 'credential', ()),)), ('pslc', (('en', 'office', ()),)), ('psm', (('en', 'credential', ()),)), ('psp', (('en', 'credential', ()),)), diff --git a/nameparser/vocab/en.toml b/nameparser/vocab/en.toml index 91d8b508a..99d1998c2 100644 --- a/nameparser/vocab/en.toml +++ b/nameparser/vocab/en.toml @@ -5674,7 +5674,7 @@ credential = {} [[word]] text = "psc" -credential = { cased = "psc", expands = "passed Staff College", note = "a Commonwealth staff-college mark, written in lower case (Maj Gen John Smith CB psc); NPPES 81, ClinicalTrials.gov 3 as PSc, PSC 4 filers as Psc (2026-11-20); no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 1228 } +credential = { expands = "passed Staff College", note = "a Commonwealth staff-college mark, written in lower case (Maj Gen John Smith CB psc); NPPES 81, ClinicalTrials.gov 3 as PSc, PSC 4 filers surnamed Psc (2026-11-20). No case mask, unlike the other Nigerian marks (decided 2026-11-20): a mask applies in every role and would repair the surname Psc to psc, so the mark repairs as an unmasked credential does; no Census 2010 (floor 100), SSA (floor 5 a year) or Wikidata bearer", issue = 1228 } [[word]] text = "psm"