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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Elsewhere: which words divide at all, and what a divided word reads as, decisions/period-joined-words' 2026-11-09 #1255 entries; a run of single letters, which stays one word, decisions/T7.

Open: [#1306](https://github.com/derek73/python-nameparser/issues/1306), which field a Mongolian glued initial takes under the default order or a Mongolian choice (moved from #1235, which this division closed): the pack question the spaced `Ц. Сандаг-Очир` already raises.
Open: a chunk, or a name after the stop, that writes a vowel sign other than Thai's or a mark of the Arabic script's (counted since #1149, in the gate as on both sides of the stop: `أ.محمد` and `أ.د.أحمد` divide in NFD as in NFC; a zero-width joiner or non-joiner between two letters of the name is counted too, one right after the stop is not), a name of plain letters dividing in any script (`ড.করম খান`) (`डा.राम शर्मा` keeps title 'डा.राम', where `डा. राम शर्मा` reads title 'डा.', given 'राम'; `ড.রহিম` keeps title 'ড.রহিম', the listed `ড` found but রহিম's U+09BF not, #1166): the shape's letter class counts no such mark (decisions/nfd-shapes), and #1166 added Thai's on the name side alone, so no division is found there, moved here from decisions/period-joined-words' Open line. The local corpora hold almost no such title (nepal-candidates' glued Devanagari words are runs of initials, `के.सी.`, which stay whole anyway, and `मो.`, #1178's), so no issue is filed.
Open: a chunk, or a name after the stop, that writes a vowel sign other than Thai's or a mark of the Arabic script's (counted since #1149, in the gate as on both sides of the stop: `أ.محمد` and `أ.د.أحمد` divide in NFD as in NFC; a zero-width joiner or non-joiner between two letters of the name is counted too, one right after the stop is not), a name of plain letters dividing in any script (`ড.করম খান`) (`डा.राम शर्मा` keeps title 'डा.राम', where `डा. राम शर्मा` reads title 'डा.', given 'राम'; `ড.রহিম` keeps title 'ড.রহিম', the listed `ড` found but রহিম's U+09BF not, #1166): the shape's letter class counts no such mark (decisions/nfd-shapes), and #1166 added Thai's on the name side alone, so no division is found there, moved here from decisions/period-joined-words' Open line. The local corpora hold almost no such title (nepal-candidates' glued Devanagari words are runs of initials, `के.सी.`, which stay whole anyway, and `मो.`, which, with the Latin `Mo.` (10 words glued to the next in the local corpora, #1178's third comment), no issue holds once #1178 closes, answered for `Ab` and `Md`), so no issue is filed.
Open: a word glued at a full stop other than the ASCII one, in Latin names, as the ideographic stop in `Wenzhao Zhong, Ph。D` (one name in the local corpora, 2026-11-10). The fullwidth stop between Han names was #1312, which rules/T3 reads as the transcription dot.
Open: [#1311](https://github.com/derek73/python-nameparser/issues/1311), a glued word after a family comma, the given part the comma names (`ARTHUR, L.MICHAEL`, 111 in fec-individuals), which the division would reach only once the comma's decision is asked first.
Open: [#1313](https://github.com/derek73/python-nameparser/issues/1313), a particle glued to its surname at its full stop (`Alaa A. El.Baz` reads suffix 'El.Baz'), which the division does not read as a chunk.
Expand Down
2 changes: 1 addition & 1 deletion docs/design/decisions/indic-honorifics.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Open: #514 (whether the Tibetan prefix titles Tulku, Khenpo, Geshe, Kyabje and J
- Implementation choice, recorded with this PR, the comma (#1393, fixed in the same change): rules/C13 gains an Except, `Md` opening the given part after a family comma being the given name where its writing says so (`Uddin, Md Karim`, `Rahman, Md.`, `RAHMAN, MD ABDUL` → given 'Md'), and the postnominal part elsewhere (`Smith, MD PhD`, `Smith, Md PhD`, `Smith, Md XYZ`, `Uddin, Mr Md`, `Dr. Rahman, Md`); its conditions, as narrowed by the change's second review, are rules/C13's and decisions/C13's to state, not restated here.
- Measured, 2026-11-14, on this branch against master 3dadc263, whose parse #1390 did not change, over every local corpus's `corpus.jsonl` (the entries holding the word `md` after a comma, `,[^,]*\bmd\b`, case-insensitive, each corpus's distinct texts): 149,226 names, 19 move (re-taken after the second review's changes, 2026-11-14: the same 149,226 and 19; with the committed corpora, which this change's rule examples and case rows join, 149,359 and 27 after the third review), 5 of them #1383's leading `Md.` (ctgov) and 14 the comma's: fec-individuals 9 (`UDDIN, MD KARIM` shapes, given 'MD'), psc-individuals 3 (the forename box holding `Md` behind a title typed in the surname box), orcid-researchers 2 (`Uddin, Md. Karim`, `Hossain, Md`), and 13 of the 14 read right. The writing behind the design: after one word and a comma, `X, MD` in capitals alone is the degree in ClinicalTrials.gov (107, `Novak, MD`, `BERGER, MD`), while FEC's 10 (a Bangladeshi surname alone, then `MD`) are likely Muhammad, which no writing tells apart; `X, Md` written with a lower-case letter was the given name in all 3 found (ORCID 1, PSC 2). Recompute: each entry of a `corpus.jsonl` under `~/.cache/nameparser-tools/local/` matching `^\s*([^\s,]+),\s*(md\.?)(?:\s+(\S.*))?\s*$`, case-insensitive, grouped by the word's case, a word after it or none, and the head in capitals or not; the moves by parsing every entry matching the first pattern in both checkouts and comparing the seven name fields.
- Accepted: `MD` in capitals alone after a family comma stays the degree (`RAHMAN, MD` → suffix 'MD'), so `Md. Rahman` / `RAHMAN, MD` does not match; the degree written before a given name reads as Muhammad written short, the writing being the same (`SMITH, MD JANE` → given 'MD', 1 of FEC's 9 movers); a name in one case writes no case that tells (`rahman, md` → suffix 'md'); and `mst`, which holds no given reading, keeps the cost the 2026-11-06 #1130 entry recorded (`Begum, Mst Amina` → suffix 'Mst Amina'). A full spelling of Muhammad written with a full stop is still a title by rules/H2's shape (`Mohammed. Rahman` → title 'Mohammed.'): 10 of the 22,986 ORCID names opening with one of the five long spellings write it so, and no other local corpus does (2026-11-14: in orcid-researchers' `corpus.jsonl`, `grep -ciE '^"(muhammad|mohammad|mohammed|mohamed|mohamad)\. '` gives 10 and the same pattern with a space for the stop, `'^"(…) '`, 22,986; the second review's own count, by another recipe, gave 23,028).
- Left to their own issues: #1394 (a stop gluing `MD.` to the next word ends a Malay name in a suffix, `SITI AMINAH MD.NOOR` → suffix 'MD. NOOR') and #1178 (`Ab` and `Md.` at the head of a name, the wider question this entry answers for `Md.` alone).
- Left to their own issues: #1394 (a stop gluing `MD.` to the next word ends a Malay name in a suffix, `SITI AMINAH MD.NOOR` → suffix 'MD. NOOR') and #1178 (`Ab` and `Md.` at the head of a name, the wider question this entry answers for `Md.` alone; `Ab` answered 2026-11-21, decisions/vocabulary-collisions' #1178 entry, the Bengali `মোঃ` unchanged).
- 2026-11-19 #1469 — QARI, MOULANA, ALHAJ AND ALHAJJ ARE TITLES; HAFIZ, HAFEZ, HAJI AND MAULANA ARE LEFT OUT, WANTING A CHOICE; SYED, MIAN, CHAUDHRY AND MAKHDOOM STAY NAME WORDS. Decided on 2026-11-19, each word by its counts, as rules/H9's batches are: the religious honorifics written before a name in Pakistan and Bangladesh, which 1.4.0 through 3.1.0 read as the given name (`mufti` and `hajji` were titles already, in ar.toml). It takes up the 2026-09-06 bundle's hafiz and syed forms, "skipped pending a corpus check"; `shahid` is not counted here.
- THE COUNTS, as borne names. ORCID's 2025 extract (24,990,909 people; `tools/name_usage.py <word> --boxes --country PK --country BD --country IN --country MY --country ID`), given box / family box: `hafiz` 2,300 / 371 (given: Pakistan 600, Malaysia 192, Indonesia 71, Bangladesh 29); `hafez` 245 / 564 (given: Iran 30, Egypt 28; family: Egypt 169); `haji` 232 / 1,178 (given: Iraq 20, Pakistan 15, Tanzania 13, Malaysia 10; family: Iran 156, Iraq 72, Brunei 50); `maulana` 971 / 1,231 (Indonesia 531 / 504, an Indonesian given name and surname); `qari` 9 / 43 (given: Pakistan 4); `moulana` 6 / 16; `alhaj` 17 / 269 (given: Sudan 5; the family box a surname written last); `alhajj` 5 / 47; `syed` 9,229 / 2,725 (given: Pakistan 1,810, India 907); `mian` 753 / 319 (given: China 130, Pakistan 103); `chaudhry` 81 / 814; `makhdoom` 16 / 57. US SSA given-name births: `syed` 6,043, `hafiz` 136, `mian` 110, `haji` 105, `hafez` 11, `qari` 10, the rest under 5 a year.
- THE NAMES OPENING WITH THE WORD, read by hand in the local corpora: `maulana`'s 18 in orcid-researchers are all given names (16 Indonesian), and JRC-Names' 69 the Pakistani cleric's title; `haji`'s 29 in orcid-researchers are mostly given names (Tanzania 12, Ethiopia 3, Azerbaijan 2), psc-individuals' 34 mostly the title, and my-candidates' 26 and opensanctions-parliaments' 7 (`pk_na_members` 3, `in_sansad` 4) the title; `qari` (orcid-researchers 1, psc-individuals 5, JRC-Names 53), `moulana` (`pk_na_members` 2, psc-individuals 3, JRC-Names 1) and `alhaj` (psc-individuals 2, JRC-Names 1, orcid-researchers 1 of 2) are the title in every one but one: an orcid-researchers byline writing its family name `Alhaj` first and its given name as initials, which master read given 'Alhaj' and this change title 'Alhaj', both missing the filer's boxes; no name opens with `alhajj`. Read as a title by default, `hafiz` would move 630 names in the local corpora, 266 in orcid-researchers and 237 in psc-individuals, nearly all filed in the forename box.
Expand Down
2 changes: 1 addition & 1 deletion docs/design/decisions/name-matching.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Elsewhere: `matches()` and `comparison_key()` stay exact, one casefolded compone
- Accepted: not transitive across two long spellings. `Mohammad Rahman` and `Muhammad Rahman` are each consistent with `Md Rahman` and not with each other by default, the long pair being an opt-in `alternate-spelling`, the shape of `J. Smith` against `John Smith` and `Jane Smith` (`test_muhammad_written_short_is_not_transitive_across_long_spellings`). A long spelling a short form does not list reads as before against the others' links: `Md Rahman` / `Mohamad Rahman` moves from `conflict` (master 3dadc263, `md` holding no given reading) to `alternate-spelling`, refused by default, `md` listing no `mohamad`; `Mohd` and `Moh` against `Muhammed Rahman` stay `conflict`, `muhammed` being in neither list, and `Md` against it reads `listed-spelling` since `md` lists it (decided 2026-11-14, vocabulary-model's 2026-11-14 #1383 `md` ALSO LISTS entry; the entries give the counts). Every other short-and-long pair of the three short forms and the six spellings reads `listed-spelling`, consistent by default: `Md` with `muhammad`, `mohammad`, `mohammed`, `mohamed` (each a `conflict` on master), and `Mohd` and `Moh` with all five they list (`muhammad` already `listed-spelling` on master, `mohamad` a `conflict` and the other three `alternate-spelling`).
- Measured, 2026-11-13, `uv run python tools/differential/match_diff.py --base <a checkout of the merge base 3dadc263>` from this branch: 31,267 pairs under 22 settings; the key guarantee holds; 2,310 of 687,874 rows move, 105 under each setting, every one a pair holding `Md.`, `Md`, `Mohd` or `Moh`: the parse's move (`Md. Rahman` reads given `Md.` where master read title `Md.`) moves its keys (`rahman;` to `rahman;m`, 1,826 rows, no other name's keys moving), its title row (`noted` to `same`, 1,804) and its given row against a name with another given name (`given-one-side` to `conflict`, 1,694, inconsistent before and after); the new links read `listed-spelling` where master read `conflict` (286), `alternate-spelling` (176) or `given-one-side` (110), and 458 verdicts go from not consistent to consistent, none the other way.
- Measured, 2026-11-14, after the second review's changes (#1393's comma narrowed and reporting, decisions/C13; `md`'s credential in `mul.toml`; `md` listing `muhammed`): `uv run python tools/differential/match_diff.py --base <a checkout of the merge base aad9ca8e>` from this branch, `NAMEPARSER_TOOLS_CACHE` a folder of its own holding the jrc-names and tse-donors corpora: 31,376 pairs under 22 settings; the key guarantee holds; 10,074 of 690,272 rows move, 458 under each setting but `-listed-spelling` and `-one-side` (457), every one a pair holding `Md.`, `Md`, `Mohd` or `Moh`. 783 verdicts go from not consistent to consistent and 45 the other way, each read: 33 are the Accepted pairs below (`Md. Rahman` / `RAHMAN, MD` 16, a `Mohammed.` title 17); 4 under the lenient settings, where `Md` is now a given name on both sides and conflicts with another given name (`J. R.` / `Dr. Md. Rahman`, `Smith J. R. R.` / `Rahman, Md Abdul`), consistent on aad9ca8e because neither `Md` read as one; and 8 need an outcome the caller refused (`-folded`: `Md.` against `Md`; `-one-side`: the middle name `Abdul` on one side).
- #1393 (fixed with this change, decisions/C13 and decisions/indic-honorifics' 2026-11-14 #1383 entry): the name written both ways is consistent (`Md. Rahman` / `Rahman, Md`, `Dr. Md. Rahman` / `Rahman, Md`, `Md Abdul Rahman` / `RAHMAN, MD ABDUL`; `test_md_opening_the_part_after_a_family_comma_matches_its_own_name`). Accepted (`test_md_left_to_the_credential_or_a_title_shape_is_accepted`): `Md. Rahman` / `RAHMAN, MD`, capitals alone after the comma staying the degree, and `Md. Rahman` / `Mohammed. Rahman`, a full spelling written with a full stop being a title by rules/H2's shape (#1178 asks the wider question of a name's head). #1394 leaves `SITI AMINAH MD.NOOR`'s glued `MD.` in the suffix, so its match is not settled here.
- #1393 (fixed with this change, decisions/C13 and decisions/indic-honorifics' 2026-11-14 #1383 entry): the name written both ways is consistent (`Md. Rahman` / `Rahman, Md`, `Dr. Md. Rahman` / `Rahman, Md`, `Md Abdul Rahman` / `RAHMAN, MD ABDUL`; `test_md_opening_the_part_after_a_family_comma_matches_its_own_name`). Accepted (`test_md_left_to_the_credential_or_a_title_shape_is_accepted`): `Md. Rahman` / `RAHMAN, MD`, capitals alone after the comma staying the degree, and `Md. Rahman` / `Mohammed. Rahman`, a full spelling written with a full stop being a title by rules/H2's shape (#1178 asked the wider question of a name's head, answered for `Ab` on 2026-11-21 in decisions/vocabulary-collisions). #1394 leaves `SITI AMINAH MD.NOOR`'s glued `MD.` in the suffix, so its match is not settled here.
- Merged with #1351 (2026-11-14): `MD` in capitals is both Muhammad written short and a capitals word, and #1351's rule is asked only where a pair is not otherwise consistent, so `MD Rahman` / `Mohammad Dewan Rahman` reads `listed-spelling` and `one-side` rather than #1351's `initial` row, and `MD Rahman` / `Mary Dawn Rahman` reads `initial`; the two readings meet in no third name, the shape of the triples #1351 accepts (`test_md_in_capitals_reads_as_its_long_spellings_or_as_two_initials`). `_CAPITALS`' negative control moves from 16 rows to 15.

- **2026-11-13 #1351 A GIVEN NAME OF CAPITALS READS AS THE INITIALS THE OTHER SIDE'S NAMES SPELL EXACTLY.** `JP Smith` matched `J. P. Smith`, which matched `John Paul Smith`, while `JP Smith` / `John Paul Smith` conflicted (given `JP` / `John`), the parse reading `JP` as one given word.
Expand Down
2 changes: 1 addition & 1 deletion docs/design/decisions/period-joined-words.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Elsewhere: a run of single letters spelling a title at the front of a name, deci
Elsewhere: the division itself and the name test that left it open, answered by position (a chunk read alone and a name before any comma divide, nothing after a comma does), with the one-case, caseless-script and unlisted-credential writings the Open lines here named, decisions/T8's 2026-11-10 #1230/#1235 entry.
Elsewhere: a given name written as a run of single letters, parted into its initials once roles are final (`E.T. Smith` → given 'E.', middle 'T.'), decisions/T7's 2026-11-10 #1296 entry.
Elsewhere: a title listed with its stops, read whole before any division too (`Univ.Prof`, `Dott.ssa`, and the degrees written with their field's initial, `Dr.C.`, `Mgr.A.`), decisions/T8's 2026-11-10 #1305 entry.
Open: [#1178](https://github.com/derek73/python-nameparser/issues/1178), a given name written short and glued to the next given name (`Gio.Batta`, `Alex.John`; in the local corpora `Gio.Batta` occurs not at all and `Md.Delowar` 278 times, with Devanagari `मो.` 46, which #1178 asks to list as written short so rules/T8 divides it; `Md.Karim Uddin` (a made-up name) divides since 2026-11-14, `md` being a given name written short by #1383, and `मो.` does not). An unlisted stub is not divided, because its spaced twin reads it as a title by rules/H2 (`Gio. Batta Rossi` → title 'Gio.'). The Italian contraction `Fr.co` keeps its title reading through its listed first chunk.
Open: [#1306](https://github.com/derek73/python-nameparser/issues/1306), which field a Mongolian glued initial takes under the default order. This is a pack question, the same one the spaced `Ц. Сандаг-Очир` already raises; it moved from #1235, closed by decisions/T8's division.

## Log

- 2026-11-21 #1178 — `Ab.` IS LISTED AS WRITTEN SHORT, SO A GLUED `Ab.Ghani` DIVIDES; THE OPEN LINE FOR #1178 IS RETIRED. The Open line read: a given name written short and glued to the next given name (`Gio.Batta`, `Alex.John`), `Md.Delowar` 278 times in the local corpora and Devanagari `मो.` 46, which #1178 asked to list as written short so rules/T8 divides it. `md` was listed so by #1383 (2026-11-14), and `ab` by #1178 (ms.toml's Abdul written short, decisions/vocabulary-collisions' entry of this date), so `Ab.Ghani Harun` reads given 'Ab.', middle 'Ghani', as `Ab. Ghani Harun` does. What the line also named stays as it was, with no issue: an unlisted stub is not divided, its spaced twin reading it as a title by rules/H2 (`Gio. Batta Rossi` → title 'Gio.'; `Gio.Batta` occurs in no local corpus), and `मो.` and the Latin `Mo.` are listed as no given name (decisions/T8's Open line).
- 2026-11-10 (Derek), #1230, #1235 — THE DIVISION SHIPPED, THE NAME TEST ANSWERED BY POSITION: decisions/T8 holds the test, its measures and what it leaves whole. The second Standing line is amended to point there, and four Open lines move: the name test, the one-case and caseless writings and the unlisted credentials are answered there, #1230's `Dr.J.` and `Gen.Ademola` divide as listed title chunks, and the caseless script's question moves to decisions/T8's Open line.

- 2026-11-09 #1136 — A TRANSLITERATION DIGRAPH IS A CHUNK READ ON ITS OWN, THE ONES rules/H2 NAMES AND ONLY THOSE. This file's Open line for #1136 asked whether a digraph is an initial, a yes adding it to the chunks read on its own. decisions/H2's entry of this date answered it for the spaced word: the digraphs that are no title in any corpus read (`Yu`, `Ya`, `Ye`, `Yo`, `Zh`, `Kh`, `Shch`, `Dzh`) are no title by shape, while `Ts`, `Ch` and `Sh`, each also a title written short, still are. The glued word follows its spaced twin, as this file's 2026-11-09 #1255 entry decides every divided word does, so the division takes the same set: `Yu.A.Chibrikova` is to read as `Yu. A. Chibrikova`. The Open line's own example, `Ts.Sandag-Ochir`, is no such word, since `Ts. Sandag-Ochir` reads title 'Ts.': it does not divide, and what it should read is left to the Open lines for #1230 and #1235.
Expand Down
Loading