diff --git a/docs/design/decisions/H10-title-written-as-a-run-of-letters.md b/docs/design/decisions/H10-title-written-as-a-run-of-letters.md index 862f72913..3437a41a1 100644 --- a/docs/design/decisions/H10-title-written-as-a-run-of-letters.md +++ b/docs/design/decisions/H10-title-written-as-a-run-of-letters.md @@ -6,7 +6,7 @@ - Where the comma's decision reports paired initials opening the part after it (rules/C11), the report stands on a run this rule reads as the title (`Smith, U.S. Senator John`) — 2026-11-09 #490. - Only the titles that abbreviate several words are marked, so initials spelling a title of one word stay a name with a title word behind them (`D.R. Judge Smith` → given names 'D.R. Judge' (rules/T7 parting the run)); the cost kept is a person whose initials spell a marked title and whose next name is a title word (`P.D. Judge Smith` → title 'P.D. Judge') — 2026-11-09 #490, DECIDED. -Open: which vocabulary reads a degree acronym written this way at the front of a name in the `es` pack (`L.C.P.`) is [#979](https://github.com/derek73/python-nameparser/issues/979)'s, which can now mark its titles `dotted` or ask for more. +Open: which vocabulary reads a degree acronym written this way at the front of a name in the `es` pack (`L.C.P.`) is [#979](https://github.com/derek73/python-nameparser/issues/979)'s, which can now mark its titles `dotted` or ask for more. A build listing the three-letter Mexican degrees with their stops was declined on 2026-11-20 (below). Elsewhere: why a run of single letters joined by full stops stays one word while the name is read, decisions/period-joined-words; its parting into initials once roles are final where it is the given name (`U.S. Grant` → given 'U.', middle 'S.'), decisions/T7's 2026-11-10 #1296 entry, which also answered the other half of #490, left out of #490's fix as its 2026-10-02 comment proposed (`E.T. Smith` → given 'E.', middle 'T.'). @@ -18,3 +18,4 @@ Elsewhere: why a run of single letters joined by full stops stays one word while THE MECHANISM. classify tags the run (`vocab:dotted-title`) where its folded spelling without stops is in the set and its text is a run of two or more single letters joined by stops, the last stop optional (`_vocab.is_dotted_title`). `_pieces.leading_titles`, the given part's leading run, counts a tagged piece as a title word, applies H3's floor, then gives back a tagged piece the run ends on, and asks the one before it again (`Hon. U.S. Grant` keeps title 'Hon.'). H6's run before a family comma, which reads by vocabulary only, does the same, so `U.S. Senator Smith, John` reads as `US Senator Smith, John` does; it now counts its run before setting roles. The run is read as the title it spells by the other readers of the head too: by H9's phrase test, so a gated title behind it has its partner (`U.S. Marshal John Smith` reads as `US Marshal John Smith`), and by C4's count of name words before a comma, which counts it as a title only where it opens the part (behind any titles) and a title, listed or by H2's shape, follows it with a word behind (a word of any kind, so `U.S. Senator Jr., Ed` counts it, and the floor then gives 'Senator' back and the run after it, reading as master did), so `U.S. Senator Smith, Ed` keeps given 'Ed' as its undotted twin does (both found by the code review: the first build read `U.S. Marshal` as given 'U.S.' and `U.S. Senator Smith, Ed` as title 'U.S. Senator', suffix 'Ed', no given name). A run a connective joins to another (`U.S. and U.K. Ambassador`) is one unit of several words and stays a name, an accepted gap. H9's phrase test reads the run as the modifier it spells wherever it stands, as it reads the undotted twin, so `John Smith U.S. Dean.` reads title 'Dean.', family 'U.S.' as `John Smith US Dean.` does (master and 1.4.0 read family 'Dean.'), the run then reporting `suffix-or-name` as rules/S3's unlisted dotted shape ending the name, which its undotted twin cannot raise, and `U.S. Vice Smith`, two modifiers with no head, keeps given 'U.S.' (both found by the review of the fix commit; accepted as the twin's reading, rules/H10's Accepted clause). The fold runs only where the name holds a word H9 reads, so a name with a run and no such word (`U.S. Grant`) pays no phrase test for it. Where the count reads the run as a title and H6 then gives it back (`U.S. Insp. Smith, Ed`, H6 reading by vocabulary only, and `U.S. St. Smith, Ed`, a title-particle stopping H6's run), the comma decision is the one the undotted twin makes and the run lands in the family, as H10 reads it with no title kept behind it. The run is read as a title only at the head of a part: at the end of a name H5's chain takes neither the run nor its spelling without stops (`John Smith US Senator` keeps family 'Senator'). THE SWEEP (2026-11-09, re-run after the code review and again after the review of its fix). Twenty-two bases (`{D} District Judge Marc Treadwell`, `{D} Senator John Smith`, `{D} Grant`, `Hon. {D} Grant`, `{D} Senator`, `{D} Senator Jr`, `Mr {D} Ambassador Jane Smith`, `{D} Senator John Smith Jr.`, `{D} Senator John de la Vega`, `{D} Senator Smith`, `Freiherr {D} Senator Smith`, `St {D} Senator Smith`, `Rev. Sr. {D} Senator Smith`, `(Bob) {D} Senator Smith`, `{D} Senator Smith PhD`, `{D} Dr. Smith`, `{D} Marshal John Smith`, `{D} Marshal`, `{D} Dean Smith`, `{D} Senator Smith V`, `{D} Vice Smith`, `John Smith {D} Dean.`) in six comma shapes (none, `Doe Ray, ` and `Doe, ` and `, ` before the base, and `, Mary` and `, Ed` after it) and four spellings (`U.S.`, `U.S`, `u.s.`, `P.D.`), under all three orders, 1,584 rows, each compared with its twin written without stops. Fields differ on 351, every one a row where nothing the run keeps follows it (`{D} Grant`, a lone `{D} Senator` or `{D} Marshal`, `{D} Senator Jr`, where the floor gives 'Senator' back, and `P.D.` before `Marshal`, `Dean` or `Vice`, which take no academic title as their partner or head), which the run's spelling without stops reads as a title where the dotted run stays initials. Every other difference is the `suffix-or-name` report the comma's decision gives paired initials opening the part after it (rules/C11, C5's shape), which master gave the same run read as the given name. It stands now on a run this rule reads as the title, the report naming the title field and the credential as its other reading: accepted rather than dropped, since the comma decides before the title run is read and dropping it would have the comma predict H10's run (rules/H10's Accepted clause). The same sweep made rules/H10 state its precedence over rules/C5, whose given part the run opens. THE CORPORA (measured 2026-11-09 against master b89c5482, py3.11). The snapshot moves one name, the Treadwell row. Local corpora by `snapshot.py --local --base`: ukec-individuals, govuk-people, dof-signatures, fec-individuals and nepal-candidates match the base; ctgov-officials moves the two Privatdozent rows the simulation found, each from given 'P.D.' to title 'P.D. Dr.' (`Edgar Santos-Marcial, P.D. Dr. med` and `Martin Beiderlinden, P.D. dr. - med.`, whose given names, 'med' and '-', were no better before). opensanctions-parliaments was not read: its cached fetch predates the datasets the tool now reads, and refreshing it rewrites the cache every session shares. +- 2026-11-20 #979 — THE DOTTED MEXICAN DEGREES ARE NOT LISTED IN 3.2. A build listed `l.c.p`, `l.a.e`, `m.a.p` and `l.e.m` in `es.toml` as default `academic` readings, so that, as rules/T7's vocabulary Except, `L.C.P. Ana Ruiz Paz` read title 'L.C.P.' where it reads given 'L.', middle 'C.P. Ana Ruiz'. It was declined before merging. Its cost falls on initials, a run of single letters joined by full stops being how initials are written, which T7 reads right today: `Perez, M.A.P.` would read title 'M.A.P.' and no given name, `M.A.P. Perera` and `L.E.M. Smith` would lose their given initials, and `Perez M.A.P.` under `FAMILY_FIRST` would read the degree. Those are initials-only and citation shapes, and the fielded corpora that would count them (orcid-researchers, patentsview-inventors, psc-individuals) compose each name given first from its filed boxes, so none writes initials after a family comma or after a single surname: their count, measured against master `cb5088a9` with `uv run python tools/differential/measure.py --base `, was 1 name moved (a Sri Lankan name whose initials are `M.A.P.`) against dof-signatures' 34 gaining the degree, and a fixed-against-broken count over those corpora does not measure the cost. Shipping them `default = false` under `locales.ES` would narrow who pays, not remove it, Spanish names being written as initials too (`Perez, M.A.P.`, `L.C. García`). #979 stays open. diff --git a/docs/design/decisions/H6-title-before-a-family-comma.md b/docs/design/decisions/H6-title-before-a-family-comma.md index a80421f56..a09310a17 100644 --- a/docs/design/decisions/H6-title-before-a-family-comma.md +++ b/docs/design/decisions/H6-title-before-a-family-comma.md @@ -32,10 +32,10 @@ Left out: `mo`, which 45 names write as Muhammad with its period at the head (`MO. IBRAR KHAN`, 42 of them Nepalese candidates). Bare `Mo` is mostly the Chinese and Korean name (ORCID family boxes 3,478, China 952; given 1,546, China 252), and a `given` reading would report a Mo Yan's given name as read in the file holding it (`Reading.languages`). `md` keeps its 2026-10-27 reading (decisions/indic-honorifics: `Md.` a title by the shape, an accepted cost; decisions/C3's 2026-11-02 #1017 entry declined its given reading because of its credential). The titles, the pack-only degrees on by default and the exclusions of `bc`, `mst` and `sig` are #1115's later batches. - 2026-11-06, #1115, the second batch — THE TITLES WITH NO NAME BEARERS, LISTED. From the same mining, the words that open names as titles and that no source counts as a name (under 100 US Census bearers, under 5 US SSA births a year, Wikidata 2 or fewer, `tools/name_usage.py --boxes` on 2026-11-06): `engr`, `adv` and the modifier `assist` (en.toml, beside `engineer`, `advocate` and `assistant`), `ir` and `drs` (mul.toml: the Dutch and Indonesian degrees, Hong Kong's and Malaysia's registered engineer, and the English plural of Dr), `excm` and `excma` (ca.toml) and `excmo` and `excma` (es.toml). Listing reaches what H2's shape could not: the bare spelling (`Engr Ahsen Ali` → title 'Engr', given 'Engr', middle 'Ahsen' before), a title run behind a listed title (`Prof dr ir Simon Peeters` → title 'Prof dr ir', given 'ir' before), the part after a comma, where a part of titles alone fixes no family boundary (rules/C8; `Esra Oz, Assist Prof` → title 'Assist Prof', given 'Esra', family 'Esra Oz' before), the given part's end after a family comma (`BAXTER, JENNIFER DRS.`) and H6's run (`Excm. Sr. Lloret Palol, Josep Antoni` → title 'Excm. Sr.', family 'Lloret Palol'). Measured with `uv run python tools/differential/config_diff.py diff --local all --committed --match '(?i)(^|[^\w])(engr|adv|ir|drs|assist|excm|excma|excmo)\b' '' default` on 2026-11-06 against `e76cdad3`: 246 of 662 matching names move, ClinicalTrials.gov officials 175 of them (`Name, Assist Prof`), every move read by eye, nearly all a title leaving a name field. The costs among them: four tokens gluing a title to a name word with a period take the word into the title, as `Dr.` already does (`Engr.Nurunnabi` → title 'Engr.Nurunnabi' and no name, `Engr.Wlla Al-Mhairat`, `Engr.Gamachu Busa Meskele`, `DAVIDSON, DRS.PAULA DMARY`); one credential run splits (`…, PGCert HE, Reg Engr, MIMechE` → title 'Dr Engr', suffix '…, Reg, MIMechE'); eleven ClinicalTrials.gov officials writing `Res. Assist` or `Res Assist.` read title 'Assist', suffix 'Res.', as the listed `Res. Asst.` already did, and two writing it glued (`Res.Assist.`) move whole from suffix to title; and one ORCID record holds three names in a list. A lone `Assist` reads as `Asst` does (rules/H9): a title opening a name only before a head title (`Assist John Smith` keeps given 'Assist'), and a title alone ending a name or after a comma (`John Smith Assist.` → title 'Assist.'). Left out, each borne as a name: `eng` (US Census 2010 10,682 surname bearers; ORCID given boxes 468, Malaysia 63, Singapore 49), `er` (ORCID family boxes 1,087), `doc` (US SSA 1,391 births, Wikidata 130 given names: Doc Rivers), `ven` (Wikidata 448 given names, ORCID family boxes 214) and `em` (US Census 885). Their dotted spelling opening a name stays a title by H2's shape. The Spanish and Czech titles the mining found unlisted (`Licda.`, `Gral.`, `Tte.`, `RSDr.`, `plk.`) wait for the batch that decides which pack-only titles the default reads, with those listed `default = false` already (`ThDr.`, `MUDr.`, `Lic.`), since listing them so would move no default parse. -- 2026-11-07, #1129 — #1115's CANDIDATES CARRIED FORWARD: THREE LISTED BY DEFAULT, ONE FOR THE CZECH PACK, THE REST LEFT OUT. Each candidate's bearers were counted with `uv run python tools/name_usage.py --boxes` and its incidence with `uv run python tools/vocab/word_report.py --rank` (2026-11-07, against `54318d78`). Listed by default: `sk` (bn.toml), Sheikh written short, as a `given` reading with `same_as`, so `Sk. Monirul Islam` reads given 'Sk.' as `Sheikh Ahmed Khan` reads given 'Sheikh' since #912 (title 'Sk.', given 'Monirul' before), no source counting it as a name of its own and ORCID's given boxes holding it 1,008 times (India 351, Bangladesh 119), some of them the initials S. K.; `biól` and `mgtr` (es.toml), Mexico's biologist and the Andean magíster, which no source counts as a name. Measured with `uv run python tools/differential/config_diff.py diff --local all --committed --match '(?i)(^|[^\w])(sk|bi[oó]l|mgtr|mjr|mtr|lcp|mvz|act|map)\b' 'expr:Parser(lexicon=Lexicon.default().remove("biól", kind="academic").remove("mgtr", kind="academic").remove("sk", kind="given"))' default` (the comparator the default without the three readings; `mjr` was also removed in the run, before it went to the pack): 20 of 258 matching names move, every one `sk` from the title to the given name (`Mr Sk. Mazamel Islam`, `Dr. Sk. Md. Masudul Ahsan`, `Sk. Nahid`), and in two of them a `Md.` behind it from the title to the middle name, since H2's shape chains only from the head (`Sk. Md. Atiqur Rahman` → given 'Sk.', middle 'Md. Atiqur', title 'Sk. Md.' before): the #1115 entry's `Md.` title by the shape holds where it opens the name or follows a title; `biól` and `mgtr` move none, their corpus spellings being the dotted head H2's shape already read. `local_agreement.py --base` on a checkout of `54318d78`: ORCID 12 records closer to the boxes and none further, 6 changed (the filer typed the whole name in the given box), PSC 1 closer (`Mr Sk. Mazamel Islam`, `Sk.` typed in the forename box). +- 2026-11-07, #1129 (its reason for leaving `lcp` out, that `L.C.P.` reads as initials whatever the vocabulary says, is not so: a run listed with its stops reads as that word, rules/T7's vocabulary Except; decisions/H10's 2026-11-20 #979 entry records why the dotted degrees were declined all the same) — #1115's CANDIDATES CARRIED FORWARD: THREE LISTED BY DEFAULT, ONE FOR THE CZECH PACK, THE REST LEFT OUT. Each candidate's bearers were counted with `uv run python tools/name_usage.py --boxes` and its incidence with `uv run python tools/vocab/word_report.py --rank` (2026-11-07, against `54318d78`). Listed by default: `sk` (bn.toml), Sheikh written short, as a `given` reading with `same_as`, so `Sk. Monirul Islam` reads given 'Sk.' as `Sheikh Ahmed Khan` reads given 'Sheikh' since #912 (title 'Sk.', given 'Monirul' before), no source counting it as a name of its own and ORCID's given boxes holding it 1,008 times (India 351, Bangladesh 119), some of them the initials S. K.; `biól` and `mgtr` (es.toml), Mexico's biologist and the Andean magíster, which no source counts as a name. Measured with `uv run python tools/differential/config_diff.py diff --local all --committed --match '(?i)(^|[^\w])(sk|bi[oó]l|mgtr|mjr|mtr|lcp|mvz|act|map)\b' 'expr:Parser(lexicon=Lexicon.default().remove("biól", kind="academic").remove("mgtr", kind="academic").remove("sk", kind="given"))' default` (the comparator the default without the three readings; `mjr` was also removed in the run, before it went to the pack): 20 of 258 matching names move, every one `sk` from the title to the given name (`Mr Sk. Mazamel Islam`, `Dr. Sk. Md. Masudul Ahsan`, `Sk. Nahid`), and in two of them a `Md.` behind it from the title to the middle name, since H2's shape chains only from the head (`Sk. Md. Atiqur Rahman` → given 'Sk.', middle 'Md. Atiqur', title 'Sk. Md.' before): the #1115 entry's `Md.` title by the shape holds where it opens the name or follows a title; `biól` and `mgtr` move none, their corpus spellings being the dotted head H2's shape already read. `local_agreement.py --base` on a checkout of `54318d78`: ORCID 12 records closer to the boxes and none further, 6 changed (the filer typed the whole name in the given box), PSC 1 closer (`Mr Sk. Mazamel Islam`, `Sk.` typed in the forename box). For the Czech pack: `mjr` (cs.toml, `default = false`), the rank, since an ORCID researcher in Sri Lanka files `MJR` as the given name, initials, which a default title reading took (1 record further from the boxes); the class #1115's pack batch kept off (`MgA`, `GS`). Excluded, each also a credential written after names, which a title reading after a comma takes from the suffix or the given name (rules/C2 past a second comma, rules/C8 in the part after the first, and a lone word ending the given part after a family comma), measured under `plain:ES` against the same command run in both trees (`--readings`, compared line by line): `mtr` (5 ClinicalTrials.gov officials, `Shana McCormack, MD, MTR` → title 'MTR', and a one-comma `John Smith, MTR` alike; against them 5 UK PSC names opening with a bare `Mtr`, which their filers typed in the title box, read the title, gains a Spanish choice is not the place for), `act` (`Terry L Grindstaff, PhD, PT, ACT`) and `map` (also an English word and a filed given name, FEC's `SAN, MAP` → title 'MAP' with no given name; `Jorge Luis Loáiciga Gutiérrez, MAP, Lic` → title 'PhD. MAP Lic' from the part after the first comma; 1 of its 3 moves the title meant). Not listed, with nothing to gain: `lcp` and `mvz`, because Mexico's DOF signatures write them as `L.C.P.` and `M.V.Z.`, which read as initials whatever the vocabulary says, and their dotted head `LCP.` is a title by H2's shape already; listed in the Spanish pack, they moved no corpus name. Nor the unaccented `biol`, written after a comma as the field of a diploma (`Dipl. Biol.`, ClinicalTrials.gov officials 11), the decisions/H6 2026-11-06 Diplom entry's shape. - Left out as borne names: `sen` (US Census 2010 3,059; ORCID given boxes 2,337; and `Sen.` ending a name is also Senior), `ku` (US Census 4,888; Wikidata 2,396 family names), `cor` (nam_dict band 6 in the Netherlands; Wikidata 260 given names), `prim` (US Census 2,019; US SSA 245 births), `dip` (US Census 337; nam_dict band 2 in India and Sri Lanka), `lae` (US Census 144; nam_dict band 3), `med` (ORCID given boxes 232, Med being Mohamed written short) and `jan`. Left out, ambiguous or too rare to weigh: `sh` (Sheikh, and India's Shri, which hi.toml refuses as a title because it opens given names), `kh` (several names it shortens), `th` and `ph` (2 names each; `Ph.` also opens a spaced `Ph. D.`), `rr` (ORCID given boxes 195, initials), `ass` (`Ass. Prof.` reads as a title through H2's chain already) and `akad` (needs `Akad. mal.` as a phrase, 10 names). `mt` stays out, and no issue tracks it: a particle reading would need the period, which no reading can require, and the property that would let one is not worth building for the one corpus name it would fix (#1129's measurement: 6 corpus names write `Mt.`, 1 of them a surname head, `Gregory G. Mt. Pleasant`). A caller whose names hold it adds a particle reading to a `Lexicon` of their own; reconsider if a new corpus writes it more often. + Left out as borne names: `sen` (US Census 2010 3,059; ORCID given boxes 2,337; and `Sen.` ending a name is also Senior), `ku` (US Census 4,888; Wikidata 2,396 family names), `cor` (nam_dict band 6 in the Netherlands; Wikidata 260 given names), `prim` (US Census 2,019; US SSA 245 births), `dip` (US Census 337; nam_dict band 2 in India and Sri Lanka), `lae` (US Census 144; nam_dict band 3), `med` (ORCID given boxes 232, Med being Mohamed written short) and `jan`. Left out, ambiguous or too rare to weigh: `sh` (Sheikh, and India's Shri, which hi.toml reads as a title only under a Hindi choice because it opens given names), `kh` (several names it shortens), `th` and `ph` (2 names each; `Ph.` also opens a spaced `Ph. D.`), `rr` (ORCID given boxes 195, initials), `ass` (`Ass. Prof.` reads as a title through H2's chain already) and `akad` (needs `Akad. mal.` as a phrase, 10 names). `mt` stays out, and no issue tracks it: a particle reading would need the period, which no reading can require, and the property that would let one is not worth building for the one corpus name it would fix (#1129's measurement: 6 corpus names write `Mt.`, 1 of them a surname head, `Gregory G. Mt. Pleasant`). A caller whose names hold it adds a particle reading to a `Lexicon` of their own; reconsider if a new corpus writes it more often. - 2026-11-06, #1115, the Diplom degrees (its accepted cost of a degree glued to its field ending a name, and the hyphenated degree it left to #1116, superseded by decisions/H5's 2026-11-06 #1116 entry, which reads both as the title) — `dipl` IS LISTED ALONE, AND THE SEPARATOR MATCH #1115's COMMENT PROPOSED IS DECLINED. The German, Czech and Slovak diploma degree is written before its field, which varies (`Dipl.-Ing.`, `Dipl.-Psych.`, `Dipl.-Kfm.`, `Dipl.-Kffr.`, `Dipl.-Phys.`, `Dipl.-Pol.`, `Dipl.-Soz.`, `dipl. um.`, `dipl.ek.`, over the 160 corpus names in which `(?i)(?`: opensanctions-parliaments moves 4 members of Egypt's House, each from middle 'عبد' to family 'عبد القوى' or 'عبد الهادى', all four right; no other local corpus moves. The issue's title example is no miss (`الدكتور على حسن` already reads the title), and the completions it names that no spelling lists (`ربه`, `الجيد`) are a question of which words to list, left to the issue. diff --git a/docs/design/decisions/W1-unspaced-cjk-division.md b/docs/design/decisions/W1-unspaced-cjk-division.md index 21f4c2d41..7d70c53fe 100644 --- a/docs/design/decisions/W1-unspaced-cjk-division.md +++ b/docs/design/decisions/W1-unspaced-cjk-division.md @@ -17,6 +17,7 @@ - A pack holding every ranked surname, a stricter divide-after-the-first-character mode, the unlicensed or copyrighted sources and the unattested Hundred Family Surnames compounds are declined — 2026-10-18 #695. - Six simplified forms Wikidata's labels do not give a ranked traditional surname (买盖篮诸谌芈, of 買蓋籃諸諶羋) are entered by hand in `tools/zh_surnames.py`'s `BY_HAND`, each a fact the PRC's character standards state, so `谌龙` and `芈月` under `locales.ZH` read family '谌' and '芈', as 2.5.0 through 3.0.1 read them; 厐, which no standard writes, stays out, so `厐建国` reads family '厐建国' — 2026-11-16 #1445. - A name the interpunct divides stands division down, vocabulary and segmenter alike (decisions/T3, #298), and rules/W1 states it as an Except rather than an Accepted cost: `安东尼·陈志明` under `locales.ZH` → family '陈志明', given '安东尼' — 2026-10-20 (Derek), #761. +- `어` and `라` are listed past the census cut, read as Korean surnames at the cost of a foreign name in hangul opening with either (`라르스` → family '라'); a caller removes one from `Lexicon.surnames` — 2026-11-20 #1215. Elsewhere: a segmenter is asked only of a name its writer left undivided, decisions/W3's 2026-08 entry; the Japanese surnames and married doubles kept out of the ZH list, decisions/vocabulary-exclusions' #695 lines. @@ -48,6 +49,7 @@ Open: [#981](https://github.com/derek73/python-nameparser/issues/981) (a mainlan - 2026-11-08 #1193 — `ja_segmenter`'s adapter declines a token with no Han character. namedivider divides by kanji statistics, and a token with none gives it nothing to read: its `kanji_feature` path returned the first character as the family every time, so `あいさわいちろう` read family 'あ', given 'いさわいちろう', and `なかやめぐ` family 'な', each with a SEGMENTATION report (measured on master 51d36a31 with namedivider-python 0.4.x). The issue measured (2026-11-08) the House of Representatives' member list (shugiin.go.jp, 457 members, each with the family and given readings in hiragana): `BasicNameDivider` cut all 457 unspaced readings after the first character, scoring 0.11 to 0.33, while it divided the same members' unspaced kanji names right in 450 of 457. One member writes her name wholly in hiragana (`なかや めぐ`), so the shape is a name's as well as a reading's. The decline is a fact about the content, as the repertoire and 〆 declines are, and so declines rather than raising (root AGENTS.md's segmenter contract). Its reach is every token with no Han character, hiragana and katakana mixed included, not only a wholly hiragana one: what makes the answer worthless is the missing kanji, whatever kana stand in their place. Han is the script table's, which holds 々 and 〆, so kana beside 々 (`さ々き`, a spelling names write with ゝ instead) still reaches namedivider. And a wholly katakana token never reaches the adapter, KATAKANA being in no activation set (#594). A token holding a kanji is passed on unchanged: `山田たろう` divides at the kana boundary by namedivider's rule path, scored 1.0, and is right. The decline also retires a consequence pinned since #272: a lone hiragana token, which the whole-name presumption gated in, was cut `みなみ` → 'み' + 'なみ' with a SEGMENTATION report, wrong where the writer meant the given name alone; it now stays whole, as with no segmenter. The kanji version of the presumption (`田中` → '田' + '中') stands, namedivider having kanji to read there. - 2026-11-12 — THE SIMPLIFIED FORMS `tools/zh_surnames.py` ADDS COME FROM WIKIDATA'S FAMILY-NAME ITEMS, NOT UNIHAN'S VARIANT TABLE. (Six of its seven forms restored by the 2026-11-16 #1445 entry below, so `谌龙` divides again.) A form gains the one simplified form that the simplified-Chinese labels of the family-name items labelled with it give; 7 of the 19 forms Unihan alone had added are not attested so (买厐盖篮芈诸谌) and left the block, so `谌龙` under `locales.ZH` reads family '谌龙' where it read family '谌', given '龙', while `諶龍` still divides. Measured over 322,895 corpus names holding a Han character: 9 moved, all transliterated foreign names the pack had cut after 盖. The source, the rule and the measurement are decisions/shipped-data-licences' 2026-11-12 UNIHAN REPLACED. - 2026-11-16 #1445 — SIX OF THE SEVEN SIMPLIFIED FORMS ARE ENTERED BY HAND, AS FACTS THE PRC'S CHARACTER STANDARDS STATE. 买, 盖, 篮, 诸, 谌 and 芈 join the block beside 買, 蓋, 籃, 諸, 諶 and 羋 through `tools/zh_surnames.py`'s `BY_HAND`, applied after the Wikidata rule and only where the data gives a selected form none; 厐 stays out, no standard writing it. The block holds 323 forms where it held 317. `谌龙`, `盖丽丽`, `芈月` and every other name opening with one of the six, in either script, read as 2.5.0 through 3.0.1 read them; `厐建国` stays whole where those releases divided it, and `龎建國` divides. The cost returns with 盖 and 买: a transliteration written without the 间隔号 that opens with either is cut (`盖尔哈尔德` → family '盖', `买买提` → family '买'), while `买买提·艾力` stays undivided under the interpunct Except. The sources per pair, the licence footing and the measurement are decisions/shipped-data-licences' 2026-11-16 #1445 entry. +- 2026-11-20 #1215 — `어` AND `라` JOIN THE KOREAN SURNAMES, HANGUL BEING READ AS KOREAN. Both are borne surnames past the census cut, and an unspaced name opening with either stayed whole (`어수선`, `라미란` → family whole), where it now divides (family '어', given '수선'). Decided 2026-11-20: hangul is read as Korean, as this file's 2026-07-27 #271 entry decided, so a Korean name is read right at the cost of a foreign name written in hangul, a cost the default already carries for every listed surname (`김벌리 스미스` reads family '김'). `라` costs more than most, few native words opening with ㄹ, so the foreign names opening with it are a larger share of the hangul names that do. Measured 2026-11-20 against master `cb5088a9` (a `git archive` export) with `uv run python tools/differential/measure.py --base `: jrc-names moves 15 spellings, every one a foreign name written in hangul (14 opening with `라`, 1 with `어`). 14 read wrong before as well, hangul reading family first and so putting the given name in the family field, and now also divide their first word (shape: `라르스 한센` family '라르스' → family '라', given '르스'); 1, a regnal name of two words (shape: `라마 9세`), read the given name right and now divides it. opensanctions-parliaments moves 1, a member surnamed `어`, now right. orcid-researchers moves 1, a Korean given name opening with `어` written before the surname, read wrong before (given and family swapped) and wrong after; no other local corpus moves. A caller whose data holds such names takes the surname out of the list: `dataclasses.replace(lexicon, surnames=lexicon.surnames - {"라"})`, which docs/east-asian.rst shows under "Teaching the splitter a surname". The two join `config/_ko_surnames.py` past the census rows, at the tail where the module's comment asks for additions. Declined: diff --git a/docs/design/decisions/indic-honorifics.md b/docs/design/decisions/indic-honorifics.md index c6d4b2a93..1add6e800 100644 --- a/docs/design/decisions/indic-honorifics.md +++ b/docs/design/decisions/indic-honorifics.md @@ -22,7 +22,7 @@ Closes #346, #344 and #343 as one bundle: each CLASS is decided once, and each s - `sushri` is a title only inside a title phrase under the plain Hindi choice and a title wherever one is read under a strict one: hi.toml's salutation is `default = false` and or.toml declares the Odia given name, so `parser_for(locales.HI)` reads `Sushri Sangita Behera` given 'Sushri' (and `Her Excellency Sushri Sangita Behera` title 'Her Excellency Sushri', rules/H9) and `parser_for(locales.HI, strict=True)` title 'Sushri' — 2026-11-03 (Derek), #345. - `श्री` stays a salutation by default, the Hindi, Marathi and Konkani Mr.; the Nepali given-name element is `locales.NE`'s reading (ne.toml, `default = false`), so `श्री कृष्ण श्रेष्ठ` reads title 'श्री' by default and under the Nepali choice `श्री` is a title only inside a title phrase and elsewhere a name word placed by position (given 'श्री' in the default order), an accepted cost recorded in rules/H9 — 2026-11-03 (Derek), #345/#870. -Elsewhere: the bundle's class-level refusals are recorded under decisions/vocabulary-exclusions, not here: the Latin forms of the Indic titles belonging to the opt-in packs of #345 (2026-09-06, #344), the native spelling shipping alone where a transliteration collides with real names (sri/shri, sant, pandit), the ban on the spaced trailing set becoming glued honorifics, and the per-word title refusals (ঠাকুর/ठाकुर, कुमारी/কুমারী, बेगम/বেগম, শেখ/शेख, आचार्य, राजा/रानी), each an `excluded` entry (`uv run python tools/vocab/query.py --excluded title`). +Elsewhere: the bundle's class-level refusals are recorded under decisions/vocabulary-exclusions, not here: the Latin forms of the Indic titles belonging to the opt-in packs of #345 (2026-09-06, #344), the native spelling shipping alone where a transliteration collides with real names (sri, sant, pandit, and shri by default, a Hindi choice turning its romanization on since decisions/vocabulary-model's 2026-11-20 #1192 entry), the ban on the spaced trailing set becoming glued honorifics, and the per-word title refusals (ঠাকুর/ठाकुर, कुमारी/কুমারী, बेगम/বেগম, শেখ/शेख, आचार्य, राजा/रानी), each an `excluded` entry (`uv run python tools/vocab/query.py --excluded title`). Open: #514 (whether the Tibetan prefix titles Tulku, Khenpo, Geshe, Kyabje and Jetsun fold like `Lama Zopa`); #1469 (whether a choice of Bengali or Urdu reads `hafiz`, `hafez`, `haji` and `maulana` as titles; no reading is written for either). diff --git a/docs/design/decisions/salutation-titles.md b/docs/design/decisions/salutation-titles.md index 52b8a1efa..3942d1f50 100644 --- a/docs/design/decisions/salutation-titles.md +++ b/docs/design/decisions/salutation-titles.md @@ -84,3 +84,6 @@ Elsewhere: `justice` and `marshal`, excluded here as common leading-position nam - **MEASURED** (`config_diff.py diff default plain:MS`, 2026-11-19): my-candidates 117 of 3,077 names move, each a word above becoming the title (`USTAZ` 69, `CIKGU` 41, `USTAZAH` 4, `CIK` 2, `PUAN` 1; accepted: the two `CIK GU`, cikgu written in two words, reading given 'GU', and `PUAN SRI BIBI SHARLIZA`, the wife of a Tan Sri, reading given 'SRI' until `Puan Sri` is a title, #1180); `opensanctions-parliaments` 2 of 26,400, `CIK UJANG` and Indonesia's `PUAN MAHARANI`, the cost of choosing the pack for Indonesian names; the committed corpora none and ClinicalTrials.gov 1 of 713,175 (`Puan Jue`). Scored against the boxes of ORCID's, PatentsView's and Companies House's Malaysian, Indonesian, Singaporean and Vietnamese records, no group's share moves. - **WEIGHED AND KEPT: positional H1, and `after_given` on `puan` and `cik`.** A Malay title addresses by the given name, so a title and one name word could read the word as the given name (`addresses = "given"`, as th.toml's titles do); it is not set, as `encik`, and my.toml's `u` and `daw` set it not, `Cikgu Zakri` reading family 'Zakri' by rules/H1, and setting it on `encik` would move the default. `puan` and `cik` carry `after_given`, as `encik` and hi.toml's salutations do, so `Ahmad, Siti Puan` reads title 'Puan' under the pack (rules/H8). - **`Abdul`'s join (#1464)** is left to the change building it; once it lands as a property of the bound word, an ms.toml reading of `abdul` written `default = false` would let this pack turn it on, copying every other file's vocabulary reading of the word with it, as my.toml's `lt` copies its credential (decisions/vocabulary-collisions, the 2026-11-19 #1483 entry). +- 2026-11-20 #966 — RANKS WRITTEN WITH A HYPHEN ARE TITLES: EIGHT, THEN FIVE MORE ON REVIEW. `vice-admiral`, `rear-admiral`, `vice-marshal`, `air-marshal`, `lieutenant-colonel`, `lieutenant-general`, `major-general` and `brigadier-general` join en.toml as `military` readings, `co-chair` the precedent for an entry holding a hyphen: tokenize keeps a hyphenated word whole, so `Air Vice-Marshal Ann Reed` read given 'Air', middle 'Vice-Marshal Ann', the spaced rank's phrase never reaching it, and reads title 'Air Vice-Marshal' now, the modifier `air` finding its head after it (rules/H9). Each reads as its spaced twin does at the head, after a family comma and after a second comma, under all three orders, save where the twin is two words: a bare rank ending a name stays a name word either way (`John Smith Vice-Admiral` keeps it one family word), and after a second comma `vice-marshal`, `air-marshal` and `major-general` report no comma fork where their spaced twins do, the twin holding a title that may be a given name (`marshal`, `major`, rules/H9) and the hyphenated word holding none (`Smith, John, Major General` reports `comma-structure`, `Smith, John, Major-General` nothing). None of the eight is borne as a name in any source tools/name_usage.py reads. Measured 2026-11-20 against master `cb5088a9` with `uv run python tools/differential/measure.py --base `: govuk-people moves 6, every one `Air Vice-Marshal` gaining the title, and no other local corpus moves (ukec-individuals 0 of 15,214). DECLINED: splitting a hyphenated word at its hyphen to find a title in it, which would reach every hyphenated name holding a title word (`Smith-Major`) and every hyphenated rank the vocabulary does not list; listing the ranks reaches the shape written, and an unlisted one stays a name word, as before. + - **Five more, added on the PR's review** (2026-11-20): `field-marshal`, `lieutenant-commander`, `wing-commander`, `chief-marshal` (`Air Chief-Marshal`) and `sergeant-major`, the British ranks the review found still read as name words. Each reads as its spaced twin does at the head, after a family comma and after a second comma, save the same two shapes: a bare rank ending a name, and after a second comma no comma fork where the twin holds a title that may be a given name (`marshal`, `wing`, `major`). None is borne as a name in any source tools/name_usage.py reads, and none moves a name in govuk-people (0 of 6,021) or ukec-individuals (0 of 15,214), measured against the eight with `uv run python tools/differential/snapshot.py --local --base `. + - **Where no twin is promised:** a rank that is the whole part before a family comma (`Field-Marshal, Ann` gives family 'Field-Marshal', `Field Marshal, Ann` title 'Field', family 'Marshal'), a rank written alone, and a rank ending a name with a full stop (`John Smith Wing-Commander.` gives title 'Wing-Commander.', the spaced twin title 'Commander.', family 'Wing') read otherwise than the spaced words, which split there; the first eight read the same way (the PR's review, 2026-11-20). diff --git a/docs/design/decisions/vocabulary-exclusions.md b/docs/design/decisions/vocabulary-exclusions.md index b4797218b..1e45030a9 100644 --- a/docs/design/decisions/vocabulary-exclusions.md +++ b/docs/design/decisions/vocabulary-exclusions.md @@ -43,7 +43,7 @@ Excluded (DEFAULT_NICKNAME_DELIMITERS): Excluded (given-name titles and post-nominals — the 2026-07-19 transliteration deferrals, each living in a data-module comment until now): -- The title refusals are data since #750 (2026-10-19): Arabic bare سيد/شيخ/أمير/سلطان in ar.toml (and the abbreviation د. until decisions/script-properties' 2026-11-19 #1149 entry listed it, Arabic script writing no initials for it to swallow), Greek bare κ in el.toml, Latin sri/shri, sant and pandit in hi.toml, and Latin mst in bn.toml, each an `excluded` entry with its reason (mst's re-reasoned 2026-11-06, #1130: it is typed as the given name, as Md is, decisions/indic-honorifics) (`uv run python tools/vocab/query.py --excluded title`). Two class-level rules stand behind them. A transliteration collides with real names where the native spelling cannot, so the native spelling ships alone (sri/shri, sant, pandit; mst was listed here until #1130 found no name it collides with, and is refused for another reason). The bare Arabic سيد/شيخ/أمير/سلطان are given names; of their article forms only الشيخ ships, and السيد, الأمير and السلطان were never vetted, so the refusal decides nothing about them. And a single-letter abbreviation is the initial trap: the edge-period fold leaves bare د or κ, which matches an initial, so `Κ. Παπαδόπουλος` would read title `Κ.` with an empty given, and Latin titles hold no bare single letter for the same reason. That is decided per word, not per script, save where a script-property row says the script writes no initials, as Arabic's has since decisions/script-properties' 2026-11-19 #1149 entry: the Bengali ড ships, vocabulary beating the initial reading on purpose (decisions/indic-honorifics), and pays exactly that cost (`ড. রহমান` reads an empty given). +- The title refusals are data since #750 (2026-10-19): Arabic bare سيد/شيخ/أمير/سلطان in ar.toml (and the abbreviation د. until decisions/script-properties' 2026-11-19 #1149 entry listed it, Arabic script writing no initials for it to swallow), Greek bare κ in el.toml, Latin sri, sant and pandit in hi.toml (and shri until decisions/vocabulary-model's 2026-11-20 #1192 entry made it a `default = false` salutation a Hindi choice turns on), and Latin mst in bn.toml, each an `excluded` entry with its reason (mst's re-reasoned 2026-11-06, #1130: it is typed as the given name, as Md is, decisions/indic-honorifics) (`uv run python tools/vocab/query.py --excluded title`). Two class-level rules stand behind them. A transliteration collides with real names where the native spelling cannot, so the native spelling ships alone (sri, sant, pandit, and shri by default; mst was listed here until #1130 found no name it collides with, and is refused for another reason). The bare Arabic سيد/شيخ/أمير/سلطان are given names; of their article forms only الشيخ ships, and السيد, الأمير and السلطان were never vetted, so the refusal decides nothing about them. And a single-letter abbreviation is the initial trap: the edge-period fold leaves bare د or κ, which matches an initial, so `Κ. Παπαδόπουλος` would read title `Κ.` with an empty given, and Latin titles hold no bare single letter for the same reason. That is decided per word, not per script, save where a script-property row says the script writes no initials, as Arabic's has since decisions/script-properties' 2026-11-19 #1149 entry: the Bengali ড ships, vocabulary beating the initial reading on purpose (decisions/indic-honorifics), and pays exactly that cost (`ড. রহমান` reads an empty given). - Ottoman post-nominals باشا/بك/أفندي — surname collisions. - Hebrew bare רב (an ordinary word, "many") and בר (Bar is a common modern Israeli given name) — deferred, #269's territory. - The Latin forms of the Indic titles belong, if anywhere, to the opt-in packs of #345 (2026-09-06, #344): TITLES has no ambiguous subset to express a partial answer in. diff --git a/docs/design/decisions/vocabulary-model.md b/docs/design/decisions/vocabulary-model.md index ceeb8aac0..719e060fd 100644 --- a/docs/design/decisions/vocabulary-model.md +++ b/docs/design/decisions/vocabulary-model.md @@ -15,7 +15,7 @@ The vocabulary was a set of base sets plus marker subsets (`particles` and `part - `es` turns on `doña`, the courtesy title that leads a Spanish name with no complement and is a family name too, the other titles phase 3g turned on being read by default since 2026-11-06 #1115 (below); `don`, `dona` and `dom` are excluded, the packs included, names opening with each as a name more often than as the title; `maestro`, a family name whose form of address is written `Mtro.`, is excluded too, and so is `h`, the hijo an initial is written as; `sr` keeps a generation reading beside its salutation in both files, so a choice leaves it the dual position decides; no connective continues a title run, the shape unwritten in name data, and the office titles that take a complement stay out — 2026-10-30 #753, phase 3g. - `es` turns on `maestra` too, the form of address written out, `maestro` staying excluded; `profesor` and `profesora`, which phase 3g turned on, are read by default since 2026-11-03 (decisions/salutation-titles) — 2026-11-03 #980. - The titles phase 3f, phase 3g and #1108 wrote `default = false` for neutrality rather than for a collision are read by default, 27 words, 36 readings, the nine doctorates being written in cs.toml and sk.toml both: es `lic`, `licenciado`, `licenciada`, `lcdo`, `lcda`, `ingeniero`, `ingeniera`, `arq`, `mtro`, `mtra`, `doctora`; pt `doutor`, `doutora`, `professora`, `profa`; cs and sk `judr`, `mudr`, `phdr`, `rndr`, `mvdr`, `mddr`, `paeddr`, `pharmdr`, `thdr`; vi `ths`, `đbqh`, `dbqh`. A choice still turns on the titles a name or initials spell: es `maestra` and `doña`, cs `mga` and `bca`, `pan`, `mgr`'s degree, vi `gs`, `ts` and `pgs` — 2026-11-06 #1115. -- Of the romanized titles a pack's phase lists, one whose native spelling is a default title turns on unless, counted in persons and pooled across every population measured, names open with it more often than it opens one as the title; a spelling outside the phase's list (`Shreemati`, `Srimati`) stays open until a phase writes it as a reading: `hi` turns on `smt`, `shrimati` and `shriyut`, `bn` `smt`, `shrimati` and `adhyapak` (`shriyut` with no bearer anywhere, `adhyapak` with family-name bearers only, every one where the title claim, acting at the head, does not reach), while `shri`, opening given names in every population measured, stays excluded, and `sushri`, an Odia given name, is a `default = false` salutation in hi.toml with the Odia name declared in or.toml, so the plain `hi` choice, made for data that holds those names, reads it as a title only inside a title phrase and a strict one as the title (decisions/indic-honorifics, 2026-11-03 #345/#870) — 2026-10-30 #753, phase 3e. +- Of the romanized titles a pack's phase lists, one whose native spelling is a default title turns on unless, counted in persons and pooled across every population measured, names open with it more often than it opens one as the title; a spelling outside the phase's list (`Shreemati`, `Srimati`) stays open until a phase writes it as a reading: `hi` turns on `smt`, `shrimati` and `shriyut`, `bn` `smt`, `shrimati` and `adhyapak` (`shriyut` with no bearer anywhere, `adhyapak` with family-name bearers only, every one where the title claim, acting at the head, does not reach), while `shri`, opening given names in every population 3e measured, stayed excluded until 2026-11-20 #1192 made it a `default = false` salutation in hi.toml, measured on India's Lok Sabha roll, the population a Hindi choice is made for, where it is the salutation (that entry weighs the reading by the callers who choose the pack; counted in persons and pooled, the roll's 1,522 members with a spelling that opens with the salutation outnumber the about 220 bearers 3e and hi.toml record, so this criterion turns it on too, as that entry counts), `sri` staying excluded, and `sushri`, an Odia given name, is a `default = false` salutation in hi.toml with the Odia name declared in or.toml, so the plain `hi` choice, made for data that holds those names, reads it as a title only inside a title phrase and a strict one as the title (decisions/indic-honorifics, 2026-11-03 #345/#870) — 2026-10-30 #753, phase 3e. - A language pack is a choice of languages on `Locale.languages` selecting which readings compile, a tag choosing its own file and its ancestors', and a reading index, loaded on its first lookup, carries the languages to run time; strict is file-strict, the chosen files, `mul.toml` and native-script words' readings only, `und.toml` not among them, so it needs no 3i; third-party language files are deferred — 2026-10-27 #753 (Derek); 2026-10-29 #753, phase 3a (Derek); 2026-10-29 #753, phase 3b; 2026-10-30 #753, file-strict; 2026-11-02 #1005 (Derek); 2026-11-07 #1148. - A strict choice is `parser_for(..., strict=True)` over the whole choice, filtering the base's readings as a plain choice does, the caller's own edits applying after it, and a chained call keeping its base's strictness unless it passes `strict`, an explicit `False` on a strict base raising and an explicit `True` making a plain base's choice strict; a strict call whose packs choose no language raises; a strict choice accepts a tag whose file holds no reading, which a plain one refuses as changing nothing; a bare choice has no constructor, no `locales.choose`; and the words strict ungates are derived against the plain choice of the same tags and held to a reviewed set by a test — 2026-10-31 #753, phase 3j; 2026-11-02 #754, sub-phase 4i-c. - A choice is matched without regard to case, a tag whose file does not exist selects its ancestors' (`pt-AO` selects `pt`; a region's file holding a `[rules]` table and no reading selects its language's the same way, as `pt-PT.toml` did from decisions/O6's 2026-11-19 entry until #1189 gave it readings), `mul` and `und` are no language to choose, and a vocabulary reading turned on also prefers (a name reading never does, decision 15), so `de`'s generation `i` drops `ca`'s and `pl`'s conjunction under a `de` choice; the `Lexicon` records its choice, so that a choice chained through `base=` unions with the base's, and a caller's own edits apply after the choice, plain or strict, in the order written, a pack's fragment joining before the caller's lexicon — 2026-10-29 #753, phase 3b; 2026-11-02 #754, the `Lexicon` surface (Derek); 2026-11-02 #754, sub-phase 4i-c. @@ -409,7 +409,7 @@ Open: [#1145](https://github.com/derek73/python-nameparser/issues/1145), the dis - **The default does not move.** The build reports `_compiled.py` current; the committed snapshot gained the three names rules/S11's new examples add to the rules corpus and no existing entry moved; `snapshot.py --local tse-donors --base` against master `40675146` matches the base. - **What each choice moves,** measured 2026-10-30 on `40675146` plus this change, Python 3.11. Committed corpora (`snapshot.py --languages TAG`): `ga` and `gd` 4 entries each, every one `mc` (`John Smith MC` family `MC`, where the default reads the Military Cross), the prefer of the phase 3b entry's turning-on bullet on the `mc` both files already held; `pt-BR` 40, `pt`'s 38 (1 held only by `corpus_cldr.jsonl`) and the two of rules/S11's new examples that read `SB` (`JOSE CARLOS SILVA SB`, `Ana SB`). CLDR's locale view (`cldr_agreement.py`, `ga`, `gd` and `pt` mapped to the packs, CLDR's `pt` being Brazilian): `ga` 14/24, `gd` 15/24, `pt` 17/24 renderings agreeing with and without the pack, recorded. Fielded registers, scored over every record holding a word the choice changes (`local_agreement.py`'s `read` under each parser): PSC, `ga` 4 fixed (`Clodagh Nic Lochlainn`, `Orlaith Mhic Mhathuna`, and `Damien Patrick Mc` by the `mc` prefer) and 1 broken (`Nicholas Nic Rawlings Limited Rawlings`, a company filed as a person), `gd` 3 and the same 1; ORCID, `ga` 24 fixed and none broken over every country (23 in Ireland and Great Britain, `Pauline Uí Dhuibhir`, `Éimí Mhic an Ridire`), `gd` 20 and none (19 in Ireland and Great Britain). `pt-BR`'s moves there are all `pt`'s: PSC 12 broken, each a trailing `Sr` read as the title Senhor (`Gary Holloway Sr` family `Sr`), ORCID 21 fixed (the one-case `e`) and 11 broken. - **Open for 3g:** a `pt` choice prefers `pt.toml`'s title `sr` (Senhor) over English's generation, so a trailing `Sr` reads as a title or the family name under `pt` and `pt-BR` (PSC's 12 above); whether the generation survives a Portuguese choice is 3g's, which owns `pt`'s titles. **Accepted: under the pack a written S.B. degree reads as Sobrinho's generation.** In ctgov-officials (`snapshot.py --local ctgov-officials --languages pt-BR --base`, against `--languages pt`), 17 names move beyond `pt`'s: 12 only in `capitalized(force=True)`, a mid-name `SB` keeping its capitals, and 5 where the degree after a comma or a credential now fills `generation` rather than `credentials` (`Howard S. Gordon, MD SB`, `Waleed Riad, MD, AB, SB`), one of them moving fields (`Silvio Brugger, SB`, given `SB` by default, suffix under the pack). The degree is a suffix either way; which view holds it is the cost of a choice made for Brazilian data. The recipe for the fielded figures is the scratch scorer this entry describes: `local_agreement.read` per record under `Parser()` and `parser_for(pack)`, over the records whose name holds a word of `changed_words(selected(pack.languages))`. -- **2026-10-30 #753, phase 3e (its `sushri` bullet's wait for 3i superseded by 2026-10-30 #753, file-strict, and carried out by decisions/indic-honorifics' 2026-11-03 (Derek) #345/#870 entry) — THE HINDI AND BENGALI PACKS, `locales.HI` AND `locales.BN`: THE ROMANIZED `smt`, `shrimati` AND `shriyut` (HI) AND `smt`, `shrimati` AND `adhyapak` (BN) TURN ON AS TITLES; `shri` AND `sushri` STAY OUT, MEASURED; THE DEFAULT DOES NOT MOVE.** Carries out 3e of item 11 of the 2026-10-27 #753 entry, for #345's Latin forms. +- **2026-10-30 #753, phase 3e (its `shri` bullet superseded by the 2026-11-20 #1192 entry, which makes `shri` a `default = false` salutation under `hi`; its `sushri` bullet's wait for 3i superseded by 2026-10-30 #753, file-strict, and carried out by decisions/indic-honorifics' 2026-11-03 (Derek) #345/#870 entry) — THE HINDI AND BENGALI PACKS, `locales.HI` AND `locales.BN`: THE ROMANIZED `smt`, `shrimati` AND `shriyut` (HI) AND `smt`, `shrimati` AND `adhyapak` (BN) TURN ON AS TITLES; `shri` AND `sushri` STAY OUT, MEASURED; THE DEFAULT DOES NOT MOVE.** Carries out 3e of item 11 of the 2026-10-27 #753 entry, for #345's Latin forms. - **What each pack turns on.** `locales.HI` chooses `hi` and `locales.BN` `bn`, each with an empty lexicon fragment and no policy patch, so each is a choice alone and declares no `DEVIATES` (the phase 3d entry's item 2). hi.toml gains `salutation` readings `default = false` for `shrimati` (f), `smt` (its `same_as`) and `shriyut` (m), each `after_given` as its Devanagari spelling is; bn.toml gains `shrimati` and `smt` the same way and `adhyapak` as an `academic` reading `default = false`. None of the words has another reading in any file, so the choice turns each on and prefers nothing: `changed_words` is `{shrimati, shriyut, smt}` for `hi` (`sushri` joining it on 2026-11-03, decisions/indic-honorifics) and `{adhyapak, shrimati, smt}` for `bn` (pinned by `test_hi_and_bn_pack_contents`). A word turned on is read wherever the title vocabulary is: at the head, behind a listed title, after a family comma, ahead of one with a name word behind it (rules/H6, `Shrimati Gandhi, Indira` → family `Gandhi`), where it ends the given part after one (rules/H8, `Sitharaman, Nirmala Smt`), written with its period at the end of the name (rules/H5, `Indira Gandhi Shrimati.` → family `Gandhi`), and as a chunk of a period-joined token (the Accepted bullet below). Written with its period, rules/H2's shape already reads it as a title by default at the head, behind a listed title, after a family comma and alone after one (`Smt. Nirmala Sitharaman`, `Dr. Smt. Rekha Sharma`, `Sitharaman, Smt. Nirmala`, `Rekha Sharma, Smt.`), so a dotted spelling moves wherever else the title vocabulary is read, which a sweep of 18 shapes (head, behind a title, mid-name, end, end before a suffix, and each comma shape with a one-word, full and empty head, a second comma and a credential beside it) finds to be: ending the name, a suffix peeled behind it or not (H5, `Rekha Sharma Smt. Jr.` → title `Smt.`, family `Sharma`); ending the given part after a family comma (H8, `Sitharaman, Nirmala Smt.`); ahead of a family comma with a name word behind it (H6, `Smt. Gandhi, Indira`); ending what follows an empty head, which is not a family comma (rules/C15), so H8 does not name it (`, Rekha Smt.` → title `Smt.`, family `Rekha`, where the default reads given `Rekha`, middle `Smt.`); any comma part after the name that holds it beside a credential or past a second comma (rules/C2, `Rekha Sharma, Jr., Smt.` → title `Smt.`, suffix `Jr.`, where the default reads suffix `Jr., Smt.`; `Rekha Sharma, PhD Smt.`; `Sharma, Rekha, Smt.`); and a period-joined chunk; bracketed at the end it counts as ending the name, its period keeping it from the nickname (`Rekha Sharma (Smt.)` → title `Smt.`, family `Sharma`, while `(Smt)` stays the nickname); mid-name it stays a name word (`Rekha Smt. Sharma`); bare at the end of the name it stays a name word, as every bare title does (`Indira Gandhi Shrimati`). Each reading's counts are on hi.toml's reading, bn.toml's pointing to them, from `tools/name_usage.py smt shrimati sushri shriyut shri adhyapak --boxes --country IN --country BD` (2026-10-30) and a pass over ORCID's whole extract by box and position. - **`shrimati` ships, weighed against its two name bearers.** ORCID's whole extract has 3 given boxes holding it: `SHRIMATI`|`SHETTY` and `Shrimati`|`Shetty`, likely one person, the word alone as the given name, and `Shrimati Datta`; under either pack `Shrimati Shetty` reads title `Shrimati`, family `Shetty`, and no given name, a cost. The title side is nepal-candidates' 16 romanizations, whose Devanagari is the salutation in every one (`श्रीमती` 11, `श्रीमति` 4, the spaced `श्री मती` 1), and the word's Devanagari twin, a default title. That data is Nepali, not the Hindi or Bengali data the packs are for, which no corpus here holds, so the measured split is 16 leading uses as the title against 1 person bearing it as a name (the Shetty pair; `Shrimati Datta`, a given box with no family box, reads equally as the salutation and a surname), from populations beside the pack's own. That is the reverse of `shri`'s 198 openers against 1 fix, and at this volume the title reading holds under the Standing criterion, which pools the populations in persons: 16 openings as the title against 1 name, though within ORCID alone the name (the Shetty pair) is at least as many as the title (`Shrimati Datta` at most). `srimati`, the same word in Bengali spelling, is not judged by the same counts (Open below): it was not measured as a reading. - **`shri` is left out: its exclusion stays in hi.toml, with the counts.** In every population that writes it, a name opens with it far more often than the salutation does. ORCID's whole extract (24,990,909 records) has 198 given boxes opening with `Shri`, 52 of them `Shri` alone and most of the rest a given name written in two words (`Shri Kant`, `Shri Ram`, `Shri Lakshmi`, `Shri Vaishnavi`), Hindi and Tamil names alike; nam_dict bands it 2 in India, and Wikidata holds 7 given. Turned on (measured on a tree whose hi.toml held it, its exclusion removed, as a `salutation` reading `default = false`, and bn.toml the same reading), it broke 20 filed names and fixed none: scored box by box, PSC 2 (`Mr Shri Ram Neupane`, its forename `Shri`), ORCID's local corpus 5 and PatentsView 4 (`Shri Ram Yadav`), and FEC 9, each `SHRI` the first name after the family comma (`BANGALEY, SHRI` → title `SHRI`, no given). It moved nepal-candidates' 10 `Shri` romanizations to the title, 4 of them the one Devanagari word `श्रीनारायण` (`Shri Narayan Paswan`), and in jrc-names fixed 1 (`Shri Dharmendra Pradhan`). No CLDR rendering writes it (CLDR's `hi_Latn` writes the salutation `Shree`). This is not a clash prefer settles, since the word has no other vocabulary reading, nor one strict would: its bearers are the pack's own language's. It is the same-language clash the RFC's phase 3 section sends down phase 2j's route, a `given` reading and the title phrase (rules/H9), as default work; Open below. @@ -421,7 +421,7 @@ Open: [#1145](https://github.com/derek73/python-nameparser/issues/1145), the dis - **Accepted: a word glued behind the period reads as the title under the pack.** nepal-candidates' `Smt.Nagiya Devi Awadha` (`श्रीमति नगिया देवी आवधा`) reads title `Smt.Nagiya` under either pack, where the default reads given `Smt.Nagiya`: `_vocab.period_joined_vocab` makes a period-joined token a title where any chunk is a title, the shape the phase 3d entry's Open names for `श्री.राम`, here in the other direction. - **Accepted: `SMT` as a US credential reads as the title in every comma part that holds it.** NPPES has 4 of its 4,824,544 credentialed providers writing `SMT` (`tools/name_usage.py smt`, the pinned August 2026 file). Under either pack it leaves the suffix for the title wherever a comma part after the name holds it, alone or in a credential run, before or after the other credentials and past a second comma (`Jane Doe, SMT`, `Jane Doe, MD, SMT`, `Jane Doe, PhD SMT`, `Jane Doe, SMT MD`, each giving title `SMT` and the rest of the suffix, where the default reads it all as the suffix), and where it ends the given part after a family comma (H8, `Doe, Jane SMT`, middle `SMT` by default). Bare after the name with no comma (`Jane Doe SMT`) both read it as a name word. A Hindi or Bengali choice is not made for US healthcare data, and 4 providers in 4.8 million is the measured size of the cost. - **The phase 3d entry's question, a `given` reading of `श्री` in hi.toml or bn.toml, is answered no.** For Hindi the evidence is CLDR's: of the four renderings the phase 3d entry found moving under `ne`, two are `hi` (`givenFirst` and `surnameFirst`), one `kok` and one `mr` (`givenFirst` each), each writing `श्री` as the title, so `श्री` stays a title under `hi` and `hi.toml`'s `श्री` note stays true. For Bengali the answer is unmeasured: no CLDR rendering and no committed corpus holds `শ্রী` (2026-10-30), so `bn` keeps the default's reading of it, a title, by default rather than by measurement. - - **Open: `shri`, and the romanizations outside 3e's list.** Whether `shri` takes phase 2j's route in the default, a `given` reading beside its title one so that it is a title only inside a title phrase, is default work this entry does not do; its counts are on its exclusion. CLDR's `hi_Latn` writes the salutation `Shree`, the spelling nepal-candidates romanizes `श्री` as a name word in 191 pairs (the phase 3d entry); nepal-candidates' romanized names open with `Shreemati` 47 times, three times `Shrimati`'s 16, 6 of them paired with `श्रीमति`, 41 of the 47 paired with `श्रीमती` and none opening an ORCID given box, and with `Srimati`, Bengali's romanization of শ্রীমতী, 12 times, 11 of them paired with the salutation (`श्रीमती` 10, `श्रीमति` 1), against 4 ORCID given boxes holding it alone (Naik, Nayak, Ghosal, Basu), the direction `shrimati`'s counts take; none was measured as a reading here. 18 nepal-candidates pairs open their Devanagari with `श्रीमति`, short i, a spelling of `श्रीमती` hi.toml does not list. + - **Open: `shri`, and the romanizations outside 3e's list** (its `shri` half settled otherwise by the 2026-11-20 #1192 entry: a `default = false` reading under `hi`, not phase 2j's route). Whether `shri` takes phase 2j's route in the default, a `given` reading beside its title one so that it is a title only inside a title phrase, is default work this entry does not do; its counts are on its exclusion. CLDR's `hi_Latn` writes the salutation `Shree`, the spelling nepal-candidates romanizes `श्री` as a name word in 191 pairs (the phase 3d entry); nepal-candidates' romanized names open with `Shreemati` 47 times, three times `Shrimati`'s 16, 6 of them paired with `श्रीमति`, 41 of the 47 paired with `श्रीमती` and none opening an ORCID given box, and with `Srimati`, Bengali's romanization of শ্রীমতী, 12 times, 11 of them paired with the salutation (`श्रीमती` 10, `श्रीमति` 1), against 4 ORCID given boxes holding it alone (Naik, Nayak, Ghosal, Basu), the direction `shrimati`'s counts take; none was measured as a reading here. 18 nepal-candidates pairs open their Devanagari with `श्रीमति`, short i, a spelling of `श्रीमती` hi.toml does not list. - **Recompute:** the commands above from a checkout of this change, against a detached checkout of master; FEC's figure with `snapshot.py --local fec-individuals --base` on that tree; the PSC, ORCID and PatentsView figures with the scratch scorer of the phase 3h entry (`local_agreement.read` per record under `Parser()` and `parser_for(pack)`, over the records whose name holds a word of `changed_words(selected(pack.languages))`), run on a tree that removes `shri`'s exclusion from hi.toml and adds `shri` and `sushri` to hi.toml, and `shri` to bn.toml, as `salutation` readings `default = false` (the build refuses the reading while the exclusion stands); the ORCID box counts by reading `ORCID_2025_10_summaries.v1.jsonl.gz` from the cache and counting the boxes whose first word folds to the word. - **2026-10-30 #753, phase 3g (its titles' `default = false`, all but `doña`'s, superseded by the 2026-11-06 #1115, the pack titles entry, which is the default change this entry left for later; its `locales.PT` waiting for a Portuguese given-name list answered by decisions/O6's 2026-11-19 #1453 entry: `locales.PT` stays off, `locales.PT_BR` and a new `locales.PT_PT` turn the switch on with a list) — THE SPANISH AND PORTUGUESE PACKS, `locales.ES` AND `locales.PT`: THE TITLES THAT LEAD A NAME WITHOUT A COMPLEMENT TURN ON; `don`, `dona`, `dom` AND `maestro` STAY OUT, MEASURED; `sr` KEEPS ITS GENERATION AND `h` IS EXCLUDED; `ES` READS TWO FAMILY NAMES; NO TITLE-RUN CONNECTIVE; THE DEFAULT DOES NOT MOVE.** Carries out 3g of item 11 of the 2026-10-27 #753 entry. - **What each pack turns on.** `locales.ES` chooses `es`, turns `two_family_names` on through es.toml's `[rules]` table (sub-phase 4f's schema, `PACK_RULES` gaining `es`), and carries `nameparser/locales/_es_given_names.py`'s list as its lexicon fragment, `Lexicon(given_names=GIVEN_NAMES)`, as `locales.ZH` carries its surnames; the switch and the list are decisions/O6's, and the decision to turn them on, made in chat, and its measurement are decisions/O6's 2026-10-30 phase 3g entry, which also records why `two_given_names` stays opt-in (decisions/O7's). `locales.PT` chooses `pt`, with an empty fragment and no patch, until a Portuguese given-name list exists (the same entry). es.toml writes `default = false` the academic readings `lic`, `licenciado`, `licenciada`, `lcdo`, `lcda`, `ingeniero`, `ingeniera`, `arq`, `mtro`, `mtra`, `doctora`, `profesor`, `profesora` and the salutation `doña`; pt.toml `doutor`, `doutora`, `professora` and `profa`. Each is `default = false` because phase 3 moves no default parse (item 12), not because another language collides with it; whether some belong in the default is a default change, left for one. Counts are on each reading, from `tools/name_usage.py --boxes` and a count of the names in every local corpus that open with the word or open the part after a comma with it. @@ -631,3 +631,8 @@ Open: [#1145](https://github.com/derek73/python-nameparser/issues/1145), the dis - **Declined: a rule reading the genitive into the patronymic view** (#1253's decision allows one, #1237's option 2). In Cyrillic the view would repeat `family`, the pack's order reading the father first. In Latin, where the order is now the caller's, the rule could ORDER a romanized name the genitive marks (#1237 counted 515 Wikidata `en` labels with it on the first word against 1 on the second) and leave unmarked ones alone, the gain it would add here; but the Latin endings collide with given names written first, JRC's two-word spellings opening with `-yn` including `Mervyn King`, `Carolyn Porco`, `Kathryn Gustafson` and `Martyn Johnson`, and its Cyrillic ones with `-ийн` the Bulgarian spellings of Madeleine, Gene and Dean; and a rule kind is a new `PatronymicRule` member and a `Policy` change (nameparser/vocab/README.md's [rules]). Left for a decision. - **The given name last, at a cost to a Russian name in a Mongolian list.** `FAMILY_FIRST_GIVEN_LAST` reads a three-word Russian name written family first with the given name in the middle backwards (`Сидоров Иван Петрович` → given 'Петрович', middle 'Иван'), where `FAMILY_FIRST` reads given 'Иван'; under `parser_for(locales.MN, locales.RU)` the patronymic lands in `given`, where rules/R9's East Slavic rule, which reads a middle word, does not see it, so the view stays empty; under `FAMILY_FIRST` with RU it is the middle word and the view reads 'Петрович' (O1's rotation stands down under either declared order). Neither shape is measured: every Khural member is written in two words, and the clan name the order was chosen for appears in no source either. Left for a decision, with decisions/W4's open precedence for a patronymic shape over a pack's script order. - **Accepted:** every Cyrillic name reads by the pack's order, Russian, Kazakh and Kyrgyz ones included (`Иван Сидоров` → family 'Иван'), so the pack is for Mongolian data; the given name followed by the father's initial reads backwards in Cyrillic (`Сүхээ Б.` → family 'Сүхээ'), where the default reads it right; a lone Cyrillic word reads as the caller's lone-word setting names, given by default, and reports, the pack's order settling no field (rules/O5, decisions/W4); a word the script test does not read as Cyrillic leaves its name to the caller's order, so initials joined by a full stop (`Б.Б. Сүхээ` → given 'Б.', family 'Сүхээ', where `Б. Б. Сүхээ` reads family 'Б.') and a letter with a stress mark that has no precomposed form (`Ива́н Сидоров`) read as the default does; and the CLDR sample's `Ноён` (Mr.) is no listed title, so `Ноён Азжаргал Төмөр` reads family 'Ноён' under the pack (a vocabulary question, not the pack's); nor are `Доктор` (Dr.) and the honorific `гуай` written after a name, so `Доктор Батын Сүхээ` reads family 'Доктор', given 'Сүхээ', and `Батын Сүхээ гуай` family 'Батын', given 'гуай' under the pack, vocabulary candidates beside `Ноён`, found by the independent review of #1365 (2026-11-12) and not added here; a Latin letter that looks Cyrillic inside a Cyrillic word (`Cүхээ Батын`, its first letter U+0043) leaves the name to the caller's order, given 'Cүхээ'. And the pack's own cost in matching: the father's name written as an initial, the short form Mongolian names are usually written in (`Батын Сүхээ` / `Б. Сүхээ`), is the family under the pack, so the pair reads `family-initial`, an outcome no matcher accepts unless asked, and conflicts, where the default matcher calls it consistent only by reading the father's name as the given name; accepting `family-initial` restores it, and docs/languages.rst's Mongolian section shows the accept. +- 2026-11-20 #1192 — `shri` IS A SALUTATION UNDER A HINDI CHOICE, REVERSING PHASE 3E'S EXCLUSION. hi.toml's `excluded:salutation` becomes a `salutation` reading written `default = false`, as `shrimati`'s is but without `after_given` (below), so `parser_for(locales.HI)` reads `Shri Ravi Kumar Verma` as title 'Shri', given 'Ravi', where the default and `locales.BN` read given 'Shri' as before; the dotted `Shri.` was a title at the head already, by rules/H2's shape. Phase 3e weighed the word by the given boxes that open with it, where it broke 20 filed names and fixed none, because no population it read writes the salutation; the 3.2 cycle chooses a pack's reading by its accuracy for the callers who choose the pack, and the list a Hindi choice is made for, India's Lok Sabha roll, writes it before nearly every member's name. `sri` stays excluded: its bearers are Indonesian and Sri Lankan given names (`Sri Lestiani`), a different population, and turning `shri` on does not move it. + MEASURED 2026-11-20 on this branch (master `758c2f8e` with #1239, #966, #1215 and #1337), py3.11, with `uv run python tools/differential/config_diff.py diff --local all --committed --match '(?i)shri' 'expr:Parser(lexicon=parser_for(locales.HI).lexicon.remove("shri", kind="salutation"), policy=parser_for(locales.HI).policy)' plain:HI`, the pack against itself without the reading: 2,275 names moved, none in the committed corpora. opensanctions-parliaments 2,245, 2,244 of them among in_sansad's 10,650 distinct spellings (`--group in_sansad`), each gaining the salutation as the title (`Shri Ravi Kumar Verma`, `Verma, Shri R.K.`, `Ravi Kumar, Shri`, `(Shri) Ravi Kumar`, 211 spellings moving only the title and the given name, 207 of them a member written with one name word beside the salutation, 202 as `Shri Gopalan` and 5 as `Gopalan, Shri`), and 1 a Balinese name in Indonesia's regional heads that writes the word inside it, unclear. jrc-names 1, right. nepal-candidates 10, read by their Devanagari: 6 write a spaced `श्री`, which the default reads as the title, so the romanization now reads as its Devanagari does (one of them Shrimati written apart as two words, wrong both ways), and 4 the one word `श्रीनारायण`, a given name, now wrong. Broken by the filed boxes, each a given box holding the word: fec-individuals 9 (`FAMILY, SHRI` 7 times, `FAMILY, SHRI L` and `FAMILY, SHRI K. DR.`), orcid-researchers 5 (1 `Shri` alone, 4 a given name of two words such as `Shri Lal`), patentsview-inventors 4 and psc-individuals 2 (`Mr Shri Anand`, the forename box `Shri`). So about 2,250 fixed against 24 broken, 20 of them in populations a Hindi choice is not made for (US donors and patent filers, UK company filings, ORCID's whole world). Counted in persons, as this file's Standing criterion counts: 1,522 in_sansad members have a spelling that opens with the word and 2,217 one that holds it (entities in opensanctions-parliaments' `raw.jsonl`), against the about 220 bearers phase 3e and hi.toml record (ORCID's 198 openers, Wikidata 7, FEC 9, PatentsView 4, PSC 2), so the pooled criterion turns the reading on too. + ACCEPTED: a person whose given name is `Shri`, or opens with it, reads the salutation under the pack: `Verma, Shri` gives title 'Shri' and no given name, `Shri Mehra` title 'Shri', family 'Mehra', and `Shri Lal Mehra` given 'Lal'. Nothing written tells `Shri Lal`, a given name of two words, from `Shri Ravi`, the salutation before one. A narrower reading, the title only with two or more name words behind it, keeps `Shri Mehra` and loses the 202 Sansad spellings written `Shri Gopalan`, so it was not taken. + NOT `after_given` (rules/H8): rules/H8 leaves out a salutation borne as a given name, since a middle name may be one, and decisions/H8 left the Devanagari `श्री` out on that doubt; `shri` is borne as one, and the roll never asks for the property. in_sansad writes the salutation in two shapes, before the given name after a family comma (`Verma, Shri Ravi`, 653 of opensanctions-parliaments' distinct names) and after a full name and a comma (`Ravi Verma, Shri`), both read as the title without it, and holds no `Family, Given Shri`. Measured against the same reading carrying the property, the recipe below moves 2 names, both reading better without it: an FEC filer whose given name of two words ends in the word (`FAMILY, GIVEN SHRI`), whom the property read as given 'GIVEN' and title 'SHRI', and a Sansad spelling with the salutation in brackets (`(Shri) Ravi Kumar`), which the property left the nickname and which reads as the title without it. So `Verma, Ravi Shri` keeps middle 'Shri' under the pack, as `वर्मा, रवि श्री` keeps middle 'श्री', and the word records the refusal (`excluded = { after_given = ... }` on its entry); the dotted `Verma, Ravi Shri.` is the title by rules/H5's trailing vocabulary, as `Shri.` ending a name is. + Recompute: the command above from a checkout of this change; the 2 moves the property makes with `'expr:Parser(lexicon=parser_for(locales.HI).lexicon.remove("shri", kind="salutation").add("shri", kind="salutation", after_given=True), policy=parser_for(locales.HI).policy)'` in place of the first configuration; the person counts from `raw.jsonl`'s in_sansad rows, their `entity` kept where `name` holds `shri` as a word, and where it opens with it (a bracket allowed); the in_sansad figure with `--local opensanctions-parliaments --group in_sansad` and no `--match`; each moved name read from `--readings `, the two configurations' first field compared line by line. diff --git a/docs/design/rules/P12-bound-given-name-and-the-word-that-completes-it.md b/docs/design/rules/P12-bound-given-name-and-the-word-that-completes-it.md index c63f97108..498cf070a 100644 --- a/docs/design/rules/P12-bound-given-name-and-the-word-that-completes-it.md +++ b/docs/design/rules/P12-bound-given-name-and-the-word-that-completes-it.md @@ -4,9 +4,10 @@ **Then:** the two words are one name unit, past the first name word or, for a pair read from its second word, at it too, a unit that position places. -- **The completing word is one a reading lists** (`completed_by` on the bound word's reading): for Arabic-script `عبد`, the one-word names of God, the other divine epithets and the devotional completions written after it, each in its hamza-less and Persian spellings. +- **The completing word is one a reading lists** (`completed_by` on the bound word's reading): for Arabic-script `عبد`, the one-word names of God, the other divine epithets and the devotional completions written after it, each in its hamza-less and Persian spellings, and a word ending in `ي` also with the final `ى` Egyptian names write, and `المولى` with `ي` too. ``` "سعيد عبد الله" → family="عبد الله" + "سامر عبد القوى" → family="عبد القوى" "طارق عبد العزيز" → family="عبد العزيز" "محمد عبد الله أحمد" → middle="عبد الله" "عبد اللطيف عبد الحميد" → family="عبد الحميد" diff --git a/docs/east-asian.rst b/docs/east-asian.rst index 9b25fa118..95bebc87a 100644 --- a/docs/east-asian.rst +++ b/docs/east-asian.rst @@ -159,6 +159,22 @@ Korean name that divided at 김 divides at 김민 once that is listed: >>> Parser(lexicon=lex).parse("김민준").family '김민' +A listed surname also divides a foreign name written in hangul, since +hangul is read as Korean: 라르스 (Lars) opens with the surname 라. If +your data holds such names, take the surname out of the list, and +Korean names opening with it stay whole too: + +.. doctest:: + + >>> import dataclasses + >>> parse("라르스").family + '라' + >>> ko_lexicon = Lexicon.default() + >>> no_ra = dataclasses.replace( + ... ko_lexicon, surnames=ko_lexicon.surnames - {"라"}) + >>> Parser(lexicon=no_ra).parse("라르스").family + '라르스' + For a Chinese name, add the surname to the parser the ``zh`` pack is folded onto. 庹 is a rare surname the pack does not list, so the name stays whole until it is added: diff --git a/docs/languages.rst b/docs/languages.rst index 2c42a37ad..f05db8ede 100644 --- a/docs/languages.rst +++ b/docs/languages.rst @@ -591,7 +591,7 @@ The default reads the Devanagari and Bengali salutations as titles (``श्रीमती``, ``শ্রীমতী``), since no Latin name is spelled in those scripts, and leaves their romanizations to position, since a Latin spelling can be a name. ``hi`` and ``bn`` turn on the romanized forms -whose leading use is the title: +whose leading use is the title, and ``hi`` one more, below: .. doctest:: @@ -603,11 +603,23 @@ whose leading use is the title: >>> parser_for(locales.BN).parse("Adhyapak Anisuzzaman Khan").title 'Adhyapak' -Two are left out, because the names that open with them outnumber the -titles even in Indian data. ``Shri`` opens a given name written in two -words (``Shri Kant``, ``Shri Lakshmi``), and ``Sushri`` an Odia one -(``Sushri Sangita``), so both stay name words under the packs. A strict -Hindi choice, which reads no Odia names, reads ``Sushri`` as the title: +``hi`` also reads ``Shri`` as the title, as an Indian parliament's +roll writes it. The cost falls on a person whose given name opens with +it (``Shri Kant``, ``Shri Lakshmi``), who reads the title there, so +``bn`` and the default leave it to position: + +.. doctest:: + + >>> parse("Shri Ravi Kumar Verma").given + 'Shri' + >>> hindi = parser_for(locales.HI).parse("Shri Ravi Kumar Verma") + >>> hindi.title, hindi.given + ('Shri', 'Ravi') + +``Sushri`` opens an Odia given name (``Sushri Sangita``) more often +than it is the title, so it stays a name word under the plain choice. +A strict Hindi choice, which reads no Odia names, reads it as the +title: .. doctest:: @@ -617,7 +629,8 @@ Hindi choice, which reads no Odia names, reads ``Sushri`` as the title: 'Sushri' ``Smt.`` and ``Shri.`` written with their period are titles at the head -of a name by default, packs or no. ``Pandit``, ``Sardar``, ``Kumari``, +of a name by default, packs or no; under ``hi`` they are titles ending +the name too. ``Pandit``, ``Sardar``, ``Kumari``, ``Babu``, ``Acharya`` and ``Begum`` are titles under no pack: each opens far more names as a given name or a surname than as the title. diff --git a/docs/locales.rst b/docs/locales.rst index 1d52f8501..0bbb84bfd 100644 --- a/docs/locales.rst +++ b/docs/locales.rst @@ -44,7 +44,8 @@ Native-script entries are safe to enable by default precisely because they cannot collide with Latin-script names. That rules out the reverse: transliterations like ``sri``/``shri`` are *not* in the default vocabulary, because they are also ordinary given names in -Latin script. The same conservatism holds back a handful of native +Latin script (``locales.HI`` turns ``shri`` on, for data where it is +the salutation). The same conservatism holds back a handful of native entries that collide within their own script — bare ``سيد`` and ``شيخ`` (common given names) and Hebrew ``רב`` (an ordinary word). @@ -279,7 +280,7 @@ says which parts each pack is made of. * - ``hi`` - Hindi: romanized titles - Chooses ``hi``, which reads the romanized salutations ``Smt`` - and ``Shrimati`` (Mrs.) and ``Shriyut`` (Mr.) as titles, where + and ``Shrimati`` (Mrs.) and ``Shri`` and ``Shriyut`` (Mr.) as titles, where the default reads a name word. See :ref:`Romanized Indic titles `. - ``Shrimati Indira Gandhi`` → title ``Shrimati`` diff --git a/docs/release_log.rst b/docs/release_log.rst index b3f566df8..4a23535cd 100644 --- a/docs/release_log.rst +++ b/docs/release_log.rst @@ -4,6 +4,11 @@ Release Log nameparser 3.2 is under development. + - **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` + - **Read Shri as a title under locales.HI.** ``parser_for(locales.HI).parse("Shri Ravi Kumar Verma")`` gives title ``Shri``, given ``Ravi``, where 3.0.0 through 3.1.0 gave given ``Shri``, middle ``Ravi Kumar``; the default and ``locales.BN`` still read it as a name word. A given name that opens with Shri (``Shri Kant``) reads the title under the pack. :issue:`1192` + - **Fix a word completing عبد written with a final ى, as Egyptian names write it, which read as a name of its own.** ``parse("سامر عبد القوى")`` gives family ``عبد القوى``, as ``عبد القوي`` reads, where 1.4.0 through 3.1.0 gave middle ``عبد``, family ``القوى``. :issue:`1337` - **Fix locales.RU reading a Ukrainian patronymic written in Cyrillic as the family name.** ``parser_for(locales.RU).parse("Коваленко Олена Петрівна")`` gives family ``Коваленко``, given ``Олена``, patronymic ``Петрівна``, where 2.0.0 through 3.1.0 gave family ``Петрівна``, given ``Коваленко``; ``-ївна``, ``-євич`` and ``Ілліч`` read the same way, while the Belarusian endings and the Latin spellings (``-ivna``, ``-ovych``) still do not; ``Parser.suggest`` now suggests the East Slavic rule for a list of such names too. :issue:`1212` - **Fix initials() giving a Lao name its first letters.** ``parse("ສົມຊາຍ ໃຈດີ").initials()`` gives ``''``, as a Thai or Burmese name does, where 1.4.0 through 3.1.0 gave ``'ສ. ໃ.'``; the name match reads a Lao letter as a word, so ``ສ. ໃຈດີ`` no longer matches ``ສົມຊາຍ ໃຈດີ``, and a list of Lao names each ending in a letter no longer suggests a family-first order. A Lao title written short (``ດຣ.``) is still a title. :issue:`1380` - **Add familiar forms in Central and Eastern European and Balkan languages, found in Wikidata.** With ``familiar-form`` accepted, ``Erzsi Nagy`` / ``Erzsébet Nagy`` and ``Jára Novák`` / ``Jaroslav Novák`` are consistent, where 3.1.0 read a conflict, Czech and Hungarian gaining the most; the Russian, Ukrainian, Belarusian, Bulgarian and most Serbian pairs are written in Cyrillic, so a name romanized in Latin letters does not reach them. :issue:`1387` diff --git a/nameparser/config/_compiled.py b/nameparser/config/_compiled.py index fa8a88ebe..8bf551a73 100644 --- a/nameparser/config/_compiled.py +++ b/nameparser/config/_compiled.py @@ -341,6 +341,7 @@ 'adviser', 'advocate', 'air', + 'air-marshal', 'akhoond', 'alderman', 'alhaj', @@ -420,6 +421,7 @@ 'botanist', 'bp', 'brigadier', + 'brigadier-general', 'briggen', 'british', 'broadcaster', @@ -453,6 +455,7 @@ 'chef', 'chemist', 'chief', + 'chief-marshal', 'chieftain', 'child', 'choreographer', @@ -610,6 +613,7 @@ 'fellow', 'fh-prof', 'field', + 'field-marshal', 'film', 'financial', 'first', @@ -740,6 +744,9 @@ 'licenciada', 'licenciado', 'lieutenant', + 'lieutenant-colonel', + 'lieutenant-commander', + 'lieutenant-general', 'linguist', 'literary', 'lord', @@ -763,6 +770,7 @@ 'maharani', 'maid', 'majgen', + 'major-general', 'manager', 'marcher', 'marchess', @@ -957,6 +965,7 @@ 'rangatira', 'rdml', 'rear', + 'rear-admiral', 'rebbe', 'registered', 'registrar', @@ -995,6 +1004,7 @@ 'senior', 'senior-judge', 'sergeant', + 'sergeant-major', 'servant', 'señor', 'señora', @@ -1099,6 +1109,8 @@ 'verderer', 'vicar', 'vice', + 'vice-admiral', + 'vice-marshal', 'viscount', 'vizier', 'vocalist', @@ -1106,6 +1118,7 @@ 'vrouwe', 'warden', 'warrant', + 'wing-commander', 'wo-1', 'wo1', 'wo2', @@ -1833,6 +1846,7 @@ 'chief adm', 'chief administrator', 'chief admiral', + 'chief air-marshal', 'chief alderman', 'chief almoner', 'chief ambassador', @@ -1845,6 +1859,7 @@ 'chief bgen', 'chief brig', 'chief brigadier', + 'chief brigadier-general', 'chief briggen', 'chief burgess', 'chief capt', @@ -1858,6 +1873,7 @@ 'chief chancellor', 'chief charge', 'chief chargé', + 'chief chief-marshal', 'chief clerk', 'chief cllr', 'chief cmsaf', @@ -1900,6 +1916,7 @@ 'chief ens', 'chief envoy', 'chief fadm', + 'chief field-marshal', 'chief gaf', 'chief gen', 'chief general', @@ -1916,6 +1933,9 @@ 'chief lcpl', 'chief leader', 'chief lieutenant', + 'chief lieutenant-colonel', + 'chief lieutenant-commander', + 'chief lieutenant-general', 'chief lt', 'chief ltc', 'chief ltcol', @@ -1930,6 +1950,7 @@ 'chief maj', 'chief majgen', 'chief major', + 'chief major-general', 'chief marshal', 'chief mayor', 'chief mcpo', @@ -1964,6 +1985,7 @@ 'chief pvt', 'chief radm', 'chief rdml', + 'chief rear-admiral', 'chief registrar', 'chief rep', 'chief representative', @@ -1972,6 +1994,7 @@ 'chief senator', 'chief senior-judge', 'chief sergeant', + 'chief sergeant-major', 'chief sfc', 'chief sgm', 'chief sgt', @@ -1995,8 +2018,11 @@ 'chief vadm', 'chief vc', 'chief verderer', + 'chief vice-admiral', + 'chief vice-marshal', 'chief vizier', 'chief warden', + 'chief wing-commander', 'chief wo-1', 'chief wo1', 'chief wo2', @@ -2524,6 +2550,7 @@ 'ul-', 'van', 'vande', + 'vanden', 'vander', 'vd', 'vel', @@ -4476,12 +4503,14 @@ 'عبد الاول', 'عبد الاکرم', 'عبد البارئ', + 'عبد البارى', 'عبد الباري', 'عبد الباری', 'عبد الباسط', 'عبد الباطن', 'عبد الباعث', 'عبد الباقر', + 'عبد الباقى', 'عبد الباقي', 'عبد الباقی', 'عبد البديع', @@ -4510,6 +4539,7 @@ 'عبد الحلیم', 'عبد الحميد', 'عبد الحمید', + 'عبد الحى', 'عبد الحي', 'عبد الحکم', 'عبد الحکیم', @@ -4543,6 +4573,7 @@ 'عبد السميع', 'عبد السمیع', 'عبد السند', + 'عبد الشافى', 'عبد الشافي', 'عبد الشافی', 'عبد الشكور', @@ -4554,9 +4585,11 @@ 'عبد الصمد', 'عبد الضار', 'عبد الظاهر', + 'عبد العاطى', 'عبد العاطي', 'عبد العاطی', 'عبد العال', + 'عبد العالى', 'عبد العالي', 'عبد العالی', 'عبد العباس', @@ -4566,12 +4599,14 @@ 'عبد العظيم', 'عبد العظیم', 'عبد العفو', + 'عبد العلى', 'عبد العلي', 'عبد العليم', 'عبد العلی', 'عبد العلیم', 'عبد الغفار', 'عبد الغفور', + 'عبد الغنى', 'عبد الغني', 'عبد الغنی', 'عبد الفتاح', @@ -4581,11 +4616,13 @@ 'عبد القدير', 'عبد القدیر', 'عبد القهار', + 'عبد القوى', 'عبد القوي', 'عبد القوی', 'عبد القيوم', 'عبد القیوم', 'عبد الكاظم', + 'عبد الكافى', 'عبد الكافي', 'عبد الكبير', 'عبد الكريم', @@ -4600,8 +4637,10 @@ 'عبد المالک', 'عبد المانع', 'عبد المبدئ', + 'عبد المبدى', 'عبد المبدي', 'عبد المبدی', + 'عبد المتعالى', 'عبد المتعالي', 'عبد المتعالی', 'عبد المتكبر', @@ -4613,9 +4652,11 @@ 'عبد المجیب', 'عبد المجید', 'عبد المحسن', + 'عبد المحصى', 'عبد المحصي', 'عبد المحصی', 'عبد المحمود', + 'عبد المحيى', 'عبد المحيي', 'عبد المحیی', 'عبد المذل', @@ -4625,10 +4666,12 @@ 'عبد المطلب', 'عبد المعبود', 'عبد المعز', + 'عبد المعطى', 'عبد المعطي', 'عبد المعطی', 'عبد المعيد', 'عبد المعید', + 'عبد المغنى', 'عبد المغني', 'عبد المغنی', 'عبد المقتدر', @@ -4644,6 +4687,7 @@ 'عبد المنان', 'عبد المنتقم', 'عبد المنعم', + 'عبد المهدى', 'عبد المهدي', 'عبد المهدی', 'عبد المهيمن', @@ -4651,23 +4695,28 @@ 'عبد الموجود', 'عبد الموخر', 'عبد المولى', + 'عبد المولي', 'عبد المولی', 'عبد المومن', 'عبد الناصر', 'عبد النافع', + 'عبد النبى', 'عبد النبي', 'عبد النبی', 'عبد النور', + 'عبد الهادى', 'عبد الهادي', 'عبد الهادی', 'عبد الواجد', 'عبد الواحد', 'عبد الوارث', 'عبد الواسع', + 'عبد الوالى', 'عبد الوالي', 'عبد الوالی', 'عبد الودود', 'عبد الوكيل', + 'عبد الولى', 'عبد الولي', 'عبد الولی', 'عبد الوهاب', diff --git a/nameparser/config/_index.py b/nameparser/config/_index.py index 5f5e9f574..932f550e1 100644 --- a/nameparser/config/_index.py +++ b/nameparser/config/_index.py @@ -109,6 +109,7 @@ ('aia', (('en', 'credential', ()),)), ('aicp', (('en', 'credential', ()),)), ('air', (('en', 'modifier', ()),)), + ('air-marshal', (('en', 'military', ()),)), ('ait', (('ber', 'clan', (('cased', 'Ait'),)),)), ('ajay', (('mul', 'familiar', (('short_for', ('ajaykumar',)),)),)), ('aka', (('en', 'alias_marker', (('default', False),)),)), @@ -395,6 +396,7 @@ ('brie', (('en', 'familiar', (('short_for', ('brianne',)),)),)), ('brig', (('en', 'military', (('abbreviation', True), ('attaches', ('gen', 'general', 'sir')), ('same_as', 'brigadier'))), ('en', 'given', ()), ('my', 'military', (('abbreviation', True), ('attaches', ('gen', 'general', 'sir')), ('default', False), ('same_as', 'brigadier'))))), ('brigadier', (('en', 'military', (('attaches', ('gen',)),)), ('my', 'military', (('attaches', ('gen',)), ('default', False))))), + ('brigadier-general', (('en', 'military', ()),)), ('briggen', (('en', 'military', (('same_as', 'bg'),)),)), ('brit', (('en', 'familiar', (('short_for', ('brittany',)),)),)), ('british', (('en', 'modifier', ()),)), @@ -578,6 +580,7 @@ ('chi', (('en', 'credential', ()), ('en', 'given', ()), ('en', 'family', ()))), ('chico', (('pt-BR', 'familiar', (('short_for', ('francisco',)),)),)), ('chief', (('en', 'nobility', (('attaches', ('military', 'office')),)),)), + ('chief-marshal', (('en', 'military', ()),)), ('chieftain', (('en', 'nobility', ()),)), ('child', (('en', 'modifier', ()),)), ('chip', (('en', 'familiar', (('short_for', ('charles',)),)),)), @@ -1116,6 +1119,7 @@ ('ficf', (('en', 'credential', ()),)), ('fieee', (('en', 'credential', ()),)), ('field', (('en', 'modifier', ()),)), + ('field-marshal', (('en', 'military', ()),)), ('fiet', (('en', 'credential', ()), ('en', 'family', ()))), ('filh', (('pt-BR', 'agnomen', (('same_as', 'filho'),)), ('pt-BR', 'family', ()))), ('filha', (('pt', 'agnomen', ()), ('pt', 'family', ()))), @@ -1681,6 +1685,9 @@ ('licsw', (('en', 'credential', ()),)), ('lidiya', (('ru', 'spelling', (('spelling_of', ('lidia', 'lidiia')),)),)), ('lieutenant', (('en', 'military', (('attaches', ('gen',)),)), ('my', 'military', (('attaches', ('gen',)), ('default', False))))), + ('lieutenant-colonel', (('en', 'military', ()),)), + ('lieutenant-commander', (('en', 'military', ()),)), + ('lieutenant-general', (('en', 'military', ()),)), ('lili', (('hu', 'familiar', (('short_for', ('lídia', 'lívia')),)),)), ('liliia', (('ru', 'spelling', (('spelling_of', ('lilia',)),)), ('uk', 'spelling', (('spelling_of', ('lilia',)),)))), ('liliya', (('ru', 'spelling', (('spelling_of', ('lilia', 'liliia')),)), ('uk', 'spelling', (('spelling_of', ('liliia',)),)))), @@ -1835,6 +1842,7 @@ ('majesty', (('en', 'style', ()), ('en', 'given', ()))), ('majgen', (('en', 'military', (('same_as', 'mg'),)),)), ('major', (('en', 'military', (('attaches', ('gen', 'general')),)), ('en', 'given', ()), ('en', 'family', ()), ('my', 'military', (('attaches', ('gen', 'general')), ('default', False))))), + ('major-general', (('en', 'military', ()),)), ('mal', (('en', 'familiar', (('short_for', ('malcolm',)),)),)), ('malam', (('ha', 'given', ()), ('ha', 'family', ()))), ('manaes', (('en', 'credential', (('cased', 'MAnaes'),)),)), @@ -2475,6 +2483,7 @@ ('rdms', (('en', 'credential', ()),)), ('rdn', (('en', 'credential', ()),)), ('rear', (('en', 'modifier', ()), ('my', 'modifier', (('default', False),)))), + ('rear-admiral', (('en', 'military', ()),)), ('rebbe', (('yi', 'religious', ()),)), ('reggie', (('en', 'familiar', (('short_for', ('reginald',)),)),)), ('registered', (('en', 'modifier', ()),)), @@ -2632,6 +2641,7 @@ ('senior-judge', (('en', 'office', ()),)), ('sepideh', (('fa', 'spelling', (('spelling_of', ('sepide',)),)),)), ('sergeant', (('en', 'military', (('attaches', ('maj', 'major')),)),)), + ('sergeant-major', (('en', 'military', ()),)), ('sergey', (('de', 'spelling', (('spelling_of', ('sergej',)),)), ('ru', 'spelling', (('spelling_of', ('sergei', 'sergej')),)))), ('sergiy', (('ru', 'spelling', (('spelling_of', ('sergii',)),)), ('uk', 'spelling', (('spelling_of', ('sergii',)),)))), ('serguei', (('mul', 'spelling', (('spelling_of', ('sergei',)),)),)), @@ -2662,6 +2672,7 @@ ('shekh', (('ar', 'style', (('addresses', 'given'), ('same_as', 'sheikh'))), ('ar', 'given', ()))), ('shelly', (('en', 'familiar', (('short_for', ('michelle',)),)),)), ('sheriff', (('en', 'office', ()),)), + ('shri', (('hi', 'salutation', (('default', False),)),)), ('shrimati', (('bn', 'salutation', (('after_given', True), ('default', False))), ('hi', 'salutation', (('after_given', True), ('default', False))))), ('shriyut', (('hi', 'salutation', (('after_given', True), ('default', False))),)), ('shrm-cp', (('en', 'credential', ()),)), @@ -2949,6 +2960,7 @@ ('valle', (('es', 'given', (('after_particle', True),)),)), ('van', (('nl', 'preposition', ()), ('nl', 'given', ()))), ('vande', (('nl', 'preposition', ()), ('nl', 'given', ()))), + ('vanden', (('nl', 'preposition', ()), ('nl', 'given', ()))), ('vander', (('nl', 'preposition', ()), ('nl', 'given', ()))), ('vangelis', (('el', 'familiar', (('short_for', ('evangelos',)),)),)), ('vanhempi', (('fi', 'generation', ()),)), @@ -2976,6 +2988,8 @@ ('vic', (('en', 'familiar', (('short_for', ('victor', 'victoria')),)),)), ('vicar', (('en', 'religious', (('attaches', ('gen',)),)),)), ('vice', (('en', 'modifier', ()), ('my', 'modifier', (('default', False),)))), + ('vice-admiral', (('en', 'military', ()),)), + ('vice-marshal', (('en', 'military', ()),)), ('vicki', (('en', 'familiar', (('short_for', ('victoria',)),)),)), ('vickie', (('mul', 'familiar', (('short_for', ('victoria',)),)),)), ('vicky', (('el', 'familiar', (('short_for', ('vasiliki',)),)), ('en', 'familiar', (('short_for', ('vasiliki', 'victoria')),)))), @@ -3023,6 +3037,7 @@ ('willie', (('en', 'familiar', (('short_for', ('william',)),)),)), ('wim', (('nl', 'familiar', (('short_for', ('willem',)),)),)), ('wing', (('en', 'modifier', ()), ('en', 'given', ()), ('en', 'family', ()))), + ('wing-commander', (('en', 'military', ()),)), ('winnie', (('mul', 'familiar', (('short_for', ('winifred',)),)),)), ('wlodek', (('en', 'familiar', (('short_for', ('wlodzimierz',)),)),)), ('wm', (('en', 'given', (('same_as', 'william'),)),)), @@ -3278,7 +3293,7 @@ ('سینئر', (('sd', 'generation', ()), ('ur', 'generation', ()))), ('سینیئر', (('sd', 'generation', ()), ('ur', 'generation', ()))), ('سینیور', (('fa', 'generation', ()),)), - ('عبد', (('ar', 'bound_given', (('completed_by', ('الآخر', 'الأحد', 'الأكرم', 'الأمير', 'الأمیر', 'الأول', 'الأکرم', 'الإله', 'الاحد', 'الاخر', 'الاكرم', 'الاله', 'الامير', 'الامیر', 'الاول', 'الاکرم', 'البارئ', 'الباري', 'الباری', 'الباسط', 'الباطن', 'الباعث', 'الباقر', 'الباقي', 'الباقی', 'البديع', 'البدیع', 'البر', 'البصير', 'البصیر', 'التواب', 'الجامع', 'الجبار', 'الجليل', 'الجلیل', 'الجواد', 'الحافظ', 'الحسن', 'الحسيب', 'الحسين', 'الحسیب', 'الحسین', 'الحفيظ', 'الحفیظ', 'الحق', 'الحكم', 'الحكيم', 'الحليم', 'الحلیم', 'الحميد', 'الحمید', 'الحي', 'الحکم', 'الحکیم', 'الحی', 'الخافض', 'الخالق', 'الخبير', 'الخبیر', 'الدائم', 'الدايم', 'الدایم', 'الرؤوف', 'الرازق', 'الرافع', 'الرب', 'الرحمان', 'الرحمن', 'الرحيم', 'الرحیم', 'الرزاق', 'الرسول', 'الرشيد', 'الرشید', 'الرضا', 'الرقيب', 'الرقیب', 'الرووف', 'الزهرة', 'الستار', 'السلام', 'السميع', 'السمیع', 'السند', 'الشافي', 'الشافی', 'الشكور', 'الشهيد', 'الشهید', 'الشکور', 'الصادق', 'الصبور', 'الصمد', 'الضار', 'الظاهر', 'العاطي', 'العاطی', 'العال', 'العالي', 'العالی', 'العباس', 'العدل', 'العزيز', 'العزیز', 'العظيم', 'العظیم', 'العفو', 'العلي', 'العليم', 'العلی', 'العلیم', 'الغفار', 'الغفور', 'الغني', 'الغنی', 'الفتاح', 'القابض', 'القادر', 'القدوس', 'القدير', 'القدیر', 'القهار', 'القوي', 'القوی', 'القيوم', 'القیوم', 'الكاظم', 'الكافي', 'الكبير', 'الكريم', 'اللطيف', 'اللطیف', 'الله', 'اللہ', 'المؤخر', 'المؤمن', 'الماجد', 'المالك', 'المالک', 'المانع', 'المبدئ', 'المبدي', 'المبدی', 'المتعالي', 'المتعالی', 'المتكبر', 'المتين', 'المتکبر', 'المتین', 'المجيب', 'المجيد', 'المجیب', 'المجید', 'المحسن', 'المحصي', 'المحصی', 'المحمود', 'المحيي', 'المحیی', 'المذل', 'المسيح', 'المسیح', 'المصور', 'المطلب', 'المعبود', 'المعز', 'المعطي', 'المعطی', 'المعيد', 'المعید', 'المغني', 'المغنی', 'المقتدر', 'المقدم', 'المقسط', 'المقصود', 'المقيت', 'المقیت', 'الملك', 'الملک', 'المميت', 'الممیت', 'المنان', 'المنتقم', 'المنعم', 'المهدي', 'المهدی', 'المهيمن', 'المهیمن', 'الموجود', 'الموخر', 'المولى', 'المولی', 'المومن', 'الناصر', 'النافع', 'النبي', 'النبی', 'النور', 'الهادي', 'الهادی', 'الواجد', 'الواحد', 'الوارث', 'الواسع', 'الوالي', 'الوالی', 'الودود', 'الوكيل', 'الولي', 'الولی', 'الوهاب', 'الوکیل', 'الکاظم', 'الکافی', 'الکبیر', 'الکریم')),)),)), + ('عبد', (('ar', 'bound_given', (('completed_by', ('الآخر', 'الأحد', 'الأكرم', 'الأمير', 'الأمیر', 'الأول', 'الأکرم', 'الإله', 'الاحد', 'الاخر', 'الاكرم', 'الاله', 'الامير', 'الامیر', 'الاول', 'الاکرم', 'البارئ', 'البارى', 'الباري', 'الباری', 'الباسط', 'الباطن', 'الباعث', 'الباقر', 'الباقى', 'الباقي', 'الباقی', 'البديع', 'البدیع', 'البر', 'البصير', 'البصیر', 'التواب', 'الجامع', 'الجبار', 'الجليل', 'الجلیل', 'الجواد', 'الحافظ', 'الحسن', 'الحسيب', 'الحسين', 'الحسیب', 'الحسین', 'الحفيظ', 'الحفیظ', 'الحق', 'الحكم', 'الحكيم', 'الحليم', 'الحلیم', 'الحميد', 'الحمید', 'الحى', 'الحي', 'الحکم', 'الحکیم', 'الحی', 'الخافض', 'الخالق', 'الخبير', 'الخبیر', 'الدائم', 'الدايم', 'الدایم', 'الرؤوف', 'الرازق', 'الرافع', 'الرب', 'الرحمان', 'الرحمن', 'الرحيم', 'الرحیم', 'الرزاق', 'الرسول', 'الرشيد', 'الرشید', 'الرضا', 'الرقيب', 'الرقیب', 'الرووف', 'الزهرة', 'الستار', 'السلام', 'السميع', 'السمیع', 'السند', 'الشافى', 'الشافي', 'الشافی', 'الشكور', 'الشهيد', 'الشهید', 'الشکور', 'الصادق', 'الصبور', 'الصمد', 'الضار', 'الظاهر', 'العاطى', 'العاطي', 'العاطی', 'العال', 'العالى', 'العالي', 'العالی', 'العباس', 'العدل', 'العزيز', 'العزیز', 'العظيم', 'العظیم', 'العفو', 'العلى', 'العلي', 'العليم', 'العلی', 'العلیم', 'الغفار', 'الغفور', 'الغنى', 'الغني', 'الغنی', 'الفتاح', 'القابض', 'القادر', 'القدوس', 'القدير', 'القدیر', 'القهار', 'القوى', 'القوي', 'القوی', 'القيوم', 'القیوم', 'الكاظم', 'الكافى', 'الكافي', 'الكبير', 'الكريم', 'اللطيف', 'اللطیف', 'الله', 'اللہ', 'المؤخر', 'المؤمن', 'الماجد', 'المالك', 'المالک', 'المانع', 'المبدئ', 'المبدى', 'المبدي', 'المبدی', 'المتعالى', 'المتعالي', 'المتعالی', 'المتكبر', 'المتين', 'المتکبر', 'المتین', 'المجيب', 'المجيد', 'المجیب', 'المجید', 'المحسن', 'المحصى', 'المحصي', 'المحصی', 'المحمود', 'المحيى', 'المحيي', 'المحیی', 'المذل', 'المسيح', 'المسیح', 'المصور', 'المطلب', 'المعبود', 'المعز', 'المعطى', 'المعطي', 'المعطی', 'المعيد', 'المعید', 'المغنى', 'المغني', 'المغنی', 'المقتدر', 'المقدم', 'المقسط', 'المقصود', 'المقيت', 'المقیت', 'الملك', 'الملک', 'المميت', 'الممیت', 'المنان', 'المنتقم', 'المنعم', 'المهدى', 'المهدي', 'المهدی', 'المهيمن', 'المهیمن', 'الموجود', 'الموخر', 'المولى', 'المولي', 'المولی', 'المومن', 'الناصر', 'النافع', 'النبى', 'النبي', 'النبی', 'النور', 'الهادى', 'الهادي', 'الهادی', 'الواجد', 'الواحد', 'الوارث', 'الواسع', 'الوالى', 'الوالي', 'الوالی', 'الودود', 'الوكيل', 'الولى', 'الولي', 'الولی', 'الوهاب', 'الوکیل', 'الکاظم', 'الکافی', 'الکبیر', 'الکریم')),)),)), ('لواء', (('ar', 'military', (('addresses', 'given'), ('same_as', 'اللواء'))),)), ('م', (('ar', 'academic', (('addresses', 'given'),)),)), ('م.د', (('ar', 'academic', (('addresses', 'given'),)),)), diff --git a/nameparser/config/_ko_surnames.py b/nameparser/config/_ko_surnames.py index 536305794..b08666a2f 100644 --- a/nameparser/config/_ko_surnames.py +++ b/nameparser/config/_ko_surnames.py @@ -22,6 +22,9 @@ "옥", "육", "인", "맹", "제", "모", "탁", "국", "은", "편", "용", "예", "경", "봉", "사", "부", "가", "복", "태", "목", "형", "계", "피", "두", + # past the cut, each a borne surname whose names stayed whole + # without it (#1215; decisions/W1, 2026-11-20) + "어", "라", # the two-syllable surnames in current use (census-complete); # longest-first matching splits 남궁민수 as 남궁+민수, not 남+궁민수 "남궁", "황보", "제갈", "사공", "선우", "서문", "독고", "동방", @@ -32,8 +35,10 @@ segmentation (``Lexicon.default().surnames``): a hangul token like "김민준" splits into surname + given name by longest match. This ships as DEFAULT vocabulary because it is self-selecting -- a hangul entry -can only ever match hangul text -- and hangul text is unambiguously -Korean. Chinese surnames deliberately live in ``nameparser.locales.zh`` +can only ever match hangul text -- and hangul text is read as +Korean, a foreign name written in hangul that opens with a listed +surname being the accepted cost (decisions/W1, 2026-11-20 #1215; +docs/east-asian.rst shows how to remove one). Chinese surnames deliberately live in ``nameparser.locales.zh`` instead (Han segmentation is opt-in; a zh list corrupts Japanese kanji names). diff --git a/nameparser/locales/hi.py b/nameparser/locales/hi.py index 8638f41ae..a9e983025 100644 --- a/nameparser/locales/hi.py +++ b/nameparser/locales/hi.py @@ -1,14 +1,14 @@ """The Hindi locale pack: vocabulary-only -- it chooses the language ``hi``, which turns on the readings nameparser/vocab/hi.toml writes -``default = false``: the romanized salutations ``shrimati``, ``smt`` -and ``shriyut``, which the default leaves to position, a Latin spelling -being one a name may have where the Devanagari cannot -(decisions/vocabulary-model, the 2026-10-30 phase 3e entry). Each is -then a title at the head of a name: ``Smt Nirmala Sitharaman`` gives -title ``Smt`` where the default gives given ``Smt``. ``shri`` is not -among them: it opens given names written in two words (``Shri Kant -Tripathi``) more often than it is the salutation, so it stays a name -word under the pack. +``default = false``: the romanized salutations ``shri``, ``shrimati``, +``smt`` and ``shriyut``, which the default leaves to position, a Latin +spelling being one a name may have where the Devanagari cannot +(decisions/vocabulary-model, the 2026-10-30 phase 3e entry, and its +2026-11-20 #1192 entry for ``shri``). Each is then a title at the head +of a name: ``Smt Nirmala Sitharaman`` gives title ``Smt`` where the +default gives given ``Smt``. ``shri`` also opens given names written in +two words (``Shri Kant Tripathi``), which read the title under the +pack, the cost of reading it for a roll that writes the salutation. Data sources: the counts on each reading in hi.toml (tools/name_usage.py, ORCID's given and family boxes by country among them). The pack carries diff --git a/nameparser/vocab/ar.toml b/nameparser/vocab/ar.toml index 4c56a50aa..52c113580 100644 --- a/nameparser/vocab/ar.toml +++ b/nameparser/vocab/ar.toml @@ -697,12 +697,14 @@ completed_by = [ "الاول", "الاکرم", "البارئ", + "البارى", "الباري", "الباری", "الباسط", "الباطن", "الباعث", "الباقر", + "الباقى", "الباقي", "الباقی", "البديع", @@ -731,6 +733,7 @@ completed_by = [ "الحلیم", "الحميد", "الحمید", + "الحى", "الحي", "الحکم", "الحکیم", @@ -764,6 +767,7 @@ completed_by = [ "السميع", "السمیع", "السند", + "الشافى", "الشافي", "الشافی", "الشكور", @@ -775,9 +779,11 @@ completed_by = [ "الصمد", "الضار", "الظاهر", + "العاطى", "العاطي", "العاطی", "العال", + "العالى", "العالي", "العالی", "العباس", @@ -787,12 +793,14 @@ completed_by = [ "العظيم", "العظیم", "العفو", + "العلى", "العلي", "العليم", "العلی", "العلیم", "الغفار", "الغفور", + "الغنى", "الغني", "الغنی", "الفتاح", @@ -802,11 +810,13 @@ completed_by = [ "القدير", "القدیر", "القهار", + "القوى", "القوي", "القوی", "القيوم", "القیوم", "الكاظم", + "الكافى", "الكافي", "الكبير", "الكريم", @@ -821,8 +831,10 @@ completed_by = [ "المالک", "المانع", "المبدئ", + "المبدى", "المبدي", "المبدی", + "المتعالى", "المتعالي", "المتعالی", "المتكبر", @@ -834,9 +846,11 @@ completed_by = [ "المجیب", "المجید", "المحسن", + "المحصى", "المحصي", "المحصی", "المحمود", + "المحيى", "المحيي", "المحیی", "المذل", @@ -846,10 +860,12 @@ completed_by = [ "المطلب", "المعبود", "المعز", + "المعطى", "المعطي", "المعطی", "المعيد", "المعید", + "المغنى", "المغني", "المغنی", "المقتدر", @@ -865,6 +881,7 @@ completed_by = [ "المنان", "المنتقم", "المنعم", + "المهدى", "المهدي", "المهدی", "المهيمن", @@ -872,23 +889,28 @@ completed_by = [ "الموجود", "الموخر", "المولى", + "المولي", "المولی", "المومن", "الناصر", "النافع", + "النبى", "النبي", "النبی", "النور", + "الهادى", "الهادي", "الهادی", "الواجد", "الواحد", "الوارث", "الواسع", + "الوالى", "الوالي", "الوالی", "الودود", "الوكيل", + "الولى", "الولي", "الولی", "الوهاب", @@ -898,8 +920,8 @@ completed_by = [ "الکبیر", "الکریم", ] -note = "\"abd\" (servant of): the script writes Abdul Rahman as two words, عبد + الرحمن, the article attaching to the word after it, so عبد alone covers the abdul/abdel/abdal spellings -- عبد الرحمن -> given \"عبد الرحمن\". completed_by lists the words that make it one name unit past the first name word (rules/P12): the 97 one-word names of God, الله, 27 other divine epithets and 14 devotional completions (المطلب, النبي, الحسين, المسيح) found after it in ORCID and JRC-Names, each with its hamza-less and Persian spellings -- سعيد عبد الله -> family \"عبد الله\". An unlisted word after it is left alone: a short given name stands alone there (نوال عبد هاشم), and a nisba surname opens with the article too (عبد القريشي; 2026-11-04, #694, decisions/P12). The Latin spellings list none, being written completes_any instead (#1464), and a word written second joins the word before it from its own bound_second reading (الدين, الله, #1072; decisions/P12)" -issue = [269, 694] +note = "\"abd\" (servant of): the script writes Abdul Rahman as two words, عبد + الرحمن, the article attaching to the word after it, so عبد alone covers the abdul/abdel/abdal spellings -- عبد الرحمن -> given \"عبد الرحمن\". completed_by lists the words that make it one name unit past the first name word (rules/P12): the 97 one-word names of God, الله, 27 other divine epithets and 14 devotional completions (المطلب, النبي, الحسين, المسيح) found after it in ORCID and JRC-Names, each with its hamza-less and Persian spellings and, for each word ending in ي, the spelling with a final ى that Egyptian names write, with المولي for المولى, the converse (#1337) -- سعيد عبد الله -> family \"عبد الله\". An unlisted word after it is left alone: a short given name stands alone there (نوال عبد هاشم), and a nisba surname opens with the article too (عبد القريشي; 2026-11-04, #694, decisions/P12). The Latin spellings list none, being written completes_any instead (#1464), and a word written second joins the word before it from its own bound_second reading (الدين, الله, #1072; decisions/P12)" +issue = [269, 694, 1337] [[word]] text = "الدين" diff --git a/nameparser/vocab/en.toml b/nameparser/vocab/en.toml index f702c9c0c..111cbb49e 100644 --- a/nameparser/vocab/en.toml +++ b/nameparser/vocab/en.toml @@ -497,6 +497,10 @@ military = {} text = "adm" military = { same_as = "admiral" } +[[word]] +text = "air-marshal" +military = { issue = 966, note = "the rank written with its hyphen, which tokenize keeps inside one word, so the spaced rank's phrase never reaches it. Measured with the other seven hyphenated ranks (#966, 2026-11-20): no local corpus name moves on this word (govuk-people's 6 moves are all vice-marshal); no source tools/name_usage.py reads has a bearer of any of the eight" } + [[word]] text = "amn" military = { expands = "Airman" } @@ -522,6 +526,10 @@ text = "brig" military = { same_as = "brigadier", abbreviation = true, attaches = ["gen", "general", "sir"], issue = 999, decided = 2026-11-03, note = "a title only inside a title phrase, its given reading the clash (rules/H9): 'Brig Gen Mark Kimmitt' and 'Brig General John Smith' read the title, 'Brig Klyce' the given name, and 'Brig. Saeed Akhtar' the title by H2's shape; written with its period at the end it is H5's trailing title ('JENKINS, ROBERT G. BRIG. GEN.'); no title before #999, so a bare 'Brig John Smith' reads given 'Brig' as it did" } given = { us_ssa = 72, as_of = 2026-11-03, note = "a rare given name: US SSA 72 births; PatentsView inventors 12 (US 11), ORCID given boxes 11 (India 3, likely the rank typed into the box); Wikidata none found; nam_dict not listed" } +[[word]] +text = "brigadier-general" +military = { issue = 966, note = "the rank written with its hyphen, which tokenize keeps inside one word, so the spaced rank's phrase never reaches it. Measured with the other seven hyphenated ranks (#966, 2026-11-20): no local corpus name moves on this word (govuk-people's 6 moves are all vice-marshal); no source tools/name_usage.py reads has a bearer of any of the eight" } + [[word]] text = "captain" military = {} @@ -539,6 +547,10 @@ credential = {} text = "ccmsgt" military = { expands = "Command Chief Master Sergeant" } +[[word]] +text = "chief-marshal" +military = { issue = 966, note = "the rank written with its hyphen, which tokenize keeps inside one word, so the spaced rank's phrase never reaches it. One of five added after the PR's review (#966, 2026-11-20): govuk-people 0 of 6,021 and ukec-individuals 0 of 15,214 names move; no source tools/name_usage.py reads has a bearer of it" } + [[word]] text = "cmsaf" military = { expands = "Chief Master Sergeant of the Air Force" } @@ -634,6 +646,10 @@ military = { expands = "Ensign" } text = "fadm" military = { expands = "Fleet Admiral" } +[[word]] +text = "field-marshal" +military = { issue = 966, note = "the rank written with its hyphen, which tokenize keeps inside one word, so the spaced rank's phrase never reaches it. One of five added after the PR's review (#966, 2026-11-20): govuk-people 0 of 6,021 and ukec-individuals 0 of 15,214 names move; no source tools/name_usage.py reads has a bearer of it" } + [[word]] text = "gaf" military = { expands = "General of the Air Force" } @@ -673,6 +689,18 @@ text = "lt" military = { same_as = "lieutenant", attaches = ["gen"], note = "attaches: Lt Gen (rules/H9, #999), the rank written short being a title only in a phrase" } credential = {} +[[word]] +text = "lieutenant-colonel" +military = { issue = 966, note = "the rank written with its hyphen, which tokenize keeps inside one word, so the spaced rank's phrase never reaches it. Measured with the other seven hyphenated ranks (#966, 2026-11-20): no local corpus name moves on this word (govuk-people's 6 moves are all vice-marshal); no source tools/name_usage.py reads has a bearer of any of the eight" } + +[[word]] +text = "lieutenant-commander" +military = { issue = 966, note = "the rank written with its hyphen, which tokenize keeps inside one word, so the spaced rank's phrase never reaches it. One of five added after the PR's review (#966, 2026-11-20): govuk-people 0 of 6,021 and ukec-individuals 0 of 15,214 names move; no source tools/name_usage.py reads has a bearer of it" } + +[[word]] +text = "lieutenant-general" +military = { issue = 966, note = "the rank written with its hyphen, which tokenize keeps inside one word, so the spaced rank's phrase never reaches it. Measured with the other seven hyphenated ranks (#966, 2026-11-20): no local corpus name moves on this word (govuk-people's 6 moves are all vice-marshal); no source tools/name_usage.py reads has a bearer of any of the eight" } + [[word]] text = "ltc" military = { expands = "Lieutenant Colonel" } @@ -705,6 +733,10 @@ military = { issue = 752, decided = 2026-10-25, attaches = ["gen", "general"], n given = { us_ssa = 21749, wikidata = 65, as_of = 2026-10-25, note = "US SSA: female and male births added" } family = { us_census_2010 = 20977, wikidata = 400, as_of = 2026-10-25 } +[[word]] +text = "major-general" +military = { issue = 966, note = "the rank written with its hyphen, which tokenize keeps inside one word, so the spaced rank's phrase never reaches it. Measured with the other seven hyphenated ranks (#966, 2026-11-20): no local corpus name moves on this word (govuk-people's 6 moves are all vice-marshal); no source tools/name_usage.py reads has a bearer of any of the eight" } + [[word]] text = "marshal" military = { issue = 752, decided = 2026-10-26, note = "a title only inside a title phrase, its given reading the clash (rules/H9): 'Field Marshal Bernard Montgomery' reads the title, 'Marshal Yanda' the given name; until 2026-10-26 excluded as a given name (#606)" } @@ -787,6 +819,10 @@ military = { expands = "Rear Admiral" } text = "rdml" military = { same_as = "radm" } +[[word]] +text = "rear-admiral" +military = { issue = 966, note = "the rank written with its hyphen, which tokenize keeps inside one word, so the spaced rank's phrase never reaches it. Measured with the other seven hyphenated ranks (#966, 2026-11-20): no local corpus name moves on this word (govuk-people's 6 moves are all vice-marshal); no source tools/name_usage.py reads has a bearer of any of the eight" } + [[word]] text = "sa" family = { us_census_2010 = 1600, wikidata = 182, as_of = 2026-10-24, note = "The Census writes no diacritics, so its 1,600 is Sa and Sá together (37.88% Asian/PI, so much of it is Korean, Chinese or Vietnamese Sa); Wikidata is a lower bound: 110 as Sá (Portugal, Brazil) plus 72 as Sa" } @@ -805,6 +841,10 @@ military = { attaches = ["maj", "major"], issue = 752, decided = 2026-10-26, not text = "sgt" military = { attaches = ["maj", "major"], issue = 752, decided = 2026-10-26, note = "attaches: Sergeant Major (rules/H9), and since #999 Sgt Maj; a word, not the military kind, which made Sgt Marshal Smith a title", same_as = "sergeant" } +[[word]] +text = "sergeant-major" +military = { issue = 966, note = "the rank written with its hyphen, which tokenize keeps inside one word, so the spaced rank's phrase never reaches it. One of five added after the PR's review (#966, 2026-11-20): govuk-people 0 of 6,021 and ukec-individuals 0 of 15,214 names move; no source tools/name_usage.py reads has a bearer of it" } + [[word]] text = "sfc" military = { expands = "Sergeant First Class" } @@ -858,6 +898,18 @@ military = { expands = "Technical Sergeant" } text = "vadm" military = { expands = "Vice Admiral" } +[[word]] +text = "vice-admiral" +military = { issue = 966, note = "the rank written with its hyphen, which tokenize keeps inside one word, so the spaced rank's phrase never reaches it. Measured with the other seven hyphenated ranks (#966, 2026-11-20): no local corpus name moves on this word (govuk-people's 6 moves are all vice-marshal); no source tools/name_usage.py reads has a bearer of any of the eight" } + +[[word]] +text = "vice-marshal" +military = { issue = 966, note = "the rank written with its hyphen, which tokenize keeps inside one word, so the spaced rank's phrase never reaches it. Measured with the other seven hyphenated ranks (#966, 2026-11-20): govuk-people 6 of 6,021 names gain a title, every one Air Vice-Marshal, the word they moved on; ukec-individuals 0 of 15,214 move; no source tools/name_usage.py reads has a bearer of any of the eight" } + +[[word]] +text = "wing-commander" +military = { issue = 966, note = "the rank written with its hyphen, which tokenize keeps inside one word, so the spaced rank's phrase never reaches it. One of five added after the PR's review (#966, 2026-11-20): govuk-people 0 of 6,021 and ukec-individuals 0 of 15,214 names move; no source tools/name_usage.py reads has a bearer of it" } + [[word]] text = "wo1" military = { expands = "Warrant Officer 1" } diff --git a/nameparser/vocab/hi.toml b/nameparser/vocab/hi.toml index 397dffa76..fd59039b0 100644 --- a/nameparser/vocab/hi.toml +++ b/nameparser/vocab/hi.toml @@ -10,7 +10,7 @@ excluded = { salutation = { reason = "Miss, the romanized कुमारी, wh [[word]] text = "shri" -excluded = { salutation = { reason = "the transliteration of श्री collides with real given names where the native script cannot: it opens given names, alone or written in two words (Shri Kant, Shri Lakshmi), 198 of ORCID's given boxes doing so, 52 of them holding it alone (its 2025 extract, 2026-10-30); nam_dict band 2 in India; Wikidata 7 given (2026-10-30). Turned on for Hindi and Bengali it broke 20 filed names and fixed none (decisions/vocabulary-model, the 2026-10-30 phase 3e entry)", issue = [345, 753], decided = 2026-10-30 } } +salutation = { default = false, gender = "m", issue = [345, 753, 1192], expands = "Shri, Mr., the romanized श्री", note = "on only under a Hindi choice, reversing its 2026-10-30 exclusion (decisions/vocabulary-model, 2026-11-20 #1192): the salutation before 2,244 of in_sansad's 10,650 spellings (opensanctions-parliaments, 2026-11-20); borne as a given name, opening ORCID's given boxes 198 times, 52 of them alone (Shri Kant, Shri Lakshmi; its 2025 extract, 2026-10-30), nam_dict band 2 in India, Wikidata 7 given (2026-10-30), which read title Shri under the pack, an accepted cost (Verma, Shri gives no given name): 20 filed records broken (fec-individuals 9, orcid-researchers 5, patentsview-inventors 4, psc-individuals 2) and 4 nepal-candidates names whose Devanagari is the one word श्रीनारायण (2026-11-20)", excluded = { after_given = "borne as a given name, so where it ends the given part it may be one (rules/H8); the Lok Sabha roll writes no Family, Given Shri, and with the property 2 names read worse (decisions/vocabulary-model, 2026-11-20 #1192)" } } [[word]] text = "shrimati" @@ -51,7 +51,7 @@ excluded = { salutation = { reason = "Begum is a trailing name element far more [[word]] text = "श्री" -salutation = { gender = "m", issue = [269, 870], expands = "Shri, Mr.", note = "no Latin twin: Latin sri and shri are given names (their exclusions in hi.toml); borne as a given name: Wikidata 1 people (2026-10-24); kept here, not as a `given` reading, which would make the title one only inside a title phrase (rules/H9). The Nepali given-name element is ne.toml's reading, off by default: nepal-candidates opens 216 Devanagari names with a spaced श्री (one written श्री.), romanized as a name word in 202 (Shree 194, Shri 6, Sri 2) and as Mr in 3 (Mr. twice, the glued Mr.Chatra once), a cost the default accepts for the Hindi, Marathi and Konkani salutation (rules/H9, #870, 2026-11-03)", excluded = { after_given = "also an element of given names (Sri, Shri), so where it ends the given part it may be one" } } +salutation = { gender = "m", issue = [269, 870], expands = "Shri, Mr.", note = "no Latin twin by default: Latin sri is a given name (its exclusion in hi.toml), and shri is a twin only under a Hindi choice, its reading written default = false (#1192); borne as a given name: Wikidata 1 people (2026-10-24); kept here, not as a `given` reading, which would make the title one only inside a title phrase (rules/H9). The Nepali given-name element is ne.toml's reading, off by default: nepal-candidates opens 216 Devanagari names with a spaced श्री (one written श्री.), romanized as a name word in 202 (Shree 194, Shri 6, Sri 2) and as Mr in 3 (Mr. twice, the glued Mr.Chatra once), a cost the default accepts for the Hindi, Marathi and Konkani salutation (rules/H9, #870, 2026-11-03)", excluded = { after_given = "also an element of given names (Sri, Shri), so where it ends the given part it may be one" } } [[word]] text = "श्रीमती" @@ -99,7 +99,7 @@ academic = { issue = 344, expands = "Dr., the डा. abbreviation (Nepali and o [[word]] text = "डॉ" -academic = { issue = 269, expands = "Dr., abbreviated", note = "डॉ. matches through the edge-period normalization, as Latin Dr. does; no Latin twins, for the reason the sri/shri exclusions in hi.toml give" } +academic = { issue = 269, expands = "Dr., abbreviated", note = "डॉ. matches through the edge-period normalization, as Latin Dr. does; no Latin twins, for the reason the sri exclusion and shri's default = false reading in hi.toml give" } [[word]] text = "डॉक्टर" diff --git a/nameparser/vocab/nl.toml b/nameparser/vocab/nl.toml index 0c367043b..eb67f5932 100644 --- a/nameparser/vocab/nl.toml +++ b/nameparser/vocab/nl.toml @@ -121,6 +121,11 @@ text = "vande" given = { note = "declared on the conservative default (decisions/vocabulary-collisions C-i): not examined, and no source counts it as a given name (2026-10-25)" } preposition = { issue = 18, expands = "van de contracted: \"Vande Casteele\"" } +[[word]] +text = "vanden" +given = { us_ssa = 154, as_of = 2026-11-20, note = "male births only; Wikidata lists no given-name bearer" } +preposition = { issue = 1239, expands = "van den contracted", note = "read as vander is: Pieter Vanden Broeck reads family Vanden Broeck, Vanden Broeck Pieter reports PARTICLE_OR_GIVEN under a family-first order. Scored against the filed boxes: ORCID 41 records fixed, none broken; PatentsView 22 fixed, 7 broken (Belgian names whose filer boxed Vanden with the given name); PSC 6 fixed, 2 broken (British names whose filers boxed Vanden as a middle name) (2026-11-20). Case repair writes it in lower case, as it writes vander and vande; Wikidata 6 family (France 2)" } + [[word]] text = "vander" given = { us_ssa = 1828, wikidata = 18, as_of = 2026-10-25, note = "male births only; Wikidata is a lower bound" } diff --git a/tests/v2/cases.py b/tests/v2/cases.py index c001036f2..b3f8b143d 100644 --- a/tests/v2/cases.py +++ b/tests/v2/cases.py @@ -22930,6 +22930,154 @@ def _check_cjk_shape_purity(self) -> None: "nickname": "Jack"}, classification="fix(#1164)", notes="a title followed by another opens the trailing run"), + Case("vanden_contracts_van_den_as_vander_does", + "Pieter Vanden Broeck", + {"given": "Pieter", "family": "Vanden Broeck"}, + classification="fix(#1239)"), + Case("vanden_before_a_family_comma", + "Vanden Broeck, Pieter", + {"given": "Pieter", "family": "Vanden Broeck"}, + notes="a guard: the comma fixed the family before #1239"), + Case("vanden_in_capitals_before_a_family_comma", + "VANDEN BROECK, PIETER", + {"given": "PIETER", "family": "VANDEN BROECK"}, + notes="a guard: the comma fixed the family before #1239"), + Case("vanden_after_a_family_comma_reports_the_particle", + "Broeck, Pieter Vanden", + {"given": "Pieter", "family": "Vanden Broeck"}, + ambiguities=("particle-or-given",), + classification="fix(#1239)", + notes="read as 'Broeck, Pieter Vander' is"), + Case("vanden_opening_a_family_first_name_reports_the_particle", + "Vanden Broeck Pieter", + {"given": "Broeck", "middle": "Pieter", "family": "Vanden"}, + policy=Policy(name_order=FAMILY_FIRST), + ambiguities=("particle-or-given",), + classification="fix(#1239)", + notes="a particle that may be a given name opening the name is " + "left to position and reported, as 'Vander Broeck Pieter' " + "is; the fields are 3.1.0's, the report is new"), + Case("hyphenated_rank_after_its_modifier", + "Air Vice-Marshal Ann Reed", + {"title": "Air Vice-Marshal", "given": "Ann", "family": "Reed"}, + classification="fix(#966)"), + Case("hyphenated_rank_before_another_title", + "Vice-Admiral Sir John Smith", + {"title": "Vice-Admiral Sir", "given": "John", "family": "Smith"}, + classification="fix(#966)"), + Case("hyphenated_rank_in_capitals", + "MAJOR-GENERAL JOHN SMITH", + {"title": "MAJOR-GENERAL", "given": "JOHN", "family": "SMITH"}, + classification="fix(#966)"), + Case("hyphenated_rank_after_a_family_comma", + "Reed, Air Vice-Marshal Ann", + {"title": "Air Vice-Marshal", "given": "Ann", "family": "Reed"}, + classification="fix(#966)"), + Case("hyphenated_rank_after_a_second_comma", + "Smith, John, Major-General", + {"title": "Major-General", "given": "John", "family": "Smith"}, + classification="fix(#966)", + notes="was suffix 'Major-General', reported"), + Case("hyphenated_rank_family_first", + "Lieutenant-General Cave Ian", + {"title": "Lieutenant-General", "given": "Ian", "family": "Cave"}, + policy=Policy(name_order=FAMILY_FIRST), + classification="fix(#966)"), + Case("korean_surname_eo_splits_an_unspaced_name", + "어수선", + {"given": "수선", "family": "어"}, + classification="fix(#1215)"), + Case("korean_surname_ra_splits_an_unspaced_name", + "라미란", + {"given": "미란", "family": "라"}, + classification="fix(#1215)"), + Case("korean_surname_ra_splits_a_foreign_name_in_hangul", + "라르스", + {"given": "르스", "family": "라"}, + classification="fix(#1215)", + notes="the accepted cost, decisions/W1 2026-11-20: hangul is " + "read as Korean"), + Case("abd_completed_by_the_alif_maqsura_spelling", + "سامر عبد القوى", + {"given": "سامر", "family": "عبد القوى"}, + classification="fix(#1337)", + notes="read as 'سامر عبد القوي' is"), + Case("abd_completed_by_the_alif_maqsura_spelling_family_first", + "سامر عبد القوى حسن", + {"given": "عبد القوى", "middle": "حسن", "family": "سامر"}, + policy=Policy(name_order=FAMILY_FIRST), + classification="fix(#1337)"), + Case("abd_completed_by_al_mawli", + "سامر عبد المولي", + {"given": "سامر", "family": "عبد المولي"}, + classification="fix(#1337)", + notes="المولى written with a final ي"), + Case("vanden_family_first_reads_the_particle_with_its_word", + "Pieter Vanden Broeck", + {"given": "Vanden Broeck", "family": "Pieter"}, + policy=Policy(name_order=FAMILY_FIRST), + classification="fix(#1239)"), + Case("vanden_in_lower_case_opening_a_family_first_name", + "vanden Broeck Pieter", + {"given": "Pieter", "family": "vanden Broeck"}, + policy=Policy(name_order=FAMILY_FIRST), + classification="fix(#1239)", + notes="a lower-case particle in a mixed-case name opens the family"), + Case("hyphenated_rank_alone_after_a_family_comma", + "Smith, Vice-Admiral", + {"title": "Vice-Admiral", "family": "Smith"}, + classification="fix(#966)"), + Case("hyphenated_rank_after_an_empty_head", + ", Rear-Admiral John Smith", + {"title": "Rear-Admiral", "given": "John", "middle": "Smith"}, + classification="fix(#966)"), + Case("hyphenated_rank_opening_the_part_before_a_family_comma", + "Vice-Admiral Smith, John", + {"title": "Vice-Admiral", "given": "John", "family": "Smith"}, + classification="fix(#966)", + notes="a listed title opening the part before a family comma"), + Case("hyphenated_rank_after_a_full_name_and_a_comma", + "John Smith, Lieutenant-Colonel", + {"title": "Lieutenant-Colonel", "given": "John", "family": "Smith"}, + classification="fix(#966)"), + Case("hyphenated_rank_ending_a_name_bare_stays_a_name_word", + "John Smith Rear-Admiral", + {"given": "John", "middle": "Smith", "family": "Rear-Admiral"}, + notes="a bare title word ending the name is a name word"), + Case("hyphenated_rank_unlisted_stays_a_name_word", + "Squadron-Leader Ann Reed", + {"given": "Squadron-Leader", "middle": "Ann", "family": "Reed"}, + notes="#966 lists thirteen ranks and splits no hyphen"), + Case("hyphenated_rank_british_after_its_modifier", + "Air Chief-Marshal Sir Hugh Dowding", + {"title": "Air Chief-Marshal Sir", "given": "Hugh", + "family": "Dowding"}, + classification="fix(#966)"), + Case("hyphenated_rank_field_marshal", + "Field-Marshal Bernard Lowe", + {"title": "Field-Marshal", "given": "Bernard", "family": "Lowe"}, + classification="fix(#966)"), + Case("hyphenated_rank_wing_commander_family_first", + "Wing-Commander Lau Wing Kin", + {"title": "Wing-Commander", "given": "Wing", "middle": "Kin", + "family": "Lau"}, + policy=Policy(name_order=FAMILY_FIRST), + classification="fix(#966)"), + Case("hyphenated_rank_sergeant_major_reports_no_fork_after_a_second_comma", + "Reed, Ann, Sergeant-Major", + {"title": "Sergeant-Major", "given": "Ann", "family": "Reed"}, + classification="fix(#966)", + notes="the spaced 'Sergeant Major' reports comma-structure here, " + "through major's given reading"), + Case("hyphenated_rank_british_naval", + "Lieutenant-Commander Ann Reed", + {"title": "Lieutenant-Commander", "given": "Ann", "family": "Reed"}, + classification="fix(#966)"), + Case("abd_completed_by_the_alif_maqsura_spelling_given_last", + "سامر عبد القوى", + {"given": "عبد القوى", "family": "سامر"}, + policy=Policy(name_order=FAMILY_FIRST_GIVEN_LAST), + classification="fix(#1337)"), # #1380: the Lao script writes no initials (rules/R7, the # script-property table's lao row), so a Lao letter with a full stop # is a name word to the policy switches, as a Thai one is @@ -23048,4 +23196,80 @@ def _check_cjk_shape_purity(self) -> None: locale="ru", notes="the Latin -ivna stays out with -ovych (decisions/R9's " "Open, #1212)"), + # #1192: shri is a salutation under locales.HI alone, written + # default = false in hi.toml (decisions/vocabulary-model, 2026-11-20) + Case("shri_opens_a_name_under_hi", + "Shri Ravi Kumar Verma", + {"title": "Shri", "given": "Ravi", "middle": "Kumar", + "family": "Verma"}, + locale="hi", classification="fix(#1192)"), + Case("shri_stays_a_given_name_by_default", + "Shri Ravi Kumar Verma", + {"given": "Shri", "middle": "Ravi Kumar", "family": "Verma"}, + notes="the reading is off unless a caller chooses Hindi"), + Case("shri_in_capitals_under_hi", + "SHRI RAVI KUMAR", + {"title": "SHRI", "given": "RAVI", "family": "KUMAR"}, + locale="hi", classification="fix(#1192)"), + Case("shri_before_one_name_under_hi", + "Shri Gopalan Nair", + {"title": "Shri", "given": "Gopalan", "family": "Nair"}, + locale="hi", classification="fix(#1192)"), + Case("shri_bare_ending_the_given_part_stays_a_name_word_under_hi", + "Verma, Ravi Shri", + {"given": "Ravi", "middle": "Shri", "family": "Verma"}, + locale="hi", + notes="shri is not written after_given, being borne as a given " + "name, so H8 leaves it a middle name, as the default does"), + Case("shri_dotted_ending_the_given_part_under_hi", + "Verma, Ravi Shri.", + {"title": "Shri.", "given": "Ravi", "family": "Verma"}, + locale="hi", classification="fix(#1192)", + notes="a listed title with a full stop ending the given part " + "is the title (rules/H5's trailing vocabulary)"), + Case("shri_after_a_full_name_and_a_comma_under_hi", + "Ravi Kumar, Shri", + {"title": "Shri", "given": "Ravi", "family": "Kumar"}, + locale="hi", classification="fix(#1192)"), + Case("shri_as_a_lone_given_name_after_a_family_comma_under_hi", + "Verma, Shri", + {"title": "Shri", "family": "Verma"}, + locale="hi", classification="fix(#1192)", + notes="the accepted cost: a person whose given name is Shri " + "reads the salutation and no given name under the pack"), + Case("shri_opening_a_given_name_of_two_words_under_hi", + "Shri Lal Mehra", + {"title": "Shri", "given": "Lal", "family": "Mehra"}, + locale="hi", classification="fix(#1192)", + notes="the accepted cost: a given name written in two words " + "that opens with Shri loses it to the title"), + Case("shri_behind_a_listed_title_under_hi", + "Dr. Shri Ravi Kumar", + {"title": "Dr. Shri", "given": "Ravi", "family": "Kumar"}, + locale="hi", classification="fix(#1192)"), + Case("shri_after_a_family_comma_under_hi", + "Verma, Shri Ravi", + {"title": "Shri", "given": "Ravi", "family": "Verma"}, + locale="hi", classification="fix(#1192)"), + Case("shri_before_a_family_comma_under_hi", + "Shri Verma, Ravi", + {"title": "Shri", "given": "Ravi", "family": "Verma"}, + locale="hi", classification="fix(#1192)"), + Case("shri_dotted_ending_the_name_under_hi", + "Ravi Kumar Shri.", + {"title": "Shri.", "given": "Ravi", "family": "Kumar"}, + locale="hi", classification="fix(#1192)", + notes="a listed title with a full stop ending the name is the " + "title; the default reads family 'Shri.'"), + Case("shri_alone_under_hi", + "Shri", + {"title": "Shri"}, + locale="hi", classification="fix(#1192)", + notes="as a lone Smt reads; the default reads given 'Shri'"), + Case("sri_stays_a_given_name_under_hi", + "Sri Ravi Kumar", + {"given": "Sri", "middle": "Ravi", "family": "Kumar"}, + locale="hi", + notes="sri stays excluded (an Indonesian and Sri Lankan given " + "name)"), ) diff --git a/tests/v2/test_cases.py b/tests/v2/test_cases.py index 1e678bb39..3e703f0ba 100644 --- a/tests/v2/test_cases.py +++ b/tests/v2/test_cases.py @@ -516,9 +516,12 @@ def test_the_field_sweep_sees_the_claims_it_checks() -> None: # the same day, #1164's alias rows ('Rahim Osman @ Jaki V', 'Ali @ X # @ Y Z V', 'Osman, Rahim @ Jaki PhD Ali', 'Jane née Jones @ JJ V', # 'Dr née Jones @ JJ V', 'Rahim Osman @ Jaki Jr. née Smith', 'Jane - # Smith @ JJ Jr. née') under three orders. - assert claims == 2238, ( - f"the field sweep checks {claims} claims, recorded as 2238 on " + # 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 " f"2026-11-20") @@ -1008,8 +1011,9 @@ def test_the_alternative_sweep_sees_the_fields_it_checks() -> None: # Jaki V', 'Ali @ X @ Y Z V'); 611 -> 614 and 497 -> 500 the same # 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 - assert (checked, skipped) == (614, 509), (checked, skipped) + # skipped; 614 -> 617 the same day, #1239's 'Broeck, Pieter Vanden' + # under three orders + assert (checked, skipped) == (617, 509), (checked, skipped) def test_every_case_name_is_unique() -> None: diff --git a/tests/v2/test_locales.py b/tests/v2/test_locales.py index 2959a7cdc..c58235559 100644 --- a/tests/v2/test_locales.py +++ b/tests/v2/test_locales.py @@ -379,7 +379,7 @@ def test_hi_and_bn_pack_contents() -> None: assert locales.BN == Locale(code="bn", lexicon=Lexicon.empty(), languages=frozenset({"bn"})) assert changed_words(selected(locales.HI.languages)) == { - "shrimati", "shriyut", "smt", "sushri"} + "shri", "shrimati", "shriyut", "smt", "sushri"} assert changed_words(selected(locales.BN.languages)) == { "adhyapak", "shrimati", "smt"} @@ -397,11 +397,18 @@ def test_hi_and_bn_read_the_romanized_salutation_as_the_title() -> None: # after a family comma, a salutation ending the given part is the # title (rules/H8), as its Devanagari spelling is assert packed.parse("Sitharaman, Nirmala Smt").title == "Smt" - # shri is left out (decisions/vocabulary-model, phase 3e): the - # given names written in two words that open with it keep it - assert packed.parse("Shri Kant Tripathi").as_dict() == parse( - "Shri Kant Tripathi").as_dict() assert packed.parse("Sushri Sangita Behera").given == "Sushri" + # shri is the title under hi alone (decisions/vocabulary-model, + # 2026-11-20 #1192); a given name written in two words that opens + # with it loses it there, the accepted cost, and bn leaves it alone + assert hi.parse("Shri Ravi Kumar Verma").title == "Shri" + assert (hi.parse("Shri Kant Tripathi").title, + hi.parse("Shri Kant Tripathi").given) == ("Shri", "Kant") + assert bn.parse("Shri Kant Tripathi").as_dict() == parse( + "Shri Kant Tripathi").as_dict() + # sri stays excluded under the pack + assert hi.parse("Sri Ravi Kumar").given == "Sri" + # adhyapak is a title only at the head and only under bn; the Marathi # family name ending a name keeps its place assert bn.parse("Adhyapak Anisuzzaman Khan").title == "Adhyapak" @@ -411,6 +418,29 @@ def test_hi_and_bn_read_the_romanized_salutation_as_the_title() -> None: assert bn.parse("Shriyut Ram Prasad").title == "" +def test_shri_peels_before_a_declared_order_lays_out_the_rest() -> None: + # #1192: the title is read first under every order, so a family-first + # caller's name words keep their declared places behind it, and a + # strict choice reads shri as the plain one does (no other file reads + # the word, so strict has nothing to gate) + for order, expect in ( + (GIVEN_FIRST, ("Ravi", "Kumar", "Verma")), + (FAMILY_FIRST, ("Kumar", "Verma", "Ravi")), + (FAMILY_FIRST_GIVEN_LAST, ("Verma", "Kumar", "Ravi"))): + for strict in (False, True): + packed = parser_for(locales.HI, strict=strict, + base=Parser(policy=Policy(name_order=order))) + name = packed.parse("Shri Ravi Kumar Verma") + assert (name.title, name.given, name.middle, name.family) == ( + ("Shri",) + expect), (order, strict) + for text in ("Shri Verma", "Verma, Shri Ravi"): + assert packed.parse(text).title == "Shri", (text, order) + assert packed.parse("Verma, Shri Ravi").given == "Ravi" + # not written after_given (rules/H8): bare, it ends the given + # part as a middle name + assert packed.parse("Verma, Ravi Shri").middle == "Shri" + + def test_sushri_is_the_title_only_under_a_strict_hindi_choice() -> None: # #345: hi.toml's sushri salutation is off by default and or.toml # declares the Odia given name, so the plain choice gates it (a title @@ -2419,9 +2449,9 @@ def _default_corpus() -> list[str]: ] # hi and bn: each romanized title at the head, in each case, behind a # listed title, after a family comma and before one (rules/H6); a dotted -# one where it ends the given part after a family comma (rules/H8) or -# ends the name (rules/H5), rules/H2's shape already reading it as a -# title at the head by default. +# one where it ends the given part after a family comma or ends the name +# (rules/H5's trailing vocabulary), rules/H2's shape already reading it +# as a title at the head by default. _ROTATORS["hi"] = [ "Shrimati Indira Gandhi", # shrimati at the head "SHRIMATI INDIRA GANDHI", # shrimati, in one case @@ -2439,6 +2469,14 @@ def _default_corpus() -> list[str]: "Shrimati Gandhi, Indira", # shrimati before a family comma (H6) "Smt. Sitharaman, Nirmala", # smt, dotted, before a family comma ", Nirmala Smt.", # smt, dotted, after an empty head + "Shri Ravi Kumar Verma", # shri at the head + "SHRI RAVI KUMAR", # shri, in one case + "Dr. Shri Ravi Kumar", # shri behind a listed title + "Verma, Shri Ravi", # shri after a family comma + "Verma, Ravi Shri.", # shri, dotted, ending the given part + "Shri Verma, Ravi", # shri before a family comma (H6) + "Ravi Kumar Shri.", # shri, dotted, ending the name (H5) + ", Ravi Shri.", # shri, dotted, after an empty head # sushri: or.toml's Odia given name gates it under the plain choice, # so it is a title only inside a title phrase, a style's partner # (rules/H9); at the head, behind Dr. and after a family comma it @@ -3643,9 +3681,10 @@ def test_the_sb_mask_keeps_the_degrees_capitals_under_pt_br() -> None: ("הרב משה פיינשטיין שליט״א", "title", "הרב"), # Devanagari (hi/mr) titles -- a new #269 script: श्री/श्रीमती are # the Mr./Mrs. analogs, डॉ the Dr. abbreviation (edge-period - # normalization makes "डॉ." match too). NO Latin twins on purpose: + # normalization makes "डॉ." match too). NO Latin twins by default: # transliterated sri/shri collide with real given names (Sri - # Mulyani); the native script cannot. + # Mulyani); the native script cannot. Shri is one under locales.HI + # alone (#1192). ("श्री राम शर्मा", "title", "श्री"), ("श्रीमती सीता शर्मा", "title", "श्रीमती"), ("डॉ राम शर्मा", "title", "डॉ"), diff --git a/tools/differential/corpus_cjk.jsonl b/tools/differential/corpus_cjk.jsonl index 0304d84ec..063bd90fe 100644 --- a/tools/differential/corpus_cjk.jsonl +++ b/tools/differential/corpus_cjk.jsonl @@ -175,6 +175,8 @@ "남궁" "남궁민수" "남궁민수, 지훈" +"라르스" +"라미란" "로버트 다우니 주니어" "마이클·잭슨" "마이클.잭슨" @@ -186,6 +188,7 @@ "양 지훈" "양 지훈." "양. 지훈" +"어수선" "이, J.씨" "이, J.씨." "지훈, 남궁민수" diff --git a/tools/differential/corpus_rules.jsonl b/tools/differential/corpus_rules.jsonl index 65c5305d1..6e43cfa7a 100644 --- a/tools/differential/corpus_rules.jsonl +++ b/tools/differential/corpus_rules.jsonl @@ -2118,6 +2118,7 @@ "د/أحمد علي حسن" "سامر بن الله" "سامر ذو الغنى" +"سامر عبد القوى" "سامر عز الدين" "سامر نور الدين حداد" "سعيد عبد الله" diff --git a/tools/differential/snapshot.jsonl b/tools/differential/snapshot.jsonl index 66c40ec45..71d64cd9e 100644 --- a/tools/differential/snapshot.jsonl +++ b/tools/differential/snapshot.jsonl @@ -6206,6 +6206,7 @@ {"name": "سامانتا", "order": "FAMILY_FIRST", "given": "سامانتا", "ambiguities": ["GIVEN_OR_FAMILY"], "alternatives": ["GIVEN_OR_FAMILY: name as family (position)"]} {"name": "سامر بن الله", "given": "سامر", "family": "بن الله", "patronymic": "بن الله"} {"name": "سامر ذو الغنى", "given": "سامر", "family": "ذو الغنى"} +{"name": "سامر عبد القوى", "given": "سامر", "family": "عبد القوى"} {"name": "سامر عز الدين", "given": "سامر", "family": "عز الدين"} {"name": "سامر نور الدين حداد", "given": "سامر", "middle": "نور الدين", "family": "حداد"} {"name": "سامي الكيالي", "given": "سامي", "family": "الكيالي"} @@ -7665,6 +7666,8 @@ {"name": "남다름", "given": "다름", "family": "남"} {"name": "노유상", "given": "유상", "family": "노"} {"name": "도민호", "given": "민호", "family": "도"} +{"name": "라르스", "given": "르스", "family": "라"} +{"name": "라미란", "given": "미란", "family": "라"} {"name": "로버트 다우니 주니어", "given": "다우니", "family": "로버트", "suffix": "주니어", "generation": "주니어"} {"name": "류효영", "given": "효영", "family": "류"} {"name": "마이클·잭슨", "given": "마이클", "family": "잭슨"} @@ -7709,6 +7712,7 @@ {"name": "양 지훈", "given": "지훈", "family": "양"} {"name": "양 지훈.", "given": "지훈.", "family": "양"} {"name": "양. 지훈", "given": "지훈", "family": "양."} +{"name": "어수선", "given": "수선", "family": "어"} {"name": "에이다 코넬리아 세사르 마르틴 폰 볼프 박사", "given": "코넬리아", "middle": "세사르 마르틴 폰 볼프", "family": "에이다", "suffix": "박사"} {"name": "오정숙", "given": "정숙", "family": "오"} {"name": "유명희", "given": "명희", "family": "유"}