diff --git a/docs/design/decisions/3-0-reevaluations.md b/docs/design/decisions/3-0-reevaluations.md index 5d9c91093..bf1d82aff 100644 --- a/docs/design/decisions/3-0-reevaluations.md +++ b/docs/design/decisions/3-0-reevaluations.md @@ -24,7 +24,7 @@ Not standing: the harness bullet, that the snapshot and `compare.py` cannot show Elsewhere: the explicit-comma line narrowed to a description for CJK script — decisions/cjk-comma-demotion's 2026-09-01 #469, SCOPES the FAMILY_COMMA bullet entry; the 1.4 gate the harness-baseline bullet expected 3.0 to dissolve, already retired, `compare.py --baseline 1.4.0` answering the question when asked — decisions/differential-ledger's 2026-10-13 #664 entries; the vocabulary model packs are to narrow, a strict pack dropping other languages' readings — decisions/vocabulary-model's 2026-10-15/16 entry; what the shim's filter kept and dropped until #357 — decisions/R4's 2026-10-02 #541 and 2026-10-02 #582 entries. -Open: #753 (phase 3, language packs; the three pack bullets carried out by its 3b, 2026-10-29, and 3.0's packs shipped after it, from `locales.NE` to `locales.ES_AR`; a pack past 3.0, as `is` is in #1074, is the issue's). +Open: [#1074](https://github.com/derek73/python-nameparser/issues/1074), an `is` pack, a pack past 3.0. #753 (phase 3, language packs) closed on 2026-11-08, its three pack bullets carried out by its 3b, 2026-10-29, and 3.0's packs shipped after it, from `locales.NE` to `locales.ES_AR`. ## Log diff --git a/docs/design/decisions/C11-what-the-comma-decision-reports.md b/docs/design/decisions/C11-what-the-comma-decision-reports.md index e26055d66..200cdf2e4 100644 --- a/docs/design/decisions/C11-what-the-comma-decision-reports.md +++ b/docs/design/decisions/C11-what-the-comma-decision-reports.md @@ -6,7 +6,7 @@ - A word of the ambiguous class its capitals settle carries no report wherever it stands in the part after the comma (`Doe, MA PhD`, `John Smith, MA MA`, `Smith, MA PhD`, `John Smith, PhD MA`, `John Smith, MA` are silent), a word the capitals do not settle reporting as before (`Doe, Ma PhD`, `JOHN SMITH, MA`) — 2026-10-25 #785, superseding the 2026-10-01 report on an opening word; no `suffix-or-name` report lands past the second comma (`Smith, John, MA`, `John Smith, Jr., MA`) — 2026-10-01. - The part after a suffix comma reports each word a credential in front of it reads as the run although it may be a name word (`John Smith, PhD van der Berg` → `suffix-or-name` on 'van', 'der' and 'Berg'), and C2's no-name-reading clause means only a word read as a name — 2026-10-11 #641. -Elsewhere: no particle chain reaches such a part at all, which replaced #544's withheld report list: the part after a suffix comma is bound before any join — decisions/C1's 2026-10-06 (Derek), #613 entry — and a part past the second comma makes no chain — decisions/C7's 2026-10-11 (Derek), #636 entry; `pair_only` asks `is_title_piece` — decisions/C5's 2026-10-19 (Derek), follow-up to PR #738 entry; the listed-member report names the role its word is bound to ("a title" for `John, Si.`, "a credential" for `John, MA`) — decisions/suffix-acronym-collisions' 2026-10-21 (#793) entry and decisions/A1's 2026-10-21 #793 entry; a maiden marker past the second comma being an ordinary word, so `Smith, John, Jr nee Jones MA` reads suffix 'Jr nee Jones MA' where the 2026-10-01 entry read a maiden clause — decisions/M2's 2026-10-04 (Derek), #601 entry. +Elsewhere: no particle chain reaches such a part at all, which replaced #544's withheld report list: the part after a suffix comma is bound before any join — decisions/C1's 2026-10-06 (Derek), #613 entry — and a part past the second comma makes no chain — decisions/C7's 2026-10-11 (Derek), #636 entry; `pair_only` asks `is_title_piece` — decisions/C5's 2026-10-19 (Derek), follow-up to PR #738 entry; the listed-member report names the role its word is bound to ("a title" for `John, Si.`, "a given name" for `John, Ma`) — decisions/suffix-acronym-collisions' 2026-10-21 (#793) entry and decisions/A1's 2026-10-21 #793 entry; a maiden marker past the second comma being an ordinary word, so `Smith, John, Jr nee Jones MA` reads suffix 'Jr nee Jones MA' where the 2026-10-01 entry read a maiden clause — decisions/M2's 2026-10-04 (Derek), #601 entry. Open: none in this file. diff --git a/docs/design/decisions/C3-counting-the-words-before-the-comma.md b/docs/design/decisions/C3-counting-the-words-before-the-comma.md index 928fd2549..89d06abbd 100644 --- a/docs/design/decisions/C3-counting-the-words-before-the-comma.md +++ b/docs/design/decisions/C3-counting-the-words-before-the-comma.md @@ -11,7 +11,7 @@ - A suffix word opening the part is a name word to the count where a name word follows it, so the part reads as it does alone under every order: the first word behind any titles, a dual counting as the title it also is, a title behind it no name word, a split credential's member excepted: `Md Rahman, PhD` → given 'Md', family 'Rahman'; `JP Clancy, MD` → given 'JP'; `Dr. Md Rahman, Ing` → given 'Md'; `Md Prof., PhD` → family 'Md Prof.'; `MB ChB, PhD` → family 'MB ChB' — 2026-11-02 #1017. - A numeral of two or more letters ending the part, or standing before the suffix words it ends with, that the trailing fork reads as the generation is no name word, as a listed one is not, and P3's three-word count asks the same of a name ending in one: `Dumas VI, Jr.` → family 'Dumas', suffix 'VI, Jr.', as `Dumas III, Jr.` reads, and `Dumas VI MD, Ed` → given 'Ed', family 'Dumas'; `Ortega y Gasset VI` and `Ortega y Gasset VI MD` → family 'Gasset'. A one-letter numeral keeps S10's words-to-spare count (`Dumas X, Jr.` → given 'Dumas', family 'X'), and a chained salutation's connectives keep counting (`Mr. and Mrs. and Dr., Jr.`) — 2026-11-04 (Derek), #893. -Elsewhere: the count runs once, in `_comma.decide` over classify's tags, with `name_word_count`'s vocabulary view held equal to them; a connective surname counts its words (`Ortega y Gasset, Dr.` → title 'Dr.', given 'Ortega', middle 'y', family 'Gasset' under the default order; `Ortega y Gasset, Ed` → suffix 'Ed'); and a part before the comma that is one name word with a suffix in it counts as the listing form's one word (`Smith Jr., Esq.` → family 'Smith', suffix 'Jr., Esq.'; `Smith Jr., V` → given 'V', family 'Smith', suffix 'Jr.') — decisions/C1's 2026-10-06 (Derek), #613 entry, its decisions (1) and (4); what keeps `Freiherr` in the family is the particle stop, not the rank's history, so `Graf Lambsdorff, Otto` reads title 'Graf' — decisions/H6's 2026-10-17 (Derek), #701 entry; a given-name title alone after the comma makes a lone surname the given name (`Cruz, Sir` and `Smith Jr., Sir` → given 'Cruz', 'Smith') while a particle surname keeps the family (`van der Berg, Sir` → family 'van der Berg') — decisions/H1's 2026-10-18 #720 entry; a listed title opening the part before a family comma peels (`Prof. Cruz, Ed` → title 'Prof.', given 'Ed', family 'Cruz'), which this file's #575 entry had read as part of the family — decisions/H6's 2026-10-17 #701 entry. +Elsewhere: the count runs once, in `_comma.decide` over classify's tags, with `name_word_count`'s vocabulary view held equal to them; a connective surname counts its words (`Ortega y Gasset, Dr.` → title 'Dr.', given 'Ortega', middle 'y', family 'Gasset' under the default order; `Ortega y Gasset, Ed` → suffix 'Ed'); and a part before the comma that is one name word with a suffix in it counts as the listing form's one word (`Smith Jr., Esq.` → family 'Smith', suffix 'Jr., Esq.'; `Smith Jr., V` → given 'V', family 'Smith', suffix 'Jr.') — decisions/C1's 2026-10-06 (Derek), #613 entry, its decisions (1) and (4); what keeps `Freiherr` in the family is the particle stop, not the rank's history, so `Herzog Lambsdorff, Otto` reads title 'Herzog', while `Graf`, a rank particle since decisions/vocabulary-collisions (#709), keeps the family `Graf Lambsdorff` — decisions/H6's 2026-10-17 (Derek), #701 entry; a given-name title alone after the comma makes a lone surname the given name (`Cruz, Sir` and `Smith Jr., Sir` → given 'Cruz', 'Smith') while a particle surname keeps the family (`van der Berg, Sir` → family 'van der Berg') — decisions/H1's 2026-10-18 #720 entry; a listed title opening the part before a family comma peels (`Prof. Cruz, Ed` → title 'Prof.', given 'Ed', family 'Cruz'), which this file's #575 entry had read as part of the family — decisions/H6's 2026-10-17 #701 entry. Open: none in this file. 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 205d866c6..862f72913 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,9 +6,9 @@ - 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: [#1296](https://github.com/derek73/python-nameparser/issues/1296), whether `E.T. Smith` reads given 'E.', middle 'T.', the other half of #490, left out of #490's fix as its 2026-10-02 comment proposed. 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. -Elsewhere: why a run of single letters joined by full stops stays one word and is never divided, decisions/period-joined-words. +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.'). ## Log diff --git a/docs/design/decisions/H2-leading-abbreviation-title.md b/docs/design/decisions/H2-leading-abbreviation-title.md index ee400ae0f..4bd991ff0 100644 --- a/docs/design/decisions/H2-leading-abbreviation-title.md +++ b/docs/design/decisions/H2-leading-abbreviation-title.md @@ -7,10 +7,10 @@ - The shape declines a period-marked word carrying a letter of the ten Brahmic scripts from Devanagari to Sinhala (U+0900 to U+0DFF), an Except of rules/H2, so a Latin initial spelled there with no vowel sign is no title: `एम. एस. वर्मा` → given 'एम.', middle 'एस.' — 2026-11-08 #1191. - The shape declines a period-marked word carrying a script that writes no period abbreviations (Han, kana, hangul; Thai and Burmese write no initials but are not among them, decisions/script-properties): `田中. 太郎` → family '田中.', where `Smith. John` keeps title 'Smith.' — 2026-09-10. - C13 wins for a credential opening the part after a family comma (`Smith, Esq. John` → suffix 'Esq. John'), and the shape still reads a title there for a word that starts no S8 run (`Smith, Insp. John`, `Smith, Do. John` → title) — 2026-10-20 #761; its `Smith, Ma. John` example moved to the given name on 2026-10-26 #789. -- A given name written short outranks the shape: a word the vocabulary lists with a `given` reading whose `same_as` is the full name, period-marked where the shape would fire, is the given name and the name reads as it would with the full name there (`Chas. Smith` → given 'Chas.', `Mrs Ma. Liza Cruz` → title 'Mrs', given 'Ma.'). The shipped set is the traditional English abbreviations, the Filipino `ma` and `jo`, and since #1115 Muhammad, Achmad and Francisco written short (`mohd`, `mhd`, `muh`, `moh`, `moch`, `ach`, `fco`; decisions/H6's 2026-11-06 entry); a listed title still wins, and the reading acts nowhere else — 2026-10-26 #789. +- A given name written short outranks the shape: a word the vocabulary lists with a `given` reading whose `same_as` is the full name, period-marked where the shape would fire, is the given name and the name reads as it would with the full name there (`Chas. Smith` → given 'Chas.', `Mrs Ma. Liza Cruz` → title 'Mrs', given 'Ma.'). The shipped set is the traditional English abbreviations, the Filipino `ma` and `jo`, since #1115 Muhammad, Achmad and Francisco written short (`mohd`, `mhd`, `muh`, `moh`, `moch`, `ach`, `fco`; decisions/H6's 2026-11-06 entry), Sheikh written short (`sk`, #1129) and since #1383 `md`; a listed title still wins — 2026-10-26 #789. - A transliteration digraph declines the shape, an Except of rules/H2: the Latin spellings of one Cyrillic letter that are no title in any corpus read, `Yu`, `Ya`, `Ye`, `Yo`, `Zh`, `Kh`, `Shch` and `Dzh`, in any case, so `Yu. A. Chibrikova` → given 'Yu.', middle 'A.', as `Ю. А. Чибрикова` reads; `Ts`, `Ch` and `Sh`, each also a title written short, keep the shape, and a digraph of another alphabet or a Latin given name written short (`Th.`) is outside the set — 2026-11-09 #1136. -Elsewhere: #316's question 2, a symmetric leading rule reading `Esq. Smith` as a suffix, is declined and the trailing slot reads vocabulary, decisions/H5's 2026-09-08 #316 entry (the undated `Decided 2026-09-08` paragraph below records the hook it closed here); the shape does not fire before a family comma, decisions/H6's 2026-10-17 #701 and 2026-10-18 #710 entries; a letter typed decomposed is the same letter to the shape, decisions/nfd-shapes' 2026-10-12 #652 entry, and the script veto reads the composed spelling, its 2026-10-13 #665 entry; halfwidth katakana is classified since #594 (decisions/W4). +Elsewhere: #316's question 2, a symmetric leading rule reading `Esq. Smith` as a suffix, is declined and the trailing slot reads vocabulary, decisions/H5's 2026-09-08 #316 entry (the undated `Decided 2026-09-08` paragraph below records the hook it closed here); the shape does not fire before a family comma, decisions/H6's 2026-10-17 #701 and 2026-10-18 #710 entries; a letter typed decomposed is the same letter to the shape, decisions/nfd-shapes' 2026-10-12 #652 entry, and the script veto reads the composed spelling, its 2026-10-13 #665 entry; halfwidth katakana is classified since #594 (decisions/W4); a given name written short opening the given part after a family comma (`Rahman, Md` → given 'Md'), decisions/C13's 2026-11-14 #1393 entry; one glued to the next word at its full stop, divided there (`Md.Karim Uddin` → given 'Md.'), decisions/T8. Open: none in this file. @@ -37,3 +37,4 @@ Decided 2026-09-08 (was Open: [#316](https://github.com/derek73/python-nameparse - **Measured** against master b89c5482: the committed snapshot moves no name (the eight it gains are the rule's examples); `snapshot.py --local --base ` matches the base for nepal-candidates, ctgov-officials and patentsview-inventors; `local_agreement.py --base ` matches it for psc-individuals and changes 2 orcid-researchers records, both toward the boxes their filers typed. opensanctions-parliaments was not re-measured, its cache predating the tool's dataset list; the scan above found no digraph of the set opening a name there. - **The glued word**, decisions/period-joined-words' entry of this date: the set is also what that file counts as a chunk read on its own. - **Its signal.** The clause reads neither the shape nor the script but a closed list of spellings, held in code (`_vocab._DIGRAPH_INITIALS`) rather than in the vocabulary, so a caller cannot remove a member from the set, but restores the title reading by listing the word as a title, which outranks the shape (`Lexicon.default().add("yu", kind="title")` reads `Yu. A. Chibrikova` title 'Yu.'), and a caller's `given` reading with `same_as` still reaches any word. It is a third reading beside the shape and the two script vetoes the #1191 entry names, which adds to the question a split of H2 would settle; a reading property in the TOML marking an initial was not weighed against it, only `same_as`. +- 2026-11-16 #1393 — THE READING ACTS BEYOND THE HEAD OF A NAME. The 2026-10-26 #789 line said a given name written short acts nowhere but where H2's shape would fire; decisions/C13's 2026-11-14 #1393 entry reads one opening the given part after a family comma (`Rahman, Md` → given 'Md', reported), and rules/T8 divides one glued to the next word at its full stop (`Md.Karim Uddin` → given 'Md.', decisions/T8). The Standing line drops the clause and names `sk` (#1129) and `md` (#1383) in the shipped set. Found by the 3.1 release sweep. diff --git a/docs/design/decisions/H4-input-that-is-nothing-but-vocabulary-still-has-to-name-somebody.md b/docs/design/decisions/H4-input-that-is-nothing-but-vocabulary-still-has-to-name-somebody.md index 3857083ad..3bec9c492 100644 --- a/docs/design/decisions/H4-input-that-is-nothing-but-vocabulary-still-has-to-name-somebody.md +++ b/docs/design/decisions/H4-input-that-is-nothing-but-vocabulary-still-has-to-name-somebody.md @@ -10,7 +10,7 @@ - A lone name unit that is a join carrying title vocabulary reports `title-or-name` too (`John of Bishop`, `Smith and Bishop`; `prince` was the example until it left TITLES on 2026-10-27, decisions/H9), stated since 2026-10-20 as rules/H7 — 2026-09-07 #491. - The join clause (rules/H7's, recorded here) stands beside the peel clause, so a peeled title, a maiden name or a claimed word does not silence it (`Dr. Smith and Bishop`, `van and Bishop`, `Attorney General of Minnesota` report) — 2026-09-08 #518. -Elsewhere: the title run's floor that leaves `Pope` standing in `Dr Pope Jr` and `Dr. Pope MD`, both reporting here, is decisions/H3's 2026-09-08 entry; the suffix and join halves' `detail` naming the field the word lands in, which moves with the order (`Rinpoche` 'a given name' by default, 'a family name' family-first), is decisions/A1's 2026-10-08 #626 entry; the join clause's move into a rule of its own is decisions/H7's 2026-10-20 #761 entry. +Elsewhere: the title run's floor that leaves `Pope` standing in `Dr Pope Jr` and `Dr. Pope MD`, both reporting here, is decisions/H3's 2026-09-08 entry; the suffix and join halves' `detail` naming the field the word lands in, which moves with the lone name word's convention (`Rinpoche` 'a given name' under every order, 'a family name' under `Policy(lone_name_word=Role.FAMILY)`, decisions/O5), is decisions/A1's 2026-10-08 #626 entry; the join clause's move into a rule of its own is decisions/H7's 2026-10-20 #761 entry. Open: none in this file. diff --git a/docs/design/decisions/H5-trailing-title-run.md b/docs/design/decisions/H5-trailing-title-run.md index 6e841cfc6..20a57183d 100644 --- a/docs/design/decisions/H5-trailing-title-run.md +++ b/docs/design/decisions/H5-trailing-title-run.md @@ -15,7 +15,7 @@ - A title that may be a given name (rules/H9) is title vocabulary to the chain only where its title reading is written short (`abbreviation`, `maj` and `gen`): `SMITH, JOHN B. MAJ.` → title 'MAJ.', while `John Karimi Mahdi.` keeps family 'Mahdi.' — 2026-11-03 #999. - A word ending in a period and written with a period or a hyphen inside it wears the chain's shape, so a listed title written that way chains (`Hans Meier Priv.-Doz.` → title 'Priv.-Doz.', family 'Meier'), and so does a word rules/S3 reads as a title by a chunk (`John Smith Dipl.Ing.`) — 2026-11-06 #1116. Without the final period, a title listed whole with a period inside it chains (`Maria Rossi Dott.ssa` → title 'Dott.ssa'), while a title only by a chunk and one a hyphen alone joins (`John Smith Co-Founder`, `д-р`) stay name words — 2026-11-06 #1104. A word every one of whose period chunks is a title chains without a final period too (`John Smith Lt.Gov` → title 'Lt.Gov'), while one a title only by some chunk does not (`John Smith Dr.PhD` → family 'Dr.PhD') — 2026-11-07 #1131. -Elsewhere: a maiden clause in front of a trailing title is no join that hides it (`Mary Smith née Jones Prof.` → title 'Prof.'), decisions/M2's 2026-09-26 #535 entry; a bare ambiguous acronym ending the given part after a family comma is the credential, so `Doe, John Prof. MA` reads title 'Prof.', suffix 'MA', decisions/S5's 2026-09-18 #531 entry on the comma report's reach; the bound join after a family comma declines a title word this run takes (`Berg, abdul Prof.` → title 'Prof.'), decisions/P5's 2026-10-11 #637 entry; a part past the second comma makes no particle chain, so `John Smith, Jr., van der Berg Prof.` reads title 'Prof.', decisions/C7's 2026-10-11 #636 entry; a report names the field its word lands in, closing the `Dr. John of Prince` detail mismatch, decisions/A1's 2026-10-08 #626 entry; the cost of a period behind an ordinary surname that is title vocabulary (`Mary Jane King.` → title 'King.', family 'Jane') is the trailing-position bullet of decisions/vocabulary-exclusions. +Elsewhere: a maiden clause in front of a trailing title is no join that hides it (`Mary Smith née Jones Prof.` → title 'Prof.'), decisions/M2's 2026-09-26 #535 entry; a bare ambiguous acronym ending the given part after a family comma is the credential, so `Doe, John Prof. MA` reads title 'Prof.', suffix 'MA', decisions/S5's 2026-09-18 #531 entry on the comma report's reach; the bound join after a family comma declines a title word this run takes (`Berg, abdul Prof.` → title 'Prof.'), decisions/P5's 2026-10-11 #637 entry; a part past the second comma makes no particle chain, so `John Smith, Jr., van der Berg Prof.` reads title 'Prof.', decisions/C7's 2026-10-11 #636 entry; a report names the field its word lands in, closing the `Dr. John of Prince` detail mismatch, decisions/A1's 2026-10-08 #626 entry; the cost of a period behind an ordinary surname that is title vocabulary (`Mary Jane Pope.` → title 'Pope.', family 'Jane') is the trailing-position bullet of decisions/vocabulary-exclusions. Open: none in this file. diff --git a/docs/design/decisions/M2-maiden-marker-rule.md b/docs/design/decisions/M2-maiden-marker-rule.md index 9c8918777..7fee452f5 100644 --- a/docs/design/decisions/M2-maiden-marker-rule.md +++ b/docs/design/decisions/M2-maiden-marker-rule.md @@ -31,9 +31,9 @@ Not standing: the deviation recorded rather than repaired by 2026-09-22 #397 follow-up, settled by 2026-10-03 #549 (the #538 entry it superseded is marked so in its head); the #548 deferral of 2026-09-26 #535, closed into #601 and #602; the trailing-title follow-up drafted for Derek by 2026-09-19 (Derek), #533; #535 took it; the skeleton migration of 2026-10-19 #761, carried out. -Elsewhere: a maiden name not making H1 decline (`Dr. Jane née Smith` → family 'Jane') — decisions/H1's 2026-08-25 (#410) entry; a one-letter numeral needing words to spare in the clause-free name, which keeps the V of `John née Jones Smith V` in the maiden name — decisions/S10's 2026-10-17 (Derek), #718 entry; a marked clause in brackets, read whole as the maiden name under the default policy — decisions/M3; a comma after a marker inside a clause unmarking it, and the divergence between M3's whitespace test and tokenize living on through the nakaguro (`佐藤 花子 "旧姓・田中" (旧姓 鈴木)` → nickname '旧姓 田中', maiden '鈴木') — decisions/N1's 2026-10-12 #653 entry and decisions/M3; the lone name word left beside a maiden name being the family (`Jane née Jones Smith` → family 'Jane', maiden 'Jones Smith') — decisions/M4; a declared delimiter parting a trailing suffix part — decisions/C10's 2026-10-03 (Derek), #549 entry; the credential's trailing run taking a suffix word and everything behind it (`Jane van der Berg née Jr Jones` → 'van der Berg née' one name part, the family under the default order, suffix 'Jr Jones') — decisions/S8 (#602); a maiden clause's numeral not held to its capitals — decisions/T4's 2026-10-18 (Derek), #731 reverted entry; `roz` and Scandinavian `f.` kept out of the markers, now on the words (`uv run python tools/vocab/query.py --excluded birth_marker`) — decisions/vocabulary-exclusions. +Elsewhere: a maiden name not making H1 decline (`Dr. Jane née Smith` → family 'Jane') — decisions/H1's 2026-08-25 (#410) entry; a one-letter numeral needing words to spare in the clause-free name, which keeps the V of `John née Jones Smith V` in the maiden name — decisions/S10's 2026-10-17 (Derek), #718 entry; a marked clause in brackets, read whole as the maiden name under the default policy — decisions/M3; a comma after a marker inside a clause unmarking it, and the divergence between M3's whitespace test and tokenize living on through the nakaguro (`佐藤 花子 "旧姓・田中" (旧姓 鈴木)` → nickname '旧姓 田中', maiden '鈴木') — decisions/N1's 2026-10-12 #653 entry and decisions/M3; the lone name word left beside a maiden name being the family (`Jane née Jones Smith` → family 'Jane', maiden 'Jones Smith') — decisions/M4; a declared delimiter parting a trailing suffix part — decisions/C10's 2026-10-03 (Derek), #549 entry; the credential's trailing run taking a suffix word and everything behind it (`Jane van der Berg née PhD Jones` → 'van der Berg née' one name part, the family under the default order, suffix 'PhD Jones') — decisions/S8 (#602), a generation word with a name word behind it starting no run since decisions/S8's 2026-11-02 #1023 entry (`Jane van der Berg née Jr Jones` → family 'van der Berg née Jr Jones'); a maiden clause's numeral not held to its capitals — decisions/T4's 2026-10-18 (Derek), #731 reverted entry; `roz` and Scandinavian `f.` kept out of the markers, now on the words (`uv run python tools/vocab/query.py --excluded birth_marker`) — decisions/vocabulary-exclusions. -Open: [#317](https://github.com/derek73/python-nameparser/issues/317) — the fullwidth-colon marker (`山田 花子 旧姓:佐藤` arrives with `旧姓:佐藤` as one word; the head-peel question). +Open: [#1359](https://github.com/derek73/python-nameparser/issues/1359) — the fullwidth-colon marker (`山田 花子 旧姓:佐藤` arrives with `旧姓:佐藤` as one word; the head-peel question). Open: [#820](https://github.com/derek73/python-nameparser/issues/820) — whether a lone dash is a separator, which decides `Jane Doe nee Smith - MA` (maiden 'Smith -'). diff --git a/docs/design/decisions/M3-marker-led-clause.md b/docs/design/decisions/M3-marker-led-clause.md index 044127eaa..d493f9b3d 100644 --- a/docs/design/decisions/M3-marker-led-clause.md +++ b/docs/design/decisions/M3-marker-led-clause.md @@ -13,7 +13,7 @@ Elsewhere: a marker followed by a comma, standing alone or glued to either word, is no marker (`Jane (née , Jones) Smith` → nickname 'née , Jones') — decisions/N1's 2026-10-12 #653 entry; the delimiters trumping every reading inside the clause (`Jane Doe (nee Smith MA)` → maiden 'Smith MA') — decisions/M2's 2026-09-19 (Derek), #533 review — THE DELIMITERS TRUMP entry; the bare take's first-word floor, which reads `Jane Smith née V` as maiden 'V' — decisions/M2's 2026-10-04 (Derek), #601 entry; `roz`, refused as a default marker and since 3.0 a reading off by default that the Czech pack turns on (`uv run python tools/vocab/query.py --word roz`) — decisions/vocabulary-exclusions' Excluded (MAIDEN_MARKERS) block. -Open: the fullwidth-colon marker (`旧姓:佐藤` arriving as one word) is decisions/M2's Open line for #317. +Open: the fullwidth-colon marker (`旧姓:佐藤` arriving as one word) is decisions/M2's Open line for #1359. ## Log diff --git a/docs/design/decisions/M4-maiden-marker-makes-the-lone-name-word-the-family.md b/docs/design/decisions/M4-maiden-marker-makes-the-lone-name-word-the-family.md index e7ff9e82e..03ea61e81 100644 --- a/docs/design/decisions/M4-maiden-marker-makes-the-lone-name-word-the-family.md +++ b/docs/design/decisions/M4-maiden-marker-makes-the-lone-name-word-the-family.md @@ -10,7 +10,7 @@ - A nickname holds nothing off: where N3 declines, M4 names the family (`'Smitty' Jones née Smith Jr.` → family 'Jones', suffix 'Jr.', maiden 'Smith') — 2026-08-27 #445, a precedence claim. - `tests/v2/test_parser.py::test_a_maiden_clause_changes_nothing_else` asserts M4's flip over the corpus rather than skipping the names it moves: family takes what given held and every other field stands still — 2026-08-27 #445, the corpus-wide. - M4 is keyed on the maiden NAME, not on a marker, so a clause in a declared pair counts as a marked one does: `Smith (Jones)` under `Policy(maiden_delimiters=frozenset({("(", ")")}))` → family 'Smith', maiden 'Jones' — 2026-08-27 #445 (review round), M4 is keyed. -- M4 counts GIVEN tokens where H1 tests which roles are empty, so a joined name unit counts as its words and the two disagree, recorded as a gap and left open: `Dr. Dean of Chemistry` → family 'Dean of Chemistry', while `Dean of Chemistry née Jones` keeps given 'Dean of Chemistry' — 2026-08-27 #445 (review round), a known gap. +- M4 counts GIVEN tokens where H1 tests which roles are empty, so a joined name unit counts as its words and the two disagree, recorded as a gap and left open: `Dr. Mary of Teck` → family 'Mary of Teck', while `Mary of Teck née Jones` keeps given 'Mary of Teck' — 2026-08-27 #445 (review round), a known gap. (The entry's own pair, `Dean of Chemistry`, is a title phrase since decisions/H9's #752 phase 2i, so `Dean of Chemistry née Jones` reads title 'Dean of Chemistry', maiden 'Jones'.) Not standing: the ledger markers the entry corrected, that ledger having been retired in #664 — 2026-08-27 #445, what the ledger's; the re-measurement of #449's population the entry promised, taken in decisions/O5's #449 entry — 2026-08-27 #445, the relationship to #449. diff --git a/docs/design/decisions/O7-two-given-names.md b/docs/design/decisions/O7-two-given-names.md index 5f4938acc..bcf20c070 100644 --- a/docs/design/decisions/O7-two-given-names.md +++ b/docs/design/decisions/O7-two-given-names.md @@ -10,7 +10,7 @@ - An English given name written beside a Chinese one (`Lim Mei Ling Jessica`) is not read: it is the same shape as a middle name, and the caller who writes it in delimiters with the declared order gets it as the nickname (`Lim Mei Ling (Jessica)` under `FAMILY_FIRST` with the switch reads given `Mei Ling`, family `Lim`, nickname `Jessica`) — 2026-11-03 #704, recorded as accepted. - The switch reports nothing — 2026-10-30 #704. - No shipped pack turns the switch on; `locales.ES` and `locales.PT` leave it opt-in, decided in chat — 2026-10-30 #753, phase 3g. -- With O6's switch on, a listed given name O6 leaves where it is (decisions/O6's 2026-10-30 #959 entry) is a middle this rule takes where it stands beside the given name, so `José Luis Pérez` reads given `José Luis` with both on — 2026-10-30 #959. +- With O6's switch on, a listed given name O6 leaves where it is (decisions/O6's 2026-10-30 #959 entry) is a middle this rule takes where it stands beside the given name, so `José Luis Pérez` reads given `José Luis` with both on under `locales.ES`, whose given names list `Luis` — 2026-10-30 #959. Under the default lexicon `Luis` is no listed given name and O6 takes it (family `Luis Pérez`). ## Log diff --git a/docs/design/decisions/O9-words-in-capitals-as-the-family.md b/docs/design/decisions/O9-words-in-capitals-as-the-family.md index bde963fec..698d45f53 100644 --- a/docs/design/decisions/O9-words-in-capitals-as-the-family.md +++ b/docs/design/decisions/O9-words-in-capitals-as-the-family.md @@ -15,7 +15,7 @@ - Mixed case is read over the words no run took, after the peel: a word other than a title, a suffix, or a particle or conjunction written in lowercase holds a lowercase letter — 2026-11-12 #659, the SECOND FIX REVIEW. - An `order` report, and a report on a word the peel took, are dropped where the rule acts — 2026-11-12 #659, the THIRD REVIEW. -Open: #659 (a bare `DR` in capitals at the head reads as the family under the switch, `DR Anna Berg`; whether a title that is never a surname should stand is undecided). +Open: [#1402](https://github.com/derek73/python-nameparser/issues/1402) (a bare `DR` in capitals at the head reads as the family under the switch, `DR Anna Berg`; whether a title that is never a surname should stand is undecided). ## Log diff --git a/docs/design/decisions/P3-connectives.md b/docs/design/decisions/P3-connectives.md index d9e5293a9..926668388 100644 --- a/docs/design/decisions/P3-connectives.md +++ b/docs/design/decisions/P3-connectives.md @@ -6,7 +6,7 @@ Examples read under the default order unless a line names another. - A connective-joined run is ONE name word wherever a rule counts name words, H1 and P1's family-first stop included, except C3's count before a comma (Elsewhere, below): `Mr. Jack and Jill` → family 'Jack and Jill' where `Mr. Jack Jill` reads given 'Jack'; `de la Vega y Santos Juan` family-first → family 'de la Vega y Santos' — 2026-08-17. - The three-word carve-out counts the name's own words, once the maiden name has left: `juan y garcia nee jones` → middle 'y', family 'garcia', maiden 'jones' — 2026-08-21 #418. -- `i` is in `conjunctions` and `conjunctions_ambiguous` together, so `Josep Carod i Rovira` and `Carod i Rovira, Josep` read family 'Carod i Rovira'; the off switch is `Lexicon.default().remove(conjunctions={"i"})`, or deleting `i` from `C.conjunctions`, and a name's fields and repair equal the off switch's but for the three exemptions the entry names (a join between two name words, a disagreement about the letter being an initial, a connective placed among the name words in repair) — 2026-09-20 #397. +- `i` is in `conjunctions` and `conjunctions_ambiguous` together, so `Josep Carod i Rovira` and `Carod i Rovira, Josep` read family 'Carod i Rovira'; the off switch is `Lexicon.default().remove("i", kind="conjunction")`, and a name's fields and repair equal the off switch's but for the three exemptions the entry names (a join between two name words, a disagreement about the letter being an initial, a connective placed among the name words in repair) — 2026-09-20 #397. - A single-letter connective counts as a name word toward the three-word carve-out wherever it is placed to join, whatever else the vocabulary says it is — 2026-09-20 #397. - A connective that is also generational vocabulary joins only where a name word stands on each side of it, looked for past any run of connectives and between assign's leading-title run and the trailing run H5's reading gives: `Josep Lluis Carod i III` → suffix 'i III'; `John Quincy Adams i MA Prof.` → family 'Adams', suffix 'i MA', title 'Prof.'. The class is a vocabulary test, not a length test, and the three-word carve-out alone stays single-letter; the lone letter rules/P13 links is a name word on the right (`Josep Lluis Carod i V` → family 'Carod i V', decisions/P13) — 2026-09-20 #397. - The both-sides question is answered once per run of connectives, both sides in one call — 2026-09-21 #397 follow-up. diff --git a/docs/design/decisions/P6-trailing-orphan-particle.md b/docs/design/decisions/P6-trailing-orphan-particle.md index ef23df9ad..3e17b2e3b 100644 --- a/docs/design/decisions/P6-trailing-orphan-particle.md +++ b/docs/design/decisions/P6-trailing-orphan-particle.md @@ -10,7 +10,7 @@ Examples read under the default order unless a line names another. - `Jong, vd`, with no given word left, is the listing form's (rules/C8): family 'Jong', suffix 'vd' — 2026-08-23. - P5's bound join runs first and takes a trailing particle as its pair (`Berg, abdul van` and `Berg, abdul do` → given 'abdul van', 'abdul do'), except one of the unambiguous suffix vocabulary too, which the join declines and the attachment takes (`Berg, abdul vd` → family 'vd Berg') — 2026-08-22 (late review of #425's docs, PR #426). - The attachment reports the fork it decides, in the kind naming the reading it overrode: `suffix-or-name` where the run had been read as a post-nominal (`Berg, Jan vd`), `particle-or-given` where it holds an ambiguous particle (`Nguyen, Thi Van`, `Beethoven, Ludwig van`), and nothing for a never-given particle (`Jong, Piet de`) or a run read as name words with no ambiguous member (`Berg, Jan de vd`); where a caller's word reaches both arms the suffix arm wins — 2026-08-29 #405. -- Without a comma the attachment fires under FAMILY_FIRST alone, where the run ENDS the name and stands in a MIDDLE, with no vocabulary test and no re-layout, the family needing a base of its own (`Beethoven Ludwig van` family-first → family 'van Beethoven'; `van Berg Jan de` family-first → family 'van'); under the default order the positional reading stands (`Jong Anke de` → family 'de'), and the given position under a family-first order is no P1 site (`Ménil de` family-first → given 'de') — 2026-08-30 #467. +- Without a comma the attachment fires under FAMILY_FIRST alone, where the run ENDS the name and stands in a MIDDLE, with no vocabulary test and no re-layout, the family needing a base of its own (`Beethoven Ludwig van` family-first → family 'van Beethoven'; `Van Berg Jan de` family-first → family 'Van'); under the default order the positional reading stands (`Jong Anke de` → family 'de'), and the given position under a family-first order is no P1 site (`Ménil de` family-first → given 'de') — 2026-08-30 #467. - A member of the ambiguous credential class written in capitals in a mixed-case name is the credential and the attachment stands down (`Doe, John DO` → suffix 'DO'), where `Doe, John Do` and the one-case `SMITH, JOHN DO` still attach; the condition reads the ambiguous tag, not the suffix role, so `vd` and `mc` stay in the run — 2026-09-18 #531. - The comma site is decided in assign, right after the walk over the given part, asking P1's condition itself so `Smith, de Mesnil van` stays the fold's (family 'Smith de Mesnil van'); the no-comma site stays in post_rules — 2026-10-06 #613. - The comma site is assign's behind an EMPTY part before the comma too, ahead of H1, which then finds a family and stands down (`, Mr. Jones vd` → title 'Mr.', given 'Jones', family 'vd', as `Smith, Mr. Jones vd` reads given 'Jones', family 'vd Smith') — 2026-10-27 #892 (Derek). diff --git a/docs/design/decisions/R1-fields-are-views-of-the-parsed-words.md b/docs/design/decisions/R1-fields-are-views-of-the-parsed-words.md index 5c8d6c73e..f2e24e426 100644 --- a/docs/design/decisions/R1-fields-are-views-of-the-parsed-words.md +++ b/docs/design/decisions/R1-fields-are-views-of-the-parsed-words.md @@ -5,7 +5,7 @@ - One comma segment is one suffix entry, and the boundary between entries is the comma the writer typed: two consecutive post-nominals are one entry where they sit in the same comma bucket, `comma_bucket` being the function the segments are built with, and nothing between them parts the run (`Smith, MD PhD` and `John Smith MD PhD` → suffix 'MD PhD', `John Smith, MD, Bart` → 'MD, Bart', `Smith Jr., Mr. Jr.` → 'Jr., Jr.') — 2026-09-06 #436/#437. - A name word or a dropped delimiter core parts a run, and a token whose role renders into another field (title, nickname or maiden) or a dropped token that is no core does not (`Smith, MD Dr. PhD`, `Smith, MD "Doc" PhD` and `Smith, MD (nee Jones) PhD` → suffix 'MD PhD'); the core set is `delimiter_cores`, the derivation group's drop site reads, imported rather than repeated — 2026-09-06 #436/#437. - The parting scan reads the core set whole, by text, ungated by the tail segment group drops cores on, so a dropped token whose text the policy names parts the run whatever dropped it (`Smith, MD (nee Jones) PhD` → 'MD PhD' by default and 'MD, PhD' under `extra_suffix_delimiters=frozenset({" nee "})`); the pass runs after roles are settled, since the span rule read role-blind would join two middle names, and last in post_rules by convention rather than necessity — 2026-10-19 #760. -- Within a piece the `joined` tag renders a merged piece as one unit whatever role it holds, so `Smith, Rev. Dr.` keeps `title_list == ['Rev.', 'Dr.']` and a `Ph. D.` merge stays one unit in any field; a role-aware tag, a render-time span scan, marking the boundary at the core-drop site and a third branch in group beside `tail` were declined — 2026-08-23 #429; 2026-09-06 #436/#437. +- Within a piece the `joined` tag renders a merged piece as one unit whatever role it holds, so `Smith, Rev. Dr.` keeps its two titles as two units (2.x's `title_list` gave `['Rev.', 'Dr.']`; the list attributes left with the facade in 3.0, #357) and a `Ph. D.` merge stays one unit in any field; a role-aware tag, a render-time span scan, marking the boundary at the core-drop site and a third branch in group beside `tail` were declined — 2026-08-23 #429; 2026-09-06 #436/#437. - Group still drops a delimiter core only on a tail segment, v1 `expand_suffix_delimiter` parity (#206) — 2026-08-23 #429; 2026-09-06 #436/#437. - `str()` is a rendering, not a canonical form: a suffix run survives a render and a reparse on the three writings #429 fixed (`test_a_suffix_run_survives_a_render_and_a_reparse`), and no rule promises a general round trip — 2026-09-06 #436/#437. - A suffix value handed to `revise()` derives its entries from its own commas by the rule a whole name uses, `revise` forcing the role and re-running `suffix_entries` over the forced state, so `revise(n, suffix=n.suffix)` keeps 'MD PhD' for `John Smith MD PhD`; the value is classified on its own, so `김민준씨, J.씨` revises its suffix '씨, J.씨' to '씨, J. 씨', and a policy delimiter parts a value only where its own words give it a tail segment (under `extra_suffix_delimiters=frozenset({" - "})`, `Doe, John, MD PhD - FACS` reads 'MD PhD, FACS' and `revise` with 'MD PhD - FACS' keeps it whole) — 2026-09-06 #511. diff --git a/docs/design/decisions/R2-all-particles-family-base-divergence.md b/docs/design/decisions/R2-all-particles-family-base-divergence.md index e06bdcdbe..02f25f8e0 100644 --- a/docs/design/decisions/R2-all-particles-family-base-divergence.md +++ b/docs/design/decisions/R2-all-particles-family-base-divergence.md @@ -13,7 +13,7 @@ Elsewhere: where a connective initials, a part holding nothing else for it to join (`Jon Dough and` → 'J. D.', `Juan de y` → 'J. y.') — decisions/R3's 2026-09-20 #461 entry; case repair keeping that connective lowercase, its carve-out not gated on the mark (under `Lexicon.default().add('y', kind='particle')`, `Juan de y` forced → family 'De y') — decisions/R4's 2026-08-29, the CONJUNCTION CARVE-OUT entry; case repair reading the unjoined mark for the whole part (`ANH DO` → 'Anh Do') — decisions/R4's 2026-08-29 #407 entry; the snapshot recording `initials()`, so a change to the base is visible there — decisions/differential-ledger's 2026-10-13 #664, a committed snapshot replaces the classified gate entry. -Open: #754 (whether a language pack supplies a convention's sort key or entry element from Phase 4's per-surname units, the RFC's Phase 4 Left open). +Open: [#1145](https://github.com/derek73/python-nameparser/issues/1145) (split out of #754 when it closed: whether a language pack supplies a convention's sort key or entry element from Phase 4's per-surname units, the RFC's Phase 4 Left open). ## Log diff --git a/docs/design/decisions/R4-case-repair-reads-the-unjoined-mark.md b/docs/design/decisions/R4-case-repair-reads-the-unjoined-mark.md index 955a3e8ba..468f0f084 100644 --- a/docs/design/decisions/R4-case-repair-reads-the-unjoined-mark.md +++ b/docs/design/decisions/R4-case-repair-reads-the-unjoined-mark.md @@ -16,7 +16,7 @@ - A value that does not spell its key's letters and digits is a `ValueError` at every `Lexicon` entry point, compared as alphanumerics, whose message offers a recased key that constructs; a mask the word's letters miscount against is declined and the next clause repairs — 2026-09-23 #459, THE CHECK. - A mask's punctuation marks where its letters are joined and is never written into the word: a letter split off beside a full stop takes capitals only where the mask writes it inside a run of two or more (`p.h.d.` → 'P.H.D.', a caller's `h.c` mask keeps `h.c.`), and casing goes through the whole word where that keeps its length — 2026-09-23 #459 (review), A MASK'S PUNCTUATION. - A punctuated value is accepted silently; a warning for one and a shim translation of 1.4.0's dotted pairs were declined, both resting on the false premise that the punctuation is ignored — 2026-09-23 #459 (review), DECLINED. -- Repair changes case and nothing else, compared under `casefold()`, with two inherited Unicode boundaries left as they are: `ß` uppercases to `SS` through the shape clauses and the mask path alike (`john smith ß.x.` → 'SS.X.'), and the dotless `ı` matches the roman shape (`john smith ıı` → 'II') — 2026-09-23 #459 (review), THE INVARIANT'S UNICODE BOUNDARY; 2026-09-24 #459/#492/#478 (branch review). +- Repair changes case and nothing else, compared under `casefold()`, with two inherited Unicode boundaries left as they are: `ß` uppercases to `SS` through the shape clauses and the mask path alike (`john smith ß.x.y.` → 'SS.X.Y.'), and the dotless `ı` matches the roman shape (`john smith ıı` → 'II') — 2026-09-23 #459 (review), THE INVARIANT'S UNICODE BOUNDARY; 2026-09-24 #459/#492/#478 (branch review). - Mask values are stored NFC-composed, and the hyphen clause's initial test is the pinned constant `_render._DOTTED_INITIAL` — 2026-09-24 #459/#492/#478 (branch review). - A word the parse put in a name role repairs as a name word whatever vocabulary holds it, numerals included (`qc mp` → 'Qc MP', `iv smith` → 'Iv Smith', `Md Abdul Karim` forced → 'Md Abdul Karim'); keeping `ii`, `iii`, `iv` as masks was declined — 2026-09-23 #459 item 4. - Period insertion is not case repair's: a canonical dotted spelling (`md` → `M.D.`) would belong to a normalization view that may re-spell a word, an idea parked with no issue — 2026-09-23, PERIOD INSERTION IS OUT. @@ -39,7 +39,7 @@ Not standing: the rewording of rules/R4's vocabulary promise and its `Juan McDonald` row, carried out — 2026-08-29, DEBT DISCHARGED; the correction of mechanisms.md#RENDER-HONORS-THE-PARSE, carried out — 2026-09-23, mechanisms; the whitespace raises the branch review left for the orchestrator to file, filed and fixed as #541 — 2026-09-24 #459/#492/#478 (branch review); the measurements, which decide nothing — 2026-09-23 #459/#478. -Elsewhere: a suffix written in more than one case kept as written on the default path, and the gate reading every token but the suffixes — decisions/R5's 2026-09-24 #492 entry and its 2026-09-23 #492 — DECIDED entry; the whole token asked the particle question first, so `IVOI, PAUL D'` → 'Paul d' Ivoi' and `jacobus henricus van 't hoff` → 'Jacobus Henricus van 't Hoff', and a caller's mask on a stem not reaching its marked spelling where the particle arm takes the whole token (`al` → `AL` leaves the attached `al-` of `Rashid, Harun al-` lowercase, while an all-particle family or a given name still gives `AL-`) — decisions/P6's #700 entry; a word classify tags with the caps shape kept in capitals (`John Smith, XYZ` forced → 'XYZ') — decisions/S9; a bound caps word carrying the name's case contrast left as written — decisions/C1's 2026-10-06 #613, the PR review; masks recorded per word as the `cased` property of `nameparser/vocab/` — decisions/vocabulary-model's 2026-10-18 #737 entry; the snapshot recording `initials()` but not `capitalized()` — decisions/differential-ledger's 2026-10-13 #664 — a committed snapshot replaces the classified gate entry; the mixed-case masks of the credentials #797 added (`mbchb` → 'MBChB') — decisions/suffix-acronym-collisions' 2026-10-21 (#797) entry; `knt` → 'Knt' — decisions/salutation-titles' 2026-10-04 #606 line; the facade's initials reading the parse's tags, which closed #462, until #357 removed the facade — decisions/R3's 2026-09-01 #462 and 2026-09-13 #528 entries. +Elsewhere: a suffix written in more than one case kept as written on the default path, and the gate reading every token but the suffixes — decisions/R5's 2026-09-24 #492 entry and its 2026-09-23 #492 — DECIDED entry; the whole token asked the particle question first, so `IVOI, PAUL D'` → 'Paul d' Ivoi' and `jacobus henricus van 't hoff` → 'Jacobus Henricus van 't Hoff', and a caller's mask on a stem not reaching its marked spelling where the particle arm takes the whole token (`al` → `AL` leaves the attached `al-` of `Rashid, Harun al-` lowercase, while an all-particle family or a given name still gives `AL-`) — decisions/P6's #700 entry; a word classify tags with the caps shape kept in capitals (`John Smith, XYZ` forced → 'XYZ') — decisions/S9; a bound caps word carrying the name's case contrast left as written — decisions/C1's 2026-10-06 #613, the PR review; masks recorded per word as the `cased` property of `nameparser/vocab/` — decisions/vocabulary-model's 2026-10-18 #737 entry; the snapshot recording `initials()`, and both case views since #826 — decisions/differential-ledger's 2026-10-13 #664 — a committed snapshot replaces the classified gate entry; the mixed-case masks of the credentials #797 added (`mbchb` → 'MBChB') — decisions/suffix-acronym-collisions' 2026-10-21 (#797) entry; `knt` → 'Knt' — decisions/salutation-titles' 2026-10-04 #606 line; the facade's initials reading the parse's tags, which closed #462, until #357 removed the facade — decisions/R3's 2026-09-01 #462 and 2026-09-13 #528 entries. Open: [#464](https://github.com/derek73/python-nameparser/issues/464) — a `Parser.initials` crossing, which would let `initials()` answer a spliced field under the parse's vocabulary. diff --git a/docs/design/decisions/R5-case-repair-gate.md b/docs/design/decisions/R5-case-repair-gate.md index 5666519b3..6de25a10b 100644 --- a/docs/design/decisions/R5-case-repair-gate.md +++ b/docs/design/decisions/R5-case-repair-gate.md @@ -8,7 +8,7 @@ - `capitalized_forced` is a test-side pseudo-field the doc runner resolves, not a parser field — 2026-08-29, `capitalized_forced` is a test-side pseudo-field. - Forcing repair does not make the output independent of how the input was cased, so rules/R5 does not state that it does; the property is pinned in tests/test_capitalization.py, where `JUAN Y GARCIA` and `juan y garcia` both give 'Juan y Garcia' since a one-case name stopped reading a bare capital connective as an initial — 2026-08-29, WHAT THE OVERRIDE DOES AND DOES NOT PROMISE; 2026-08-29, and therefore NOT stated in rules; 2026-09-13 #383/#479. - The gate reads every token but the suffix-roled ones, a suffix saying nothing about how the writer cased the name (`juan garcia III` → 'Juan Garcia III', `JUAN GARCIA Jr.` → 'Juan Garcia Jr.'), nickname and maiden included (`jane doe nee SMITH III` and `juan garcia (Bob)` kept as written); forcing was not the answer, being lossy on correctly cased names (`Danny DeVito` forced → 'Danny Devito') — 2026-09-23 #492, DECIDED. -- The parser's one-case readings still count a cased suffix where the gate does not, so one name can be mixed to the parser and one-case to repair: `john e jones III` → 'John e Jones III' against `john e jones iii` → 'John E Jones III', `jack MA` → 'Jack MA', and `MD, PhD` → 'Md PhD' — 2026-09-23 #492, THE R5 / PARSER SPLIT. +- The parser's one-case readings still count a cased suffix where the gate does not, so one name can be mixed to the parser and one-case to repair: `john e jones III` → 'John e Jones III' against `john e jones iii` → 'John E Jones III', `jack MA` → 'Jack MA', and `MD, PhD` → 'Md, PhD' — 2026-09-23 #492, THE R5 / PARSER SPLIT. - A title stays evidence, title repair being the ordinary word repair (`Dr. juan garcia` kept, `dr. juan garcia III` → 'Dr. Juan Garcia III'), which may move once title repair is trusted — 2026-09-23 #492, TITLES STAY EVIDENCE. - Where repair is not forced the same one-case test is asked of each suffix on its own, so a suffix written in more than one case is kept as written (`john smith EdD` → 'John Smith EdD', `john smith B.Tech.` → 'John Smith B.Tech.'), at the accepted cost of keeping a garbled spelling with the deliberate one (`juan garcia Iii` → 'Juan Garcia Iii', 'Juan Garcia III' forced); force repairs both — 2026-09-24 #492. - Georgian makes no case contrast for the gate, so a name mixing Mtavruli with Mkhedruli, or Georgian with a Latin word in capitals, is repaired on the default path (`ნინო ᲑᲣᲠᲯᲐᲜᲐᲫᲔ` → 'ნინო ბურჯანაძე', `ჯეკ MA` → 'ჯეკ Ma') — 2026-11-12 #1222 (decisions/script-properties). diff --git a/docs/design/decisions/README.md b/docs/design/decisions/README.md index b0c934fd0..7dc9878ae 100644 --- a/docs/design/decisions/README.md +++ b/docs/design/decisions/README.md @@ -184,7 +184,7 @@ Entry conventions: - [suffix-acronym-collisions — the trailing-position collision class, decided (2026-09-07, #342/#454)](suffix-acronym-collisions.md) - [suffix-field-composition — three kinds of thing in one field](suffix-field-composition.md) - [two-input-invariants — checking a rule against something that is not the code](two-input-invariants.md) -- [v1-xfail-triage — the eight inherited aspirations, four retired and four kept (four of those eight since fixed, 2026-09-08, 2026-09-23 and 2026-11-09)](v1-xfail-triage.md) +- [v1-xfail-triage — the eight inherited aspirations, four retired and four kept (five of those eight since fixed, 2026-09-08, 2026-09-23, 2026-11-09 and 2026-11-10)](v1-xfail-triage.md) - [vocabulary-collisions — when a word earns the ambiguous marking](vocabulary-collisions.md) - [vocabulary-model — each word described by its readings (2026-10-15 → 2026-10-18)](vocabulary-model.md) diff --git a/docs/design/decisions/S1-bracketed-credential-is-not-a-nickname.md b/docs/design/decisions/S1-bracketed-credential-is-not-a-nickname.md index c32fc81e8..bee41ddf4 100644 --- a/docs/design/decisions/S1-bracketed-credential-is-not-a-nickname.md +++ b/docs/design/decisions/S1-bracketed-credential-is-not-a-nickname.md @@ -5,7 +5,7 @@ - A clause wholly of words the vocabulary reads as no name is set apart from the name: it is no nickname and no maiden name, each word takes the role its vocabulary gives it (a title the title, a credential or generation the suffix, a word that is both the title in front of the name's first word and the suffix elsewhere), the words around it read as they would beside a nickname (a lone name word beside it the family name, N3), and a member of the ambiguous class is one of its words where its writing settles it after the name (S13): `John Smith (PhD, MBA)` and `John Smith (Ph.D., MBA)` → suffix, `John Smith (Dr)` → title, `John Smith (PhD) Withers` → family 'Withers', suffix 'PhD' — 2026-11-04 (Derek), #792. - A credential or generation S3 reads joined by a slash or a hyphen is a word of such a clause, asked as the bare word is asked, a member of the ambiguous class first left to S13, and the initials Except asks each of its chunks, so it reads as its words written apart do: `John Smith (MD/PhD)` → suffix, `John (MD-PhD) Smith` and `Justin (JP/MD) Stearns` → nickname, as `(MD, PhD)` and `(JP, MD)` read there, `John Smith (MD/Bob)` and `(MA/MBA)` → nickname — 2026-11-05 (Derek), #1088; a joined word holding a member is a member itself since 2026-11-07 #1138 (`John Smith (MA/PhD)` → suffix, `John (MA/PhD) Smith` → nickname, reported). - It keeps its pair's reading where the clause is nothing but title modifiers and styles (`(UK)`, `(Hon)`), a lone title of address (`(Sir)`, `(Mr)`), titles alone straight behind a credential (`FRCS (SN)`), or a credential written as initials before a name word of its comma part (`Justin (JP) Stearns`); content that is not such a clause and ends in an ASCII period keeps v1's escape, its brackets dropped — 2026-11-04 (Derek), #792. -- (superseded for a clause of non-name words by #792, 2026-11-04 below) The rule says what the escape does: quotes escape as brackets do, and a clause of two or more words is not suffix-shaped unless an ASCII period ends it, so `(PhD MSc)` keeps its nickname reading with nothing reported, as 1.4.0 read `(PhD MBA)`, which reports suffix-or-nickname since `mba` was marked ambiguous (decisions/suffix-acronym-collisions, 2026-11-03) — 2026-10-21 #807. +- The escape: quotes escape as brackets do, and a clause of two or more words that is not wholly of non-name words is not suffix-shaped unless an ASCII period ends it (`John Smith "Jr."` → suffix 'Jr.', `John (Bob Jr) Smith` → nickname 'Bob Jr') — 2026-10-21 #807. - A member of the ambiguous class its writing leaves unsettled is a word of such a clause where a credential of the same clause settles it, after the name only (S13's position): `John Smith (Ma, PhD)`, `(Ma PhD)` and `JOHN SMITH (PHD, MBA)` → suffix, where each was the nickname, reported. A credential that is no name settles one, or a member its periods settle; a generation, a numeral, an honorific, a title or a title-and-suffix word (`Edward Smith (Ed Jr)`, `(Ma, Ms)`, `(Ma, 씨)`) and a member its capitals settle (`(MA, Ed)`) settle nothing, nor do members alone (`(Ma, Ed)`); a joined word settles one where a chunk of it would (`(Ma, PhD/Jr)` → suffix, `(Ed, Jr/Sr)` → nickname) — 2026-11-07 (Derek), #1138. - A comma glued between two words inside a delimited clause with no full stop in it is word text, so `John Smith (MD,PhD)` keeps its pair's reading, nickname 'MD,PhD', where `(MD, PhD)` reads the credentials; a clause ending in a full stop takes the period escape, and a word with one inside it may be read whole through its chunks (S3); dividing the word is declined — 2026-11-11 #1268. @@ -16,7 +16,7 @@ Open: [#1268](https://github.com/derek73/python-nameparser/issues/1268) — whet ## Log - 2026-11-10 (Derek), #317's follow-up — A THAI TITLE OF ADDRESS IN BRACKETS IS THE LONE TITLE OF ADDRESS. Marking every Thai title `addresses = "given"` (decisions/W6) brought them all into the lone-title Except, so a Thai title alone in brackets keeps its pair's reading, a nickname, as `(Sir)` and `(Mr)` do: `สุดา ใจดี (นาย)` → nickname 'นาย', where master read title 'นาย' (and `(นาง)`, `(อาจารย์)`, `(ว่าที่ร้อยตรี)`, a lone `สุดา (นาย)`, the quoted `"นาย"`). Decided to keep the clause's reason for Thai as for English rather than exempt a script: a title someone is addressed by alone may be what they go by. A title written short ends in its period, so its clause takes the escape and stays in the name as written bare: `(ดร.)` and `(รศ.ดร.)` still read the title, H5 taking them at the end of the name, while `(ศ.)` reads family 'ศ.', where master read title 'ศ.', as the bare `สุดา ใจดี ศ.` already reads on master; accepted, no local corpus writing a Thai title in brackets (orcid-researchers moved one name over the change, not this shape). -- 2026-10-21 (Derek), #807 (its `(PhD MBA)` reporting nothing superseded by decisions/suffix-acronym-collisions' 2026-11-03 entry: `mba` is marked ambiguous, so the run reports suffix-or-nickname, as `(MA PhD)` does) — S1 IS NARROWED TO WHAT THE ESCAPE DOES, NOT WIDENED TO WHAT ITS THEN HAD SAID. The rule's Then said suffix-shaped bracketed content reads as if written bare, and #807's review measured two places the parser had never done so: a clause of two or more words is never suffix-shaped unless it ends in a period (`John Smith (PhD MBA)` → nickname 'PhD MBA', nothing reported; `(MBA PhD.)` → suffix), the escape asking its question of the whole clause; and every default nickname pair escapes alike, quotes included (`John Smith "MBA"` → suffix, `"MA"` → nickname, reported). Derek: narrow the rule for both rather than change the parser. 1.4.0 reads `(PhD MBA)` as nickname 'PhD MBA' and the ASCII-quoted `"MBA"` and `'MBA'` as suffix 'MBA' (measured 2026-10-21, the wheel run from a scratch dir), so neither is a 2.x move; the typographic and CJK pairs (`«MBA»`, `“MBA”`, `「MBA」`, `(MBA)`) were no delimiters in 1.4.0, which read each as a family name, and escape alike since 2.x added them. The third gap the review found, `John Smith (M.A)` → nickname where bare `John Smith M.A` → suffix (1.4.0: suffix in both), was left to an issue rather than narrowed. Limits the review measured and the rule now states or leaves: the period is tested on the raw clause, so `(PhD MBA. )` stays a nickname, and an ideographic full stop does not count (`(PhD MBA。)`), as decisions/cjk-full-stops records for one word; under a caller-declared maiden pair the same clauses read as maiden names, the report being a nickname's alone. +- 2026-10-21 (Derek), #807 (its `(PhD MBA)` reporting nothing superseded by decisions/suffix-acronym-collisions' 2026-11-03 entry: `mba` is marked ambiguous, so the run reports suffix-or-nickname, as `(MA PhD)` does; its nickname reading of a clause wholly of non-name words, `(PhD MSc)`, superseded by #792, 2026-11-04 below) — S1 IS NARROWED TO WHAT THE ESCAPE DOES, NOT WIDENED TO WHAT ITS THEN HAD SAID. The rule's Then said suffix-shaped bracketed content reads as if written bare, and #807's review measured two places the parser had never done so: a clause of two or more words is never suffix-shaped unless it ends in a period (`John Smith (PhD MBA)` → nickname 'PhD MBA', nothing reported; `(MBA PhD.)` → suffix), the escape asking its question of the whole clause; and every default nickname pair escapes alike, quotes included (`John Smith "MBA"` → suffix, `"MA"` → nickname, reported). Derek: narrow the rule for both rather than change the parser. 1.4.0 reads `(PhD MBA)` as nickname 'PhD MBA' and the ASCII-quoted `"MBA"` and `'MBA'` as suffix 'MBA' (measured 2026-10-21, the wheel run from a scratch dir), so neither is a 2.x move; the typographic and CJK pairs (`«MBA»`, `“MBA”`, `「MBA」`, `(MBA)`) were no delimiters in 1.4.0, which read each as a family name, and escape alike since 2.x added them. The third gap the review found, `John Smith (M.A)` → nickname where bare `John Smith M.A` → suffix (1.4.0: suffix in both), was left to an issue rather than narrowed. Limits the review measured and the rule now states or leaves: the period is tested on the raw clause, so `(PhD MBA. )` stays a nickname, and an ideographic full stop does not count (`(PhD MBA。)`), as decisions/cjk-full-stops records for one word; under a caller-declared maiden pair the same clauses read as maiden names, the report being a nickname's alone. - 2026-11-04 (Derek), #792, #771 — A CLAUSE WHOLLY OF NON-NAME WORDS IS SET APART FROM THE NAME, AND THE ESCAPE NO LONGER DROPS ITS BRACKETS. The question, put by Derek: delimiters set a word or a phrase apart; a delimited clause reads as a nickname by default, or a maiden name where the caller declares the pair, but where the words inside are known credentials, titles and the like, the delimiters group those apart from the name, and the clause is neither. Measured on origin/master c6207549 the coverage was inconsistent, because S1 did not make a clause a suffix but dropped its brackets and let its words join the name: `(MBA)`, `(Jr.)`, `(III)`, `(USN, Ret.)` read as suffixes; `(Ph.D., MBA)` and `(PhD MSc)` as nicknames (the 2026-10-21 #807 entry had narrowed the rule's wording to that rather than change the parser); `(Dr.)` as a title by the period shape alone and `(Dr)`, `(Mr)`, `(Lady)` as nicknames; `John (Dr.) Smith` as middle 'Dr.'; and `John Smith (PhD) Withers` as suffix 'PhD Withers', S8's run taking the word after the dropped brackets (#792; its title example `W. Russell (Jr.) Withers` had already moved back to middle 'Russell Jr.' when #1039 gated `Jr.` by the count, so #792 was reframed to the credential). S13 (#810) already read a settled member that way, the rest of the name read as beside a nickname, which left a census of twin differences against a bracketed unambiguous credential (`Jack (MA)` family, `Jack (PhD)` given). OPTIONS PUT, 2026-11-04: (A) clarify only, recording why; (B) set apart a clause of unambiguous credentials and title heads, each word by its vocabulary, with four exclusions; (C) B for credentials only. DECIDED (Derek): B, with the recommendations as put: the period escape kept for content that is not such a clause, and the four exclusions. THE EXCLUSIONS, each from the measurement: nearly every title-only clause in the local corpora was not a title but a credential's qualifier (in ctgov-officials, entries holding a `(UK)` clause 83, `(SN)` 12, `(Hon)` or `(Hon.)` 14, most of each behind a credential, `MRCP (UK)`, `FRCS(SN)`, `FRCP (Hon)`; recipe, 2026-11-04: `grep -ciE '\( *(UK|SN|Hon\.?) *\)' ~/.cache/nameparser-tools/local//corpus.jsonl`, one word at a time, over the cache as fetched that day), so a clause of modifiers and styles alone is no title and a title-only clause straight behind a credential keeps its pair's reading; a lone title of address may be the name the person goes by, the given-addressing titles and the after-given salutations (H8) standing for "address" (`lady` and `lord` are in neither set, so `(Lady)` reads as a title, the vocabulary's own default reading of the word, rules/S1's Accepted bullet); and titles that may be given names are no word of such a clause by construction (H9's gated words are not in `titles`), nor is a member of the ambiguous credential class unless S13's writing settles it after the name. A FIFTH EXCLUSION came from reading the moves: credential acronyms written as initials inside a name (`Justin (JP) Stearns`, `Durga Datt (DD) Pathak`, `Sandra (A.M.) van Abeelen`, `Mohammad (Md) Noor A Alam`, `Katharina (Kt) Miller`, ORCID) are the initials or short name the person goes by, as S13 says of a member inside the name, so one or two letters, or single letters each with its period, before a name word of the same comma part keep the clause its pair's reading (`BRINKER (MD), JEFFREY`, the name word past the comma, keeps the suffix; the first form looked past the comma and lost it). Released, `Justin (JP) Stearns` read middle 'JP' (1.4.0 through 2.8.0); it reads nickname 'JP' now. A word that is a title too counts as initials only written with a period after each letter, or in capitals in a name of mixed case (`Robert (RA) Allen` and `Robert (R.A.) Allen` nickname, `(Lt) John Smith` title 'Lt', `ROBERT (RA) ALLEN` suffix 'RA'), capitals in a name written in one case saying nothing (S6): the code review found the duals outside the test, the widening first written caught `Lt`, and the next measurement found it turning FEC's `KAWAYOSHI (MS.) JEANETTE` and two more from the suffix into nicknames. THE MECHANISM: extract asks the vocabulary half (`_vocab.set_apart_kind`, `set_apart`) and extracts such a clause as its pair reads it instead of dropping its brackets; post_rules' `_set_apart_clauses`, first in the stage, gives its words their roles once the name's are read, asks the two exclusions that need roles (a credential in front read as a suffix, which a shape-only credential like `FRCS` needs; a name word after it in its comma part) and a member's writing, and trims a comma the clause kept on a word off its span, at either edge, R1's entry pass reading a comma left alone in the gap between two suffix words to part them (`(USN, Ret.)` → 'USN, Ret.', `(MD ,PhD)` → 'MD, PhD'). classify tags a clause word as the word without its comma, so the vocabulary reaches it whichever side of the comma it stands (the code review found `(MBA, PhD)` a nickname where `(PhD, MBA)` was set apart, and `(Jr, PhD)` losing its generation view), a maiden marker excepted, whose comma unmakes it (M3). `_extract._suffix_shaped` became `_period_escape`: its two vocabulary arms, a lone unambiguous suffix word or acronym, can no longer fire, every such clause being set apart first. mechanisms.md#CLAUSE-CONTENT-OVERRULES-DELIMITER records the split. diff --git a/docs/design/decisions/S11-suffix-word-that-is-also-a-name.md b/docs/design/decisions/S11-suffix-word-that-is-also-a-name.md index 2a6a3c401..8d151e7fc 100644 --- a/docs/design/decisions/S11-suffix-word-that-is-also-a-name.md +++ b/docs/design/decisions/S11-suffix-word-that-is-also-a-name.md @@ -4,7 +4,7 @@ - A generation word with a `given` or `family` reading is gated as a bare ambiguous acronym is: the generation where the name has words to spare, the name otherwise, either reading reported (`Pedro Alves Neto` → suffix 'Neto', `Ana Neto` → family 'Neto') — 2026-10-25 #752. - The Brazilian agnomens (`filho`, `filha`, `neto`, `neta`, `netto`, `sobrinho`, `sobrinha`) are generation readings of the `agnomen` kind, gated by the count alone, their writing never leaning; `fils` is a `generation` reading whose lower case in a mixed-case name is the generation and whose Title case leans to the name (`Marie Fils` → family 'Fils') — 2026-10-25 #752; that lean is the reading's `title_case_is_name`, and a generation word that is also a name without it, `junior` and `júnior`, is gated by the count alone, as an agnomen is — 2026-11-03 (Derek), #1039. -- A suffix word that is also a name makes no chunk claim inside a word with interior periods, which reads by its dotted shape as it did before the word was listed: `Pedro M.Filho` keeps family 'M.Filho', and `Pedro Alves M.Filho` reads suffix 'M.Filho' as on master — 2026-10-25 #752. +- A suffix word that is also a name makes no chunk claim inside a word with interior periods, which reads by its dotted shape as it did before the word was listed (`Smith, Pedro M.Filho` → suffix 'M.Filho') — 2026-10-25 #752. An initial glued to the word before any comma is divided at its stop first by rules/T8, and the word after it read as it is written apart (`Pedro M.Filho` → family 'M.', suffix 'Filho'), as this file's 2026-11-16 #1230 entry records. - Only name words in front of a generation word that is also a name count toward its words to spare, and a suffix word there is no company for it: `Pedro Jnr Filho` and `Pedro VI Filho` keep family 'Filho' — 2026-10-25 (Derek), #890; a suffix word that is also a name there, its writing not making it the suffix (S6), is a name word, so `Pedro Junior Filho` reads family 'Junior', suffix 'Filho', as `Pedro Neto Filho` does — 2026-11-03 #1039. @@ -37,3 +37,4 @@ Open: none in this file. READINGS NOW. `Silva, Junior Carlos` → given 'Junior', middle 'Carlos' (2.2.0 and 2.3.0 read it so; 1.4.0 through 2.1.0 read title 'Junior', given 'Carlos'; 2.4.0 through 2.8.1 suffix 'Junior Carlos'); `SILVA, JUNIOR` → given 'JUNIOR'; `Kofi Junior` → family 'Junior', as 1.4.0 read it (2.0.0 through 2.8.1 suffix 'Junior'); `John Smith Junior`, `Smith, John Junior`, `PEDRO DA SILVA JUNIOR` and `SILVA JUNIOR, PEDRO`'s generation read as before but for the report: every one now reports `suffix-or-name`, as every `Neto` name does. ACCEPTED BY THIS CHANGE, NOT YET PUT TO A DECISION. A name of two words ending in Junior keeps it as the family name where the writer meant a given name and the generation with no surname written (`Fabio Junior`, `ADELSON JUNIOR`). In front of another suffix word that is also a name Junior is a name word, as Neto is in `Pedro Neto Filho`, so the word behind it is the suffix and Junior the family name: `Pedro Junior Filho` reads family 'Junior', suffix 'Filho', `Pedro Junior fils` family 'Junior', suffix 'fils', `Pedro Junior Filho, MD` suffix 'Filho, MD', `Pedro Junior do Filho` suffix 'do Filho', and `Pedro Junior Ma Filho` middle 'Junior', family 'Ma', where 1.4.0 through 2.8.1 read middle 'Junior' (middle 'Junior Ma' for `Pedro Junior Ma Filho`) with the agnomen or `fils` the family name. The 2026-10-25 (Derek), #890 entry's examples and THE FLOOR's were written with Junior; they are re-spelled with `Jnr`, a generation word with no name reading, which reads as Junior did (`Pedro Jnr Filho` → family 'Filho'), and the case rows and S7's and S11's examples likewise. A Brazilian surname written with its generation before a comma joins the family (`BRITO JUNIOR, RAIMUNDO C` → family 'BRITO JUNIOR'). A comma credential the vocabulary does not list behind a name of two or more words ending in Junior takes it into the family name, where the base already reversed the name (`JOSE ROBERTO DA SILVA JUNIOR, DOCTORATE` → family '… JUNIOR', given 'DOCTORATE'). A bracketed Junior is the nickname, as `(Neto)` is (rules/S13; `John Smith (Junior)` → nickname 'Junior', 5 psc-individuals names). And a period-marked Junior opening the given part after a family comma is a title by rules/H2's shape, as `Smith, Neto.` and `Smith, Fils.` are, where 2.2.0 through 2.8.1 read the suffix (`Smith, Junior.` → title 'Junior.', as 2.0.0 and 2.1.0 read it, 1.4.0 the title with no family name); no corpus name writes it so. MEASURED (2026-11-03, `tools/differential/measure.py --base` against master 39839b91, on the change before review; the review re-ran it on the committed tree through ctgov-officials, identically). Committed snapshot: the rules' and case table's Junior names only (9 entries). The CLDR, GND and Wikidata records do not move. Local snapshots, entries that differ, nearly all a new `suffix-or-name` report alone: tse-donors 14,839 (14,763 a report alone; 38 two-word names gaining family 'JUNIOR', 8 trailing words a registry appended moving Junior into the family, 3 `X JUNIOR FILHO`/`NETO`), jrc-names 391 (177 two-word names, `Fabio Junior` → family 'Junior'), orcid-researchers 505 (441 a report alone), patentsview-inventors 212 (211), psc-individuals 97 (86; `Mr Oliver Junior` → given 'Oliver', family 'Junior', 4, and the bracketed Junior, 5), ctgov-officials 87 (77; 7 `… Junior, Médico`-shaped comma names, above; 3 where `Junior` names a post opening the part after a comma, `Rune Broni Strandby, Junior researcher` → given 'Junior', and `Pauline PL LUDWIG, Doctor junior` → given 'junior'), fec-individuals 61 (29 `SURNAME, JUNIOR` names and 13 more with Junior opening the given part, 42 gaining the given name, the thirtieth, `ABREU RODRIGUEZ, JUNIOR`, among the reports alone; 9 `BRITO JUNIOR, RAIMUNDO`; 10 a report alone); cz-candidates, dof-signatures, govuk-people, nepal-candidates, tw-donors and ukec-individuals none. Agreement with the filed boxes: orcid-researchers 9 records progress, 4 regress, 3 change; psc-individuals 5 progress, 1 regresses, 5 change; patentsview-inventors and cz-candidates no move; jrc-names one person more read alike, tse-donors one pair apart. Pinned by the case rows `junior_after_a_family_comma_is_the_given_name`, `junior_alone_after_a_family_comma_is_the_given_name`, `junior_in_title_case_with_a_word_to_spare_is_the_suffix`, `junior_with_no_word_to_spare_is_the_family_name`, `junior_ending_the_given_part_after_a_family_comma`, `a_junior_in_front_of_an_agnomen_is_a_name_word` and `a_dotted_junior_opening_the_given_part_is_a_title`, `tests/v2/test_lexicon.py`'s `test_a_generation_word_that_is_a_name_leans_by_case_only_when_told`, and three build-check mutations. A 2.x `Lexicon` holding a word in `suffix_words_ambiguous` that is not an agnomen translates to a generation reading written `title_case_is_name`, the lean 2.x gave every such word, and the refusal naming the 3.0 call says so. Recompute: the command above against a checkout of 39839b91, and the three listings as `config_diff.py diff` expressions over `--local all --match '(?i)\bj[uú]nior\b'`. +- 2026-11-16 #1230 — THE DOTTED-SHAPE EXAMPLES OF THE 2026-10-25 #752 LINE NO LONGER READ AS WRITTEN. The line's decision stands (a suffix word that is also a name makes no chunk claim inside a word with interior periods), but rules/T8 (decisions/T8, #1230, #1235) now divides an initial glued to the word at its full stop before any comma, before it is read, so `Pedro M.Filho` reads family 'M.', suffix 'Filho' where the line said family 'M.Filho', and `Pedro Alves M.Filho` middle 'Alves', family 'M.', suffix 'Filho' where it said suffix 'M.Filho'. After a comma, and for a word its own stop closes, the dotted-shape reading still acts (`Smith, Pedro M.Filho` → suffix 'M.Filho', `Silva, M.Filho` → given 'M.Filho', `Pedro Alves M.Filho.` → suffix 'M.Filho.'). The Standing line carries the readings now; found by the 3.1 release sweep. diff --git a/docs/design/decisions/S13-bracketed-member-settled-by-its-writing.md b/docs/design/decisions/S13-bracketed-member-settled-by-its-writing.md index 31ed93087..007ec994a 100644 --- a/docs/design/decisions/S13-bracketed-member-settled-by-its-writing.md +++ b/docs/design/decisions/S13-bracketed-member-settled-by-its-writing.md @@ -5,7 +5,8 @@ - A member of the ambiguous class alone in brackets or quotes after the name, its writing settling it as the credential, is the suffix, read in one pass, and reports nothing (`John Smith (MA)`, `John Smith (M.A)`, `Smith, John (MA)` → suffix); any other member stays the nickname S1 reads and reports `suffix-or-nickname`, a dotted member inside the name included (`John Smith (Ed)`, `John Smith (Ma)`, `JOHN SMITH (MA)`, `Jean (M.A) Smith`) — 2026-10-26 #810. - The writing that settles it is read by the rules that read writing: a period inside the word, S3's evidence, whatever case the name is in, and capitals in a name of mixed case, S6's, the case being that of the name's own words and never the clause's, so `john smith (MA)` keeps the nickname where bare `john smith MA` reads suffix. S13's own signal is the position alone — 2026-10-26 #810. - Only a clause after the name is settled, behind its last name word: one in a name with no word of its own keeps the nickname (`Dr. (MA)`, `(M.A)`, where the review of the one-pass commit found both settled), and one with a name word after it keeps the nickname however it is written (`Jeffrey (JD) Bricken`, `Jean 'JD' Smith`, `Smith (MA), John`), while a suffix, a title or a maiden clause after it does not count, however it is written (`John Smith (MA), PhD`, `John Smith (MA) Ph. D.`, `John Smith (MA) Dr.`), asked of the roles the parse read rather than of the following words' tags — 2026-10-26 #810. -- (superseded by #792, decisions/S1's 2026-11-04 entry: the twin is set apart too, so no settled member reads otherwise than it) Where the rest of the name then reads otherwise than beside a bracketed unambiguous credential in the same place, the member's twin, the difference is an accepted cost, recorded in rules/S13's Accepted bullets and counted by tests/v2/test_parser.py's census (`Jack (MA)` → family 'Jack', where `Jack (PhD)` reads given 'Jack') — 2026-10-26 #810. + +Not standing: the accepted cost where the rest of the name read otherwise than beside the member's twin, a bracketed unambiguous credential in the same place (`Jack (MA)` → family 'Jack', where `Jack (PhD)` read given 'Jack'), overtaken by #792 (decisions/S1), which sets the twin apart too — 2026-10-26 #810. Elsewhere: P6's attachment after a comma with nothing before it, which the #810 entry's second review left putting a name word behind a settled clause, runs ahead of this rule's pass since decisions/P6's 2026-10-27 #892 entry, so `, Jones (MA) vd` reads nickname 'MA', family 'vd', as its twin `Smith, Jones (MA) vd` does. diff --git a/docs/design/decisions/S3-credentials-written-in-joined-chunks.md b/docs/design/decisions/S3-credentials-written-in-joined-chunks.md index dc5ec10f0..95fa23ff7 100644 --- a/docs/design/decisions/S3-credentials-written-in-joined-chunks.md +++ b/docs/design/decisions/S3-credentials-written-in-joined-chunks.md @@ -11,7 +11,7 @@ - A member of the ambiguous class is a chunk of a joined word too, however it is written, where another chunk settles it, a credential that is no name (a generation, a numeral, an honorific or a title not one) or a member its periods settle: `John Smith MA/PhD`, `M.A/PhD`, `MA/CCC-SLP` and `MA-CCC-SLP` → suffix, where each was the family; members alone (`MA/Mba`), a generation or a title beside a member (`MA/Jr`, `Ma/Ms`) and a name word (`MA/Jones`) still refuse it. A joined word holding a member is a member itself in brackets, so S13 settles it by position: `John Smith (MA/PhD)` → suffix, `John (MA/PhD) Smith` → nickname, reported, as `(MA, PhD)` reads in each place — 2026-11-07 #1138. - A word with interior periods reads as a suffix where every period-separated chunk counts as a suffix as written, a member another chunk settles included, as a joined word's chunks do; a word with a chunk that does not count is read by position, reported where it is the suffix (`John Smith Msc.Ed` → suffix, `John Smith Bob.PhD` → suffix, reported, `Whinnett, BM.BS` → given, reported), and in brackets the same test sets it apart (`John Smith (Msc.Ed)` → suffix, `(Bob.PhD)` → nickname) — 2026-11-07 #1131. -Elsewhere: an unlisted word whose chunk before a full stop is one the parser reads on its own, and whose chunk after it is a name, is to divide into the words it would be with a space before this rule's shape verdict reads it, once #998's credential batch is listed and the test for a name is decided and measured; an unlisted credential that test lets through would then read as name words (`John Smith B.Tech`). Until then the shape verdict stands as written, and a word closed by its own stop (`B.Tech.`, `Dipl.Ing.`) keeps it after — decisions/period-joined-words' 2026-11-09 #1255 entry. +Elsewhere: an unlisted word whose chunk before a full stop is one the parser reads on its own, and whose chunk after it is a name, divides into the words it would be with a space before this rule's shape verdict reads it, so an unlisted credential written that way reads as name words, reported (`John Smith B.Tech` → middle 'Smith B.', family 'Tech'), while a word closed by its own stop keeps the shape verdict (`John Smith B.Tech.` → suffix 'B.Tech.') — decisions/period-joined-words' 2026-11-09 #1255 entry, carried out by decisions/T8 (#1230, #1235). Open: none in this file. diff --git a/docs/design/decisions/S8-credentials-trailing-run.md b/docs/design/decisions/S8-credentials-trailing-run.md index ae8c7f25d..577c9cdf6 100644 --- a/docs/design/decisions/S8-credentials-trailing-run.md +++ b/docs/design/decisions/S8-credentials-trailing-run.md @@ -11,7 +11,7 @@ Examples name each field as the default order reads it; under the family-first o - With no family comma, a generation word written out, a numeral aside, with a name word behind it does not start the run: the family name is the word behind it (`Guy Andre Junior Francois` → middle 'Andre Junior', family 'Francois'; `John Smith Jr. Jones` → middle 'Smith Jr.', family 'Jones', the reading of 1.4.0 through 2.3.0). A name word there is a word that is no suffix word, numeral S10 reads as the generation, initial, connective, title word or maiden marker, and is a particle or is written in Title case, in a script with no case, or in a name of one case (so a particle that is also title or suffix vocabulary is none: `John Smith Jr. Mc Donald` keeps suffix 'Jr. Mc Donald'); the family-first orders are not asked, so `Smith John Jr. Jones` under `FAMILY_FIRST` reads middle 'Jr. Jones' where `Smith, John Jr. Jones` reads suffix 'Jr. Jones'; so the run still starts before a credential (`John Smith Jr. PhD Jones`), before capitals or lower case in a name of mixed case (`John Smith Jr. CF`), before a title (`Eric H. Holder Jr. Attorney General`), and after the given word in the part after a family comma (`Smith, John Jr. Jones` → suffix 'Jr. Jones') — 2026-11-02 #1023. - A lone particle counts toward the two name words only where the credential stands right behind it (`John von PhD Jones` → family 'von', suffix 'PhD Jones', under the family-first orders given 'von'); a particle run counts once, and a particle the run took is not asked (`Freiherr von vd PhD Jones` keeps middle 'PhD') — 2026-10-10 #627. - Lifting the credential out of the name, the family-comma path's older reading (`John Smith PhD Jones` as family 'Jones', suffix 'PhD'), was declined — 2026-10-04 #602. -- An ambiguous acronym written with its periods starts the run (`John Smith M.A. Jones` → suffix 'M.A. Jones'); and so, since 2026-10-25 #785, does a listed member written in capitals in a name of mixed case, its writing settling it, after the given word after a family comma (`Smith, John MA Jones` → suffix 'MA Jones') and elsewhere only where no name word stands behind it (`John Smith MA JD Jones` → suffix 'MA JD Jones', while `John Smith MA Jones` keeps family 'Jones', 2026-10-26 (Derek)); `John Smith Ma Jones` and `JOHN SMITH MA JONES` keep family 'Jones', and `John Smith DO Jones` family 'DO Jones', its particle reading refusing the start — 2026-10-20 #761; 2026-10-25 #785; 2026-10-26 (Derek), #785. +- An ambiguous acronym written with its periods starts the run (`John Smith M.A. Jones` → suffix 'M.A. Jones'); and so, since 2026-10-25 #785, does a listed member written in capitals in a name of mixed case, its writing settling it, after the given word after a family comma (`Smith, John MA Jones` → suffix 'MA Jones') and elsewhere only where no name word stands behind it (`John Smith MA JD Jones` → suffix 'MA JD Jones', while `John Smith MA Jones` keeps family 'Jones', 2026-10-26 (Derek)); `John Smith Ma Jones` keeps family 'Jones' and `JOHN SMITH MA JONES` family 'JONES', and `John Smith DO Jones` family 'DO Jones', its particle reading refusing the start — 2026-10-20 #761; 2026-10-25 #785; 2026-10-26 (Derek), #785. - With no family comma, a credential acronym written in Title case with a name word behind it does not start the run, as a settled member does not (`Badrul Akmal Hisham Md Yusoff` → family 'Yusoff', the reading of 1.4.0 through 2.3.0; `John Smith MD Jones` and `John Smith M.D. Jones` → suffix 'MD Jones', 'M.D. Jones'); a suffix word written in Title case still starts it on its case alone (`John Smith Esq Jones` → suffix 'Esq Jones'; a generation word before a name word does not, by the word behind it, below), and so does the acronym after the given word after a family comma (`Smith, John Md Jones` → suffix 'Md Jones') — 2026-11-02 #1019 (Derek). Not standing: the split of 2026-10-17 #682, carried out. diff --git a/docs/design/decisions/deviates-registry.md b/docs/design/decisions/deviates-registry.md index 52d41cce0..de6fecfed 100644 --- a/docs/design/decisions/deviates-registry.md +++ b/docs/design/decisions/deviates-registry.md @@ -2,7 +2,7 @@ ## Standing -- A locale pack declares its deviations from the defaults as a module-level `DEVIATES` callable, acceptance metadata kept off `Locale`, whose value equality and pickling a callable field would break; `test_registry_is_the_pack_contract` fails unless every registered policy or segmentation pack ships `DEVIATES`, and every registered pack a rotator list, which is what lets mechanisms.md#LOCALE-PACKS-PURE-DATA promise packs no code paths of their own. A field on `Locale` is to be revisited only if a runtime consumer of the declaration, such as an `explain()`, appears, and none has — 2026-07-18. A vocabulary pack's deviations are derivable instead, from the reading index (`_reading_index.changed_words`), which tests/v2/test_locales.py's choice gate reads; the gate ors the derived surface into every registered pack with `languages`, so a hand `DEVIATES` declares only what a fragment or a patch beside a choice changes; the contract test refuses a `DEVIATES` on a pack that is nothing but a choice of languages (`locales.NE`, the first, and `SL` and `HR`), and a choice pack whose choice changes no word, and requires one of every other pack, `CS` and `SK` among them since their patch — 2026-10-29 #753, phase 3b; 2026-10-30 #753, phase 3d; 2026-10-30 #753, phase 3f; 2026-10-30 #753, phase 3f amended. +- A locale pack declares its deviations from the defaults as a module-level `DEVIATES` callable, acceptance metadata kept off `Locale`, whose value equality and pickling a callable field would break; `test_registry_is_the_pack_contract` fails unless every registered policy or segmentation pack ships `DEVIATES`, and every registered pack a rotator list, which is what lets mechanisms.md#LOCALE-PACKS-PURE-DATA promise packs no code paths of their own. A field on `Locale` is to be revisited only if a runtime consumer of the declaration, such as an `explain()`, appears, and none has — 2026-07-18. A vocabulary pack's deviations are derivable instead, from the reading index (`_reading_index.changed_words`), which tests/v2/test_locales.py's choice gate reads; the gate ors the derived surface into every registered pack with `languages`, so a hand `DEVIATES` declares only what a fragment or a patch beside a choice changes; the contract test refuses a `DEVIATES` on a pack that is nothing but a choice of languages (`SL` and `HR` among them; `locales.NE`, the first, until its `initials_as_family` patch, decisions/O8 (#1254)), and a choice pack whose choice changes no word, and requires one of every other pack, `CS` and `SK` among them since their patch — 2026-10-29 #753, phase 3b; 2026-10-30 #753, phase 3d; 2026-10-30 #753, phase 3f; 2026-10-30 #753, phase 3f amended. - rules/O6's declaration counts a run of letters twice where its first character is of a script the script table classifies, the table W1 divides by, so decomposed `김. 민준` and halfwidth `ヤマダ タロウ` each declare — 2026-11-05 #1087 Open: none in this file. @@ -16,3 +16,4 @@ Open: none in this file. - 2026-10-30 #753, phase 3f amended — A CHOICE PACK THAT GAINS A PATCH DECLARES THE PATCH'S PART, AND THE PACKS SHARING A PATCH SHARE ONE DECLARATION. `locales.CS` and `locales.SK` gain rules/O6's patch (`two_family_names`), so they leave the choice packs and ship `DEVIATES`, as `locales.ES` does, the contract test requiring it of every pack that is not a choice alone. Their declaration is the one `ES` already made for the same patch: three or more name words, or three or more runs of letters. It moved from `locales/es.py` into `_locale.deviates_by_two_family_names`, which all three packs' `DEVIATES` return, so the three cannot drift apart (`test_cs_and_sk_pack_contents` holds them to it). Each pack's title and generation rotators are names the patch alone leaves as the default reads them (`MUDr Novák`, `Novák PhDr.`, `Jana Nováková (roz. Svobodová)`), since `test_a_choice_word_rotator_is_moved_by_the_choice_alone` refuses one the patch moves; the patch has rotators of its own. decisions/vocabulary-model's entry of this date. - 2026-11-05 #1087 — THE TWO-FAMILY-NAMES DECLARATION COUNTS BY THE SCRIPT TABLE. `_locale._letter_runs` counted a run twice when its first character's Unicode name began `CJK`, `HANGUL`, `HIRAGANA` or `KATAKANA`, a second definition of East Asian text beside `_policy._SCRIPT_RANGES`, which every script-conditional rule reads. It now asks `_script_matcher` over the table, so a run W1 can divide is one the declaration counts twice. Moved first, before the table held the conjoining jamo, the declaration would have dropped decomposed `김. 민준` (#1083's refused candidate, which measured 4 of 6,731 names moving); with HANGUL widened (decisions/nfd-shapes, same date), 3 of the 6,738 distinct corpus texts moved (measured 2026-11-05, every distinct name `tools/differential/snapshot.py` reads, the comparator the character-name test run beside the table in one script), each gaining a declaration, the safe direction: `ヤマダ タロウ`, `タナカ. John` and `タロウ·ヤマダ`, halfwidth katakana the name test did not count. None lost one. Over all of Unicode (version 14, Python 3.11), the letters the name test counted and the table does not are the compatibility jamo, the katakana phonetic extensions, and the supplementary plane's Minnan tone kana and archaic and small kana, which no rule classifies and W1 never divides, so a run of them counts once correctly; the table adds 々, 〆 and the halfwidth katakana. `test_the_two_family_names_declaration_counts_by_the_script_table` in tests/v2/test_locales.py holds the rows with both former definitions' answers as recorded controls. - 2026-11-12 #1237 — A CHOICE THAT CHANGES NO WORD, BESIDE A PATCH, IS RECORDED AS INERT. `locales.MN` chooses `mn`, whose readings are all on by default, beside a Cyrillic script order its patch carries in code (decisions/W4's 2026-11-12 #1237 entry), so its derived surface is empty. The phase 3f refusal is unchanged, since it reads only a pack that is nothing but its choice, and MN declares `DEVIATES` for its patch, which the gate reads; `test_choice_rotators_cover_every_changed_word` and `test_a_choice_word_rotator_is_moved_by_the_choice_alone` skip a pack listed in tests/v2/test_locales.py's `_INERT_CHOICES`, and `test_an_inert_choice_changes_no_word` fails the day such a choice changes a word, so the pack leaves the set and its rotators name the word. decisions/vocabulary-model's 2026-11-12 #1237 entry. +- 2026-11-16 #1254 — `locales.NE` IS NO LONGER NOTHING BUT A CHOICE. The 2026-10-29 #753 phase 3b line named it the first pack the contract test refuses a `DEVIATES` on; decisions/O8's 2026-11-11 #1254 entry gave it rules/O8's `initials_as_family` from `ne.toml`'s `[rules]`, so it now declares a hand `DEVIATES` for the patch, as `CS` and `SK` do for theirs. NE has left the packs that are nothing but a choice. Found by the 3.1 release sweep. diff --git a/docs/design/decisions/differential-ledger.md b/docs/design/decisions/differential-ledger.md index df7cbd225..651891463 100644 --- a/docs/design/decisions/differential-ledger.md +++ b/docs/design/decisions/differential-ledger.md @@ -6,7 +6,7 @@ Archived 2026-10-19 under rule 3 of the decisions folder's entry conventions (#7 ## Standing -- `tools/differential/snapshot.jsonl` records every corpus name's reading, one line per (name, order): the seven role fields, the ambiguity kinds, `initials()` and the two case-repair views since #826 (decisions/R4); `tests/v2/test_snapshot.py` fails on drift and prints the moves grouped by changed field, and a change that moves readings re-records, so the PR diff of the snapshot is the list of names it moved. Nothing is classified, and a reviewer can approve a large diff without reading it, the grouping being the mitigation; the ledgers, their guards and the contract/radar tiers are gone, trimming them having been declined — 2026-10-13 #664, a committed snapshot; the `facade` key left with `HumanName` — 2026-10-28 #357. +- `tools/differential/snapshot.jsonl` records every corpus name's reading, one line per (name, order): the seven role fields, the ambiguity kinds, each report's alternative reading, `initials()`, the two case-repair views since #826 (decisions/R4), and since 3.0 the `generation`, `credentials`, `honorifics`, `patronymic` and `surname2` views, each where it is not empty (the snapshot's first line names the views it records); `tests/v2/test_snapshot.py` fails on drift and prints the moves grouped by changed field, and a change that moves readings re-records, so the PR diff of the snapshot is the list of names it moved. Nothing is classified, and a reviewer can approve a large diff without reading it, the grouping being the mitigation; the ledgers, their guards and the contract/radar tiers are gone, trimming them having been declined — 2026-10-13 #664, a committed snapshot; the `facade` key left with `HumanName` — 2026-10-28 #357. - `compare.py` stays, unclassified: it runs a released wheel against the tree behind the version tell, the tree-side path check and a stripped `PYTHONPATH`, prints the snapshot's grouped report and exits 0. It answers how a release tagged before the snapshot read the corpus names, and the 1.4 promise is a question asked of it (`--baseline 1.4.0`), not a gate; for a later release `snapshot.py --since ` is the cheaper answer — 2026-10-13 #664, `compare.py` stays. - The CLDR agreement ratchet stays beside the snapshot, answering agreement with a corpus's stated fields rather than stability (`tests/v2/test_cldr_agreement.py`) — 2026-10-13 #664, the CLDR agreement ratchet. - `Policy`'s fields are annotated with what they store, not widened to every input the constructor accepts, since every reader would see the union; a `.pyi` stub typing `__init__` wide and the attributes narrow is unbuilt, a 3.x candidate (decisions/3-0-reevaluations's #1079 entry) — 2026-07-24 #332. diff --git a/docs/design/decisions/family-without-an-inherited-name.md b/docs/design/decisions/family-without-an-inherited-name.md index 9e8a1f4c6..039afae30 100644 --- a/docs/design/decisions/family-without-an-inherited-name.md +++ b/docs/design/decisions/family-without-an-inherited-name.md @@ -2,7 +2,7 @@ ## Standing -- `family` is the name a convention files a person under, not necessarily an inherited one: where a convention has no inherited name, the word in the surname slot of that convention's own records is the family; no default reading changes and no field is added. Position gives it today for an Ethiopian name under the default given-first order; the Mongolian father's name waits on #1237's pack, a Kyrgyz `Father uulu` on #1187's rule and a Burmese name on #1231's pack — 2026-11-12 #1253. +- `family` is the name a convention files a person under, not necessarily an inherited one: where a convention has no inherited name, the word in the surname slot of that convention's own records is the family; no default reading changes and no field is added. Position gives it today for an Ethiopian name under the default given-first order; `locales.MN` gives the Mongolian father's name (#1237) and `locales.TR_AZ` a Kyrgyz `Father uulu` (#1187), and a Burmese name waits on #1231's pack — 2026-11-12 #1253. - The patronymic view keeps rules/R9's basis, filled only by a word or a rule that says patronymic, never by a position; it may overlap the family or be a part of it, and a father's name nothing in the text marks (Ethiopia) fills no view — 2026-11-12 #1253. - An Ethiopian or Eritrean name stays positional, its family under the default given-first order the grandfather's name where it is written and the father's where it is not; a caller matching such a list builds the matcher from a parser with `middle_as_family`, keeping the default parser for the fields (docs/matching.rst) — 2026-11-12 #1253. diff --git a/docs/design/decisions/generational-words.md b/docs/design/decisions/generational-words.md index 7696e2ea9..7ee192186 100644 --- a/docs/design/decisions/generational-words.md +++ b/docs/design/decisions/generational-words.md @@ -14,7 +14,7 @@ Closes #661. 31 spelled-out generational words join SUFFIX_WORDS, and one predic - fr `père` is read by default, gated by its family reading as `fils` is (rules/S11), being a French surname too and colliding with no other language's word: `Alexandre Dumas père` reads suffix 'père' and `Olivier Père` family 'Père', both reported, and no French pack is needed — 2026-11-03 #684 (Derek). - fr `fils` is a generation reading gated by its family reading, its case and the count (rules/S11): `Alexandre Dumas fils` reads suffix 'fils' and `Marie Fils` family 'Fils', both reported — 2026-10-25 #752. -Elsewhere: the run start that lets any unambiguous suffix word of two or more letters begin the credential run, whatever its script (`Antonio Pavlović mlađi Jones` reads suffix 'mlađi Jones', as does `Pieter Bruegel stariji Jones` with 'stariji Jones'), is decisions/S8's 2026-10-14 (Derek), #679 entry, which retracted this file's #602 run-start bullet; the glued peel of 二世 is decisions/W2's 2026-10-17 #707 entry. +Elsewhere: the run start that lets any unambiguous suffix word of two or more letters begin the credential run, whatever its script (`Antonio Pavlović mlađi` reads suffix 'mlađi'), is decisions/S8's 2026-10-14 (Derek), #679 entry, which retracted this file's #602 run-start bullet; that a generation word with a name word behind it starts no run (`Antonio Pavlović mlađi Jones` and `Pieter Bruegel stariji Jones` read middle 'Pavlović mlađi' and 'Bruegel stariji', family 'Jones') is decisions/S8's 2026-11-02 #1023 entry; the glued peel of 二世 is decisions/W2's 2026-10-17 #707 entry. - pt `júnior`, the accented spelling of `junior`, ships beside it with `same_as = "jr"` and inherits its vetting and its accepted collisions rather than being re-vetted under the two tests above (Junior is a borne surname, 2,146 US Census bearers, where `senior` was refused for 3,864): `José Silva Júnior` reads family 'Silva', suffix 'Júnior', as `José Silva Junior` does — 2026-10-23 (Derek), #843. - The Brazilian agnomens `Filho`, `Neto`, `Netto`, `Sobrinho` and their feminines are generation readings of the `agnomen` kind, gated by the count alone (rules/S11): `Pedro Alves Filho` reads family 'Alves', suffix 'Filho', and `Ana Neto` keeps family 'Neto', both reported — 2026-10-25 #752. diff --git a/docs/design/decisions/group-suggestion.md b/docs/design/decisions/group-suggestion.md index c11d619b8..fbb899b07 100644 --- a/docs/design/decisions/group-suggestion.md +++ b/docs/design/decisions/group-suggestion.md @@ -25,7 +25,7 @@ - That rule's reach as implemented, the opening word standing alone: a run of capitals words in front votes as before, whatever its first word (`DE SOUZA Maria`) — 2026-11-14 #1355. - A name word in a script that writes no initials followed by a letter of it casts no trailing-initial vote, since no byline writes such a name before an initial, as rules/T5 and the order report read it: a group of Thai or Burmese names, each a word and a letter, suggests nothing — 2026-11-12 #1256. -Open: a group gate for the short capitals words, under which one votes where another name of the list writes a longer capitals word at the same end, measured and not taken for 3.1 (2026-11-14 #1355, its Declined bullet), to weigh beside #659. For a list mixing East Slavic and Turkic patronymics (uz_senate, kz_senate), suggesting both rules, and reading the Kazakh `-uly` and `-kyzy` endings as a Turkic signal, are not taken for 3.1 and not decided against (2026-11-15 #1356, its Not taken bullet). `_MIN_PATRONYMIC_VOTES`, five names, was set to keep small Russian groups written family first from moving a family-first base to given-first (2026-11-10 THRESHOLDS); since 2026-11-15 #1356 a `FAMILY_FIRST` base keeps its order on such a group, and that entry measured what relaxing the count does now: no same-order cell moves, and groups written given-first move a family-first base sooner. The threshold is unchanged and has no issue. #1308, the tracking issue, is closed; its other open item, the given names the given-name table's family-share filter drops, was #1357, settled for `John`, `David` and `Robert` by 2026-11-15 #1357, which leaves `James`, `Paul`, `George`, `Charles`, `Thomas` and `Martin` out. #1364, a surname table for names outside zh, ko and vi, is open for 3.2: 2026-11-15 #1357 holds what a gate measured for it (a dated snapshot), the cost no population of the tool shows (a list whose given names are listed surnames) and the sources no entry of decisions/shipped-data-licences clears. Not measured, and without an issue: the table's 20-use floor (`MIN_USES`), and a family share between 10% and 15%. +Open: a group gate for the short capitals words, under which one votes where another name of the list writes a longer capitals word at the same end, measured and not taken for 3.1 (2026-11-14 #1355, its Declined bullet), to weigh beside #1402. For a list mixing East Slavic and Turkic patronymics (uz_senate, kz_senate), suggesting both rules, and reading the Kazakh `-uly` and `-kyzy` endings as a Turkic signal, are not taken for 3.1 and not decided against (2026-11-15 #1356, its Not taken bullet). `_MIN_PATRONYMIC_VOTES`, five names, was set to keep small Russian groups written family first from moving a family-first base to given-first (2026-11-10 THRESHOLDS); since 2026-11-15 #1356 a `FAMILY_FIRST` base keeps its order on such a group, and that entry measured what relaxing the count does now: no same-order cell moves, and groups written given-first move a family-first base sooner. The threshold is unchanged and has no issue. #1308, the tracking issue, is closed; its other open item, the given names the given-name table's family-share filter drops, was #1357, settled for `John`, `David` and `Robert` by 2026-11-15 #1357, which leaves `James`, `Paul`, `George`, `Charles`, `Thomas` and `Martin` out. #1364, a surname table for names outside zh, ko and vi, is open for 3.2: 2026-11-15 #1357 holds what a gate measured for it (a dated snapshot), the cost no population of the tool shows (a list whose given names are listed surnames) and the sources no entry of decisions/shipped-data-licences clears. Not measured, and without an issue: the table's 20-use floor (`MIN_USES`), and a family share between 10% and 15%. ## Log diff --git a/docs/design/decisions/nfd-shapes.md b/docs/design/decisions/nfd-shapes.md index b34a28d73..d4fa0b3f7 100644 --- a/docs/design/decisions/nfd-shapes.md +++ b/docs/design/decisions/nfd-shapes.md @@ -4,7 +4,7 @@ - A letter in the letter-shape regexes is `_vocab._LETTER` (a letter plus the general combining blocks), and the caps predicates compose a word not already NFC before `isalpha()` and count letters with `composed_len`, so a name typed decomposed reads as its composed twin and keeps the encoding written: decomposed `Dr. inž. Janez Novak` → title 'Dr. inž.', `Janez Novak, ŽŠČ` → suffix 'ŽŠČ', `Janez Novak, Ž.Š.` → given names 'Ž.Š.', family 'Janez Novak' — 2026-10-12 #652. - The class is not widened to every script's marks (Indic vowel signs, Arabic and Hebrew points), rules/H2's Accepted clause recording that an abugida abbreviation never reads as a title by shape (for one written with a vowel sign; the ten Brahmic scripts from Devanagari to Sinhala are kept from the shape by script since 2026-11-08 #1191, decisions/H2) — 2026-10-12 #652. -- The initial shape and the #320 script veto are asked of the composed spelling and the single-letter width tests count composed letters, the public v1 `initial` regex left as written: decomposed `É. y É. Smith` → given 'É.', middle 'y É.', `John й Smith` → given 'John', middle 'й', family 'Smith', `김. 민준` → family '김.', given '민준', and `김민준, 씨.` → suffix '씨.'; a connective with no precomposed form is two letters (`q́` added to `conjunctions` reads `John q́ Smith` as given 'John q́ Smith') — 2026-10-13 #665. +- The initial shape and the #320 script veto are asked of the composed spelling and the single-letter width tests count composed letters, the public v1 `initial` regex left as written until `config/regexes.py` left the package in 3.0 (#1008): decomposed `É. y É. Smith` → given 'É.', middle 'y É.', `John й Smith` → given 'John', middle 'й', family 'Smith', `김. 민준` → family '김.', given '민준', and `김민준, 씨.` → suffix '씨.'; a connective with no precomposed form is two letters (`q́` added to `conjunctions` reads `John q́ Smith` as given 'John q́ Smith') — 2026-10-13 #665. - An unspaced decomposed hangul name is still not divided, so `김민준. 이서연` reads by encoding (decomposed: family '김민준.', given '이서연') — 2026-10-13 #665. - The script table's HANGUL holds the conjoining jamo (U+1100–11FF, U+A960–A97F, U+D7B0–D7FF) beside the precomposed syllables, so a reader of raw characters sees a decomposed syllable as hangul: decomposed `이서연·김민준` → given '이서연', family '김민준', as composed. Jamo that compose to no syllable are hangul to every rule (`ᄒᆞᆫ 김` → family 'ᄒᆞᆫ', initials ''), the two fillers U+115F and U+1160 with them; the compatibility jamo stay out — 2026-11-05 #1087. - A closed-list shape test is asked of the NFC-composed word too: `_vocab.is_patronymic_marker` composes a non-ASCII word before the `_TURKIC` patterns, and `locales/tr_az.py`'s `DEVIATES` composes the name — 2026-11-10 #1316. diff --git a/docs/design/decisions/suffix-acronym-collisions.md b/docs/design/decisions/suffix-acronym-collisions.md index 547bb1d6f..847fc1b60 100644 --- a/docs/design/decisions/suffix-acronym-collisions.md +++ b/docs/design/decisions/suffix-acronym-collisions.md @@ -7,7 +7,7 @@ Closes #342 (a wordlist question) and #454 (a rules.md question) together, becau - A suffix acronym that is also a name borne in the trailing position gets one of three answers, by how common each reading is there: the name reading dominating removes the word from the vocabulary (a caller who needs it adds it back), rough balance marks it ambiguous, and the credential dominating leaves it unambiguous; length is a correlate, not the test — 2026-09-07 #342. - `rai`, `cha` and `mai` are out of the suffix acronyms, their trailing name readings being far more common than the credentials, and the cost is accepted: `John Smith RAI` and `John Smith MAI` read the letters as the family name — 2026-09-07 #342; 2026-10-16 #687. - `gc` is out of the suffix acronyms, the Nepali surname G.C. (Gharti Chhetri) being far more common at the end of a name than the credential GC, and the cost is accepted: `John Smith GC` reads the letters as the family name, and `John Smith G.C.` the paired initials rules/S3 leaves to the name — 2026-10-24 #864. -- `ba`, `meng`, `lac`, `si` and `chi` are marked ambiguous rather than removed, so each is read as the ambiguous class is, by the case it is written in, the words to spare and the comma (rules/S6, S4 and C4): `John Smith SI` keeps the credential and reports the fork, while `John Smith Si`, `Anna Ba` and `Wang, Meng` read the surname or the given name, reported — 2026-09-07 #342; 2026-09-25 #540; 2026-10-21 #791. +- `ba`, `meng`, `lac`, `si` and `chi` are marked ambiguous rather than removed, so each is read as the ambiguous class is, by the case it is written in, the words to spare and the comma (rules/S6, S4 and C4): `JOHN SMITH SI` keeps the credential and reports the fork (`John Smith SI` keeps it unreported, its capitals settling it in a mixed-case name; 2026-10-25 #785, decisions/S6), while `John Smith Si`, `Anna Ba` and `Wang, Meng` read the surname or the given name, reported — 2026-09-07 #342; 2026-09-25 #540; 2026-10-21 #791. - `meng` and `lac` carry no case mask, since a mask applies in every role and would re-spell the surnames the marking keeps (`wang meng` would render `Wang MEng`) — 2026-09-25 #540. - `ded` is not marked: it is borne as a given name, which the suffix claim reaches wherever the given name ends the name or its part, after a family comma (`Thapa, Ded` reads suffix 'Ded') and under either family-first order (`Luli Ded`), shapes no count was taken of; `edd` is read the same way (`Smith, Edd`) — 2026-09-25 #540; the position corrected 2026-11-09 #998, where `bed` was refused for that shape. - 43 credentials written in two chunks joined at a full stop (`B.Pharm`, `C.Psych`, `M.Kes`, `M.Pd`) are listed, so the vocabulary reads each whole before rules/S3's shape does; `msi` is marked ambiguous, Msi being a Xhosa surname, and twelve whose spelling without stops is a name or another word are refused (`peng`, `bed`, `ssi`) — 2026-11-09 #998. diff --git a/docs/design/decisions/v1-xfail-triage.md b/docs/design/decisions/v1-xfail-triage.md index 099247f30..4bd771aef 100644 --- a/docs/design/decisions/v1-xfail-triage.md +++ b/docs/design/decisions/v1-xfail-triage.md @@ -1,4 +1,4 @@ -# v1-xfail-triage — the eight inherited aspirations, four retired and four kept (four of those eight since fixed, 2026-09-08, 2026-09-23 and 2026-11-09) +# v1-xfail-triage — the eight inherited aspirations, four retired and four kept (five of those eight since fixed, 2026-09-08, 2026-09-23, 2026-11-09 and 2026-11-10) The reconciled v1-style banks (`tests/test_*.py`) carried eight `@pytest.mark.xfail` tests inherited from v1, each an aspiration nobody had judged since. `xfail_strict = true`, so all eight were live claims that 2.0 still does not do the thing — but a bare marker says only that, never whether the thing is WANTED, and that is the gap this triage closes. After it, every surviving marker cites an issue and every retired one is a deliberate pin of current behavior. The parses quoted below are this entry's evidence and its own recompute: @@ -7,16 +7,16 @@ The reconciled v1-style banks (`tests/test_*.py`) carried eight `@pytest.mark.xf ## Standing - A trailing `I` before a further comma stays a middle initial, the commoner reading: `Maier, Amy I, Jr.` reads middle 'I', suffix 'Jr.', where `Maier, Amy I` reads suffix 'I' (rules/C9) — 2026-09-01 (Derek's triage) -- `Dr King Jr` reads title 'Dr', family 'King', suffix 'Jr', and `King, Dr Jr` reads the same fields, with no report since `king` became a given name outside a title phrase (`Dr Pope Jr` keeps H3's floor and its report) — 2026-09-01 (Derek's triage); 2026-10-26 #752, phase 2j +- `Dr King Jr` reads title 'Dr', family 'King', suffix 'Jr', and `King, Dr Jr` reads the same fields; `Dr King Jr` reports `title-or-name` for `King`, a title that may be a given name standing in no title phrase, and `King, Dr Jr` reports nothing (`Dr Pope Jr` keeps H3's floor and its own report) — 2026-09-01 (Derek's triage); 2026-10-26 #752, phase 2j; 2026-11-16 #913 - `ben` stays out of the default's particles, colliding with the given name Ben where the particle claim acts: `Ahmad ben Husain` reads middle 'ben', family 'Husain' (an Arabic or Hebrew choice reads it as a clan particle written `default = false`, `locales.AR` giving family 'ben Husain', decisions/vocabulary-collisions' 2026-11-12 #1257 entry) — 2026-09-01 (Derek's triage) - An input that is all titles takes its last title word as the name, a convention accepted rather than defended: `The Right Hon. the President of the Queen's Bench Division` reads family 'Division' — 2026-09-01 (Derek's triage) -- The one surviving marker is `E.T. Smith`'s, cited by issue (#490 until 2026-11-09, #1296 since): dotted initials against dotted vocabulary; `U.S. District Judge Marc Thomas Treadwell` was fixed on 2026-11-09 (decisions/H10); #489's `Her Majesty Queen Elizabeth` (given 'Elizabeth') was fixed on 2026-09-08 — 2026-09-01 +- No marker survives: `E.T. Smith`'s, cited by issue (#490 until 2026-11-09, #1296 since), was fixed on 2026-11-10 (decisions/T7); `U.S. District Judge Marc Thomas Treadwell` was fixed on 2026-11-09 (decisions/H10); #489's `Her Majesty Queen Elizabeth` (given 'Elizabeth') was fixed on 2026-09-08 — 2026-09-01; 2026-11-16 #1296 - `juan garcia III` repairs to `Juan Garcia III` and its test is an ordinary pin — 2026-09-23 #492. - #485's `xfail:` corpus-label prefix is not adopted: a surviving marker carries its issue number, and a decided reading moving is a classified change — 2026-09-01 #485. -Elsewhere: the `title-or-name` report on the word the title peel leaves standing (`Dr Pope Jr`, `The Right Hon. … Division`) is decisions/H4's 2026-09-07 #491 entry, which reached `Dr King Jr` from decisions/H3's 2026-09-08 #316 floor until `king` left the title vocabulary on 2026-10-26. +Elsewhere: the `title-or-name` report on the word the title peel leaves standing (`Dr Pope Jr`, `The Right Hon. … Division`) is decisions/H4's 2026-09-07 #491 entry, which reached `Dr King Jr` from decisions/H3's 2026-09-08 #316 floor until `king` left the title vocabulary on 2026-10-26; it reports again since decisions/H9's 2026-10-27 #913 royal title phrases entry, for a title that may be a given name standing in no title phrase. -Open: [#1296](https://github.com/derek73/python-nameparser/issues/1296) — whether `E.T. Smith` reads given 'E.', middle 'T.'; #490's title half was fixed on 2026-11-09 (decisions/H10), and the marker moved to #1296. +Open: none in this file. ## Log @@ -35,3 +35,5 @@ Open: [#1296](https://github.com/derek73/python-nameparser/issues/1296) — whet - 2026-09-01 #485 — #485'S `xfail:` LABEL PREFIX IS NOT ADOPTED: the bullet below, written in this triage. - [#485](https://github.com/derek73/python-nameparser/issues/485) is superseded. It proposed prefixing corpus labels with `xfail:` so a radar diff on a name like `Dr King Jr` reads as a known-bad parse improving rather than a regression. The premise was that a v1 xfail marker is a usable triage signal; after this triage it is not, because the marker no longer tracks the disposition — `Dr King Jr` is now a PIN, so a radar diff on it means a decided reading moved, which is precisely the signal the prefix would have suppressed. The four that remain carry issue numbers, which is the same information in a place that cannot go stale against the pinned historical ref. The 2026-09-08 fix STRENGTHENS this rather than unsettling it, and the argument is worth stating because the fix looks at first like the counterexample: `Dr King Jr` moved, so a diff on it is exactly what #485's prefix predicted — but it moved by DECISION, with a ledger rule and a rewritten pin, which is a classified change and not a known-bad parse quietly improving. Had the prefix shipped, that diff would have read as the aspiration finally coming true and nobody would have been asked to classify it. Two markers remain, both #490's (re-counted 2026-09-23, #492), and they still carry issue numbers. - 2026-10-26 #752, phase 2j (Derek) — `king` LEAVES THE TITLE VOCABULARY. SUPERSEDES: in 2026-09-01 (Derek's triage), "`king` stays in TITLES for the addressing forms". `king` gains a `given` reading and is a title only inside a title phrase (decisions/H9's entry of this date); `Dr King Jr` and `King, Dr Jr` keep the fields this triage pinned, the first losing its `title-or-name` report, and the triage's tests and examples that used `king` as title vocabulary use `pope` now, which reads as `king` did on master in every one of them. +- 2026-11-16 #1296 — THE LAST MARKER IS GONE. `E.T. Smith` reads given 'E.', middle 'T.' since decisions/T7's 2026-11-10 #1296 entry (rules/T7), and `tests/test_conjunctions.py::test_two_initials_conflict_with_conjunction` is an ordinary pin. The Standing line, this file's title and its index line now count five of the eight fixed and no marker left; the counts written in the 2026-09-01 FIX CANDIDATES entry and the 2026-11-09 #490 entry stand as they were on those dates. Found by the 3.1 release sweep. +- 2026-11-16 #913 — `Dr King Jr` REPORTS AGAIN. The 2026-10-26 #752 phase 2j entry left it with no report once `king` was a title only inside a title phrase; decisions/H9's 2026-10-27 #913 royal title phrases entry made `king` read as a name word where it is the first name word after any titles report `title-or-name`, `Dr King Jr` included, while `King, Dr Jr`, whose comma marks the family, still reports nothing. No field moves. Found by the 3.1 release sweep. diff --git a/docs/design/decisions/vocabulary-exclusions.md b/docs/design/decisions/vocabulary-exclusions.md index 3aa892177..f4f056f21 100644 --- a/docs/design/decisions/vocabulary-exclusions.md +++ b/docs/design/decisions/vocabulary-exclusions.md @@ -62,7 +62,7 @@ Excluded (TITLES): - The per-word refusals are data since #750 (2026-10-19): each word refused a title reading — the Indic ঠাকুর/ठाकुर, कुमारी/কুমারী, बेगम/বেগম, शेख/শেখ, आचार्य and राजा/रानी (#343, #344), and #606's ông/bà, thiru, puan, pan, rodina, gróf, cik, paron, tikin, marshal and justice, #662's malam (Derek's decline) and bay, #660's shehu, and #789's wm (2026-10-22) — is an `excluded` entry in its language's file with its reason, and with its counts as name readings where they were taken. `uv run python tools/vocab/query.py --excluded title` lists them. A contributor who adds one back meets the reason as a build error. - shehu's counts do not settle a graf-class weighing, and must not be read as if they did: its one leading-position figure, the Wikidata given-name count on its entry, is a lower bound (Shagari's own entry has no given-name statement), and its other counts are family-name bearers, a position C-i does not ask about. The evidence that Shehu leads a name is not a count. It is Shagari himself, and CLDR's Hausa sample data, whose six renderings carrying the word all file it as the given name (`grep '"given": "Shehu"' tools/differential/cldr_fields.jsonl`). It arrived with an early bulk import (1a51555f) and was never put to C-i before #660. Whoever re-argues it counts Hausa given-name use first; the accepted cost is the honorific use, `Shehu Abubakar` reading given Shehu as any untitled name does, and the reading belongs in an opt-in pack if anyone asks for it. malam is the opposite case: CLDR's Hausa data files Malam as the title (`grep '"title": "Malam"' tools/differential/cldr_fields.jsonl`), so its refusal is a decline on the counts, not a shehu-style removal. - The class-level half of the Indic refusals stays here: the divergence on शेख/শেখ is deliberate and is the sri/shri case run backwards — the Latin sheikh cluster SHIPS as given-name titles for the Arabic addressing form, while the Indic spellings name the family. Since 2026-10-27 the Latin spellings but `shaykh` are titles only inside a title phrase (decisions/H9), so at the head of a name `Shekh Ahmed` and `शेख अहमद` both read the word as the given name, and the divergence stands only where a style, a modifier or `of` makes the Latin word a title, or a period does at the front by rules/H2's shape (`Sheikh. Ahmed` reads title 'Sheikh.', `शेख. अहमद` given 'शेख.'). shehu's removal moved three CLDR corpus names (`Shehu Muhammed`, `Muhammed, Shehu`, `Modibbo, Shehu Bello`), all three now agreeing with CLDR on every role (moves: `uv run python tools/differential/snapshot.py --since v2.4.1`). -- The trailing-position rule that must NOT be adopted, and 2026-09-08 says what the line is: TITLES holds hundreds of words in no suffix set, at least nineteen of them ordinary English surnames (king, judge, bishop, baron, sheriff, ...), so a blanket "vocabulary outranks position in the trailing slot" reading would turn "Mary Jane King" into title="King" with the family name gone. The leading half of this argument is AGENTS.md's "Titles permanently shadow first names" gotcha, whose example is Dean; this is the trailing half, and it shadows the family name rather than the given (#316). What #316 settled is that the prohibition is on BARE words: "Mary Jane King" still reads family King, while "John Smith Prof." reads title Prof. **The second half of that argument is RETRACTED 2026-09-09**, in review of the docs commit: "a period-marked trailing word being one nobody writes as a surname" claimed the period keeps the collision out of the trailing slot, and it does not. Measured on the branch tree — "Mary Jane King." reads title "King.", given Mary, family Jane, the family name shadowed exactly as the bare reading would have shadowed it, and "John Smith Judge." reads title "Judge." The reach is the vocabulary rather than a handful: of the 746 titles in no suffix set, 627 read as a trailing title once a period is written behind them, and every one of the 119 that do not is kept out by the abbreviation SHAPE — a digit, a hyphen, an apostrophe, or a script whose letters carry combining marks (rules/H2 records that half) — no plain ASCII-letter title missing at all. So king, judge, bishop, baron and sheriff ARE reachable in the trailing slot; what the prohibition above buys is the bare spelling and nothing more. The period is a WRITING convention the rule can read, not evidence about the word, and reading it is an ACCEPTED COST under the premise that the input is a name (rules.md H Background): someone who ends a name with a period-marked word has written an abbreviation. rules/H5 carries it as an Accepted clause with "Mary Jane King." as the executable example. (Since 2026-10-26 `king` is a title only inside a title phrase, decisions/H9, #752 phase 2j: "Mary Jane King." reads family "King." and the surnames this paragraph names are pope, judge, bishop, baron and sheriff, rules/H5's example "Mary Jane Pope.".) Recompute the reach with `L = Parser().lexicon; ws = [w for w in L.titles - L.suffix_acronyms - L.suffix_words if " " not in w]; len([w for w in ws if parse("Mary Jane %s." % w).title])` against `len(ws)` — 627 of 746 on 2026-09-09 — the digits move as the vocabulary grows and neither argument does. See #H5. (Since 2026-11-06, decisions/H5's #1116 entry, a hyphen or a period inside the word no longer keeps a word out: 718 of 820 reach the trailing slot, 688 before, the 30 added including whole hyphenated words as well as abbreviations (`co-founder`, `senior-judge`, `singer-songwriter`, `priv.-doz`, `sig.ra`), and the recipe reads `Parser().lexicon._sets` since 3.0's 4i-b. Of the 102 still kept out, 35 hold a digit, 5 an apostrophe and 54 combining marks, and 8 are kept out by what the list above does not name: a slash (`mag/judge`), the Hebrew geresh and gershayim (`ד"ר`, `פרופ׳`), and the single letter `ড`.) The bare prohibition has one exception since #835 (decisions/H8): a listed salutation ending the given part after a family comma is the title, the comma having marked the surname's place and the salutations borne as names being excluded. +- The trailing-position rule that must NOT be adopted, and 2026-09-08 says what the line is: TITLES holds hundreds of words in no suffix set, at least nineteen of them ordinary English surnames (king, judge, bishop, baron, sheriff, ...; `king` has since left TITLES, a title only inside a title phrase by decisions/H9's #752 phase 2j, so `Mary Jane King.` now reads family 'King.', while `Mary Jane Pope.` still reads title 'Pope.'), so a blanket "vocabulary outranks position in the trailing slot" reading would turn "Mary Jane King" into title="King" with the family name gone. The leading half of this argument is AGENTS.md's "Titles permanently shadow first names" gotcha, whose example is Dean; this is the trailing half, and it shadows the family name rather than the given (#316). What #316 settled is that the prohibition is on BARE words: "Mary Jane King" still reads family King, while "John Smith Prof." reads title Prof. **The second half of that argument is RETRACTED 2026-09-09**, in review of the docs commit: "a period-marked trailing word being one nobody writes as a surname" claimed the period keeps the collision out of the trailing slot, and it does not. Measured on the branch tree — "Mary Jane King." reads title "King.", given Mary, family Jane, the family name shadowed exactly as the bare reading would have shadowed it, and "John Smith Judge." reads title "Judge." The reach is the vocabulary rather than a handful: of the 746 titles in no suffix set, 627 read as a trailing title once a period is written behind them, and every one of the 119 that do not is kept out by the abbreviation SHAPE — a digit, a hyphen, an apostrophe, or a script whose letters carry combining marks (rules/H2 records that half) — no plain ASCII-letter title missing at all. So king, judge, bishop, baron and sheriff ARE reachable in the trailing slot; what the prohibition above buys is the bare spelling and nothing more. The period is a WRITING convention the rule can read, not evidence about the word, and reading it is an ACCEPTED COST under the premise that the input is a name (rules.md H Background): someone who ends a name with a period-marked word has written an abbreviation. rules/H5 carries it as an Accepted clause with "Mary Jane King." as the executable example. (Since 2026-10-26 `king` is a title only inside a title phrase, decisions/H9, #752 phase 2j: "Mary Jane King." reads family "King." and the surnames this paragraph names are pope, judge, bishop, baron and sheriff, rules/H5's example "Mary Jane Pope.".) Recompute the reach with `L = Parser().lexicon; ws = [w for w in L.titles - L.suffix_acronyms - L.suffix_words if " " not in w]; len([w for w in ws if parse("Mary Jane %s." % w).title])` against `len(ws)` — 627 of 746 on 2026-09-09 — the digits move as the vocabulary grows and neither argument does. See #H5. (Since 2026-11-06, decisions/H5's #1116 entry, a hyphen or a period inside the word no longer keeps a word out: 718 of 820 reach the trailing slot, 688 before, the 30 added including whole hyphenated words as well as abbreviations (`co-founder`, `senior-judge`, `singer-songwriter`, `priv.-doz`, `sig.ra`), and the recipe reads `Parser().lexicon._sets` since 3.0's 4i-b. Of the 102 still kept out, 35 hold a digit, 5 an apostrophe and 54 combining marks, and 8 are kept out by what the list above does not name: a slash (`mag/judge`), the Hebrew geresh and gershayim (`ד"ר`, `פרופ׳`), and the single letter `ড`.) The bare prohibition has one exception since #835 (decisions/H8): a listed salutation ending the given part after a family comma is the title, the comma having marked the surname's place and the salutations borne as names being excluded. Excluded (Policy.script_orders defaults): Script.KATAKANA is deliberately absent — a pure-katakana token is predominantly a transcribed foreign name kept in its source order, so nothing defaults on it (rule W4's boundary). Noted 2026-08-15: of the three Script-keyed axes, this is the one with no force-a-decision guard (mechanisms.md#FORCE-A-DECISION-TABLE), so a new Script member silently gets no order. diff --git a/docs/design/decisions/vocabulary-model.md b/docs/design/decisions/vocabulary-model.md index 5c325c58e..26f19a2d7 100644 --- a/docs/design/decisions/vocabulary-model.md +++ b/docs/design/decisions/vocabulary-model.md @@ -5,7 +5,7 @@ The vocabulary was a set of base sets plus marker subsets (`particles` and `part ## Standing - The vocabulary redesign comes before adding many packs: it is designed for 3.0, and what is safe is pulled forward in four phases, (1) the data format and a compiler, snapshot-neutral, (2) derived ambiguity with the gate on every reading kind, (3) pack semantics, (4) the rules menu, order and shapes, and the output model — 2026-10-15/16. -- Each word is described by its readings (word → reading → properties), each kind belonging to one category that decides the compiled field it feeds; detailed kinds are recorded even where the kinds of a category behave alike, generation and credential being separate kinds among the suffix category's six (`generation`, `credential`, `honorific`, `professional_honorific`, `status`, `courtesy`) — 2026-10-15/16; 2026-10-18 #737. +- Each word is described by its readings (word → reading → properties), each kind belonging to one category that decides the compiled field it feeds; detailed kinds are recorded even where the kinds of a category behave alike, generation and credential being separate kinds of the suffix category (its kinds are the entries `CATEGORY` in `nameparser/_reading_index.py` maps to `suffix`) — 2026-10-15/16; 2026-10-18 #737. - A language file holds the words the parser might meet in names written in that language, immigrant particles included, not the words of its etymology, and a word sits in the file of every language whose names it occurs in, a Latin transliteration in its source language's file; `mul.toml` holds the words shared on purpose instead (the generations `i` to `v`, `2` and `jr` with `junior` and `jnr`, `&`, the European titles below, and the degrees and salutations every country's data writes alike), a word joining it where it harms no language and would otherwise be duplicated into every language's file — 2026-10-15/16; 2026-10-18 #737; 2026-10-19 #749; 2026-10-19 #750, title kinds; 2026-11-02 #1005 (Derek); 2026-11-03 #1005, the strict-gap batches (Derek). - The default loads every language and keeps working for names of any language. Choosing a language narrows it since 3.0's phase 3 (#753): a pack settles only the clashes where its language has a vocabulary reading (`locales.VI` excepted: its fragment removes readings of Vietnamese syllables no vi.toml reading can settle, 2026-11-05 #1108), a strict choice reads only the chosen languages' files, `mul.toml` and native-script words' readings as a plain choice of the same languages keeps them (name readings included), and a pack's preferred reading can outrank one a shape rule derives — 2026-10-15/16; 2026-10-30 #753, file-strict; 2026-11-02 #1005 (Derek); 2026-11-07 #1148. - `e`, `y` and `i` stay in the default; choosing a language settles their one-case fork for that language's own reading, `may_be_initial` not holding on a chosen file's conjunction, as `locales.PT` and `locales.PT_BR` do for `e` — 2026-10-15/16; 2026-10-29 #753, phase 3b; 2026-10-30 #753, phase 3g. @@ -63,7 +63,7 @@ The vocabulary was a set of base sets plus marker subsets (`particles` and `part Not standing: the plans the classifications carried out, phase 1's mechanical conversion of the unclassified categories into `und.toml` (2026-10-18 #737) and the shared readings left in place until their categories were classified (2026-10-19 #749), both done by 2026-10-20 #751, the conjunctions; and #747's reason for exempting `und.toml`, its entries keeping the Python lists' order for its vetting comments to point along (2026-10-19 #747), overtaken once it held two entries and no such comment. -Open: #753 (phase 3, language packs; the 16 words strict ungates, each read for a name reading in the chosen file), #754 (phase 4, order, shapes and the output model; the `Lexicon` surface's build, 4i-a to 4i-d). +Open: [#1145](https://github.com/derek73/python-nameparser/issues/1145), the display and sorting patterns a pack may carry, the one item left when #754 (phase 4) closed on 2026-11-08. #753 (phase 3) closed the same day; the words a strict choice ungates are tests/v2/test_reading_index.py's reviewed `STRICT_UNGATED` table, which a word leaves when a name reading is written in its chosen file. ## Log diff --git a/docs/design/mechanisms.md b/docs/design/mechanisms.md index 1554c30e4..c2d4262b5 100644 --- a/docs/design/mechanisms.md +++ b/docs/design/mechanisms.md @@ -61,7 +61,7 @@ This catalog converts discovery into a one-time cost — it does not remove disc **Problem shape.** A rule counts "one name word", but the input holds words that another rule has already joined into one name — and the joining structure it would read has been merged away. -**Contract statement.** Three rules build multi-word units: a particle chain (P2), a conjunction join (P3), and a bound given-name pair (P5). A rule that counts name words counts those units, and takes each whole or not at all — with stated exceptions: rules/C3's count of the words before a comma, which counts particle surnames alone (decisions/C3, #575), and three cuts of a particle chain at the run and the one word it attaches to, P1's family-first fold, rules/O6's family-first cut (#1024) and rules/P10's particle phrase, which reads that much of the family's chain as a middle name only where the vocabulary marks the word (#704). +**Contract statement.** Four rules build multi-word units: a particle chain (P2), a conjunction join (P3), a bound given-name pair (P5), and a bound given name with the word that completes it past the first name word (P12). A rule that counts name words counts those units, and takes each whole or not at all — with stated exceptions: rules/C3's count of the words before a comma, which counts particle surnames alone (decisions/C3, #575), and three cuts of a particle chain at the run and the one word it attaches to, P1's family-first fold, rules/O6's family-first cut (#1024) and rules/P10's particle phrase, which reads that much of the family's chain as a middle name only where the vocabulary marks the word (#704). **How it works.** group builds each join as a piece, but its own prefix chain then merges the joined piece into a longer one, so PIECES no longer carries the boundary — the units are rebuilt from the tags the vocabulary layer left (`particle`, `conjunction`, `vocab:bound-given`). The rebuild is RECURSIVE: what a conjunction or a bound word joins is the next UNIT, not the next word, and absorbing a single token instead strands a particle severed from the words it chains. Note the two joins arrive here for opposite reasons — the conjunction join was built and then swallowed, while the bound-given join was never built at all (P5 joins only at the first non-title piece), so restoring piece boundaries in group would fix the first and silently split the second. @@ -75,7 +75,7 @@ This catalog converts discovery into a one-time cost — it does not remove disc **Contract statement.** It MARKS the token with a namespaced marker rather than removing the vocabulary tag: the tag says what the word IS, the marker says what was decided about it, and consumers ask for the pair. The cost, which has to be paid in the docs rather than avoided: where a stable tag was documented with a RECIPE — `particle` combined with Role.FAMILY "for actual family particles" — the marker makes the recipe diverge from the view it reproduced, so the recipe's documentation has to say so. -**How it works.** Stripping is tempting because every downstream consumer becomes correct for free, with no predicate to change; it pays for that by destroying the record, and asymmetrically. `particle` is the only tag all but two of the never-given particles carry, so stripping it leaves nothing on the token, while every ambiguous one still carries `vocab:particle-ambiguous` (the two exceptions, `mc` and `vd`, carry `vocab:suffix` — the same dual membership P6's S2 precedence turns on) — the half where a later fork is most interesting is the half that loses its evidence, and ParsedName has no lexicon to re-derive from. Marking also leaves a POSITIVE predicate: "this token used to have a tag" is not testable, `UNJOINED_TAG in tags` is, which is what an ambiguity emitter needs (#405). And `particle` is documented stable API meaning "a word from the particle vocabulary wherever it lands", so removing it would be a breaking change as well as a lossy one. +**How it works.** Stripping is tempting because every downstream consumer becomes correct for free, with no predicate to change; it pays for that by destroying the record, and asymmetrically. `particle` is the only tag most of the never-given particles carry, so stripping it leaves nothing on the token, while every ambiguous one still carries `vocab:particle-ambiguous` (the exceptions, listed 2026-11-16: `mc` and `vd` carry `vocab:suffix`, the same dual membership P6's S2 precedence turns on, and the patronymic particles `ibn`, `bint`, `ould` and their Arabic and Hebrew spellings carry `vocab:patronymic` at classify, published as the token's `PATRONYMIC` reading) — the half where a later fork is most interesting is the half that loses its evidence, and ParsedName has no lexicon to re-derive from. Marking also leaves a POSITIVE predicate: "this token used to have a tag" is not testable, `UNJOINED_TAG in tags` is, which is what an ambiguity emitter needs (#405). And `particle` is documented stable API meaning "a word from the particle vocabulary wherever it lands", so removing it would be a breaking change as well as a lossy one. **Lives in.** nameparser/_types.py — FOLDED_TAG (O3's fold, P6's attachment), UNJOINED_TAG (R2's standalone particle) and UNJOINED_CONJUNCTION_TAG (R3's connective with nothing in its part to join, #461), all namespaced and internal, qualifying stable tags that stay put. @@ -144,9 +144,9 @@ This catalog converts discovery into a one-time cost — it does not remove disc **Problem shape.** A fact known during tokenization matters to a much later stage. -**Contract statement.** A pre-token fact is recorded as offsets on the ParseState (comma_offsets, interpunct_offsets) and consulted later by position — or by presence alone where the fact is name-level, as both interpunct consumers do, or as a single boolean for the whole name, as `ParseState.one_case` is (#289/#516: the written-case fact three later sites read — the trailing suffix slot, the post-comma given slot, and the tail-segment reading — none of which may disagree about it) — rather than re-derived from text. +**Contract statement.** A pre-token fact is recorded as offsets on the ParseState (comma_offsets, interpunct_offsets) and consulted later by position — or by presence alone where the fact is name-level, as both interpunct consumers do, or as a single boolean for the whole name, as `ParseState.one_case` is (#289/#516: the written-case fact the sites that read it share — the trailing suffix slot, the post-comma given slot and the tail-segment reading among them — none of which may disagree about it) — rather than re-derived from text. -**How it works.** The offsets survive every intermediate stage untouched; #298's transcription marker rides this channel from tokenize to order resolution (rules T3/W4). `one_case` differs from the offset channels in WHO writes it: it is computed once by whichever of segment and classify needs it first (classify always, segment only where a comma form could turn it on), recorded as `None` for "not asked yet", and never recomputed once set (decisions/S6). +**How it works.** The offsets survive every intermediate stage untouched; #298's transcription marker rides this channel from tokenize to order resolution (rules T3/W4). `one_case` differs from the offset channels in WHO writes it: it is recorded by whichever of segment and classify needs it first (classify always, segment only where a comma form could turn it on), held as `None` for "not asked yet", and never recomputed once set; script_segment, which runs between the two, asks it where segment did not and records nothing, so classify asks it again over the same own words (decisions/S6). **Lives in.** nameparser/_pipeline/_state.py, produced in _tokenize (the offsets) or in segment/classify (`one_case`). @@ -266,7 +266,7 @@ This catalog converts discovery into a one-time cost — it does not remove disc **Contract statement.** Assert the intersection as a precondition and distinguish the two failure modes: word moved (pick another member; the message prints what is left) versus intersection empty (the code under test is unreachable — delete it rather than repointing the test). -**Lives in.** tests/v2/test_parser.py (test_the_chained_emitter_is_still_reachable). +**Lives in.** tests/v2/test_parser.py (test_the_chained_emitter_is_reachable_by_construction). **Reach for it when.** Any config-coupled fixture — a test input chosen because of what a vocabulary happens to contain. @@ -276,7 +276,7 @@ This catalog converts discovery into a one-time cost — it does not remove disc **Contract statement.** Suffix-set membership is an input to the structure decision: removing a word from the suffix vocabulary can change a suffix-comma name into a listing-form name, relocating the family. -**How it works.** Measured in the comma-suffix arc: dropping "dr" from the suffix vocabulary flips "John Smith, Dr." from family="Smith" suffix="Dr." to family="John Smith" — three individually correct documented facts composing into a family-name loss. +**How it works.** Measured in the comma-suffix arc: dropping "dr" from the suffix vocabulary flipped "John Smith, Dr." from family="Smith" suffix="Dr." to family="John Smith" — three individually correct documented facts composing into a family-name loss. `dr` has since left the suffix vocabulary; the same composition reproduces with `md` (2026-11-16): removing its credential reading turns "John Smith, MD" from family="Smith" suffix="MD" into given="MD" family="John Smith". **Lives in.** nameparser/_pipeline/_comma.py (the C1 decision, since #613) reading the suffix sets through _vocab.is_wholly_suffix. @@ -372,7 +372,7 @@ How to measure in this codebase without fooling yourself. The inert-measurement ### VOCABULARY-EXERCISES-FORKS — pin the branch, not the wordlist -**Contract statement.** A vocabulary set a caller configures is data; the code that reads it is what has behavior, so a case row earns its place by exercising a FORK — a branch the parser takes for one INPUT and not another — never by covering one more member. The unit is the input, not the member, because most forks are keyed on the shape of the surrounding name rather than on which word appeared. Find them by reading the sites that consult the set and enumerating the branches they take, and expect that enumeration to come back empty: `maiden_markers` is read at exactly two sites (`_classify.py`'s tagging and `_extract.py`'s `_maiden_marked`), both plain whole-token membership after `_normalize`, and every shipped member parses to one structural class in bare, bracketed and lone-bracketed shapes with the marker text normalised out — zero member forks. What earns the maiden rows is clause SHAPE: marker first against marker later, a word after the marker against none, a marker a separator divides from the name against one glued to it. Two adjacent things are NOT forks of this set and do not want rows: the substring-versus-token split is a question tools/differential/README.md's coverage recipe asks wider than the parser does, and edge-period normalization lives in `_lexicon._normalize`, applying to every token of every vocabulary, so it discriminates spellings rather than members. Only "a member borne as an ordinary name" is member-keyed (decisions/vocabulary-collisions), and it has its own rows. The reduction does NOT carry across to delimiter pairs, and the difference is the line to hold: a pair the library SHIPS is caller-visible behavior, and vocabulary a caller configures is data — deleting `("«", "»")` from the defaults reddens three tests, so cases.py's one-row-per-shipped-pair convention is load-bearing and this criterion is not permission to delete those rows. Within the pairs the code does fork, on whether open and close are the same character (N2) and again inside that class, where `WORD_INTERNAL_DELIMITERS` carves the apostrophe out: `Jane Smith"` reports UNBALANCED_DELIMITER and `Jane Smith'` reports nothing. ASCII against fullwidth is not one of them — swapping `( )` for `( )` across every corpus name holding a paren changes no field and no ambiguity kind. A row may also earn its place a second way, with no fork behind it: pinning a name a release note advertises BY NAME, which is a promise to a reader rather than a branch in the parser. It follows that "N of M entries have no test" is not a finding; it reads as one because it carries a number, and it inflates with every entry added, which is the tell that it measures the data. The finding is "this fork has no test". State the argument without present-tense counts over a drifting wordlist — see docs/design/AGENTS.md — and where a count is genuinely wanted, ship the one-liner instead: +**Contract statement.** A vocabulary set a caller configures is data; the code that reads it is what has behavior, so a case row earns its place by exercising a FORK — a branch the parser takes for one INPUT and not another — never by covering one more member. The unit is the input, not the member, because most forks are keyed on the shape of the surrounding name rather than on which word appeared. Find them by reading the sites that consult the set and enumerating the branches they take, and expect that enumeration to come back empty: every site that reads `maiden_markers` asks plain membership after `_normalize` of a word or of a phrase whose words stand together, all but one through `_vocab.maiden_marker_run` (longest first), the exception a hand copy, `_script_segment._only_post_nominals`, building its own key of one word or two (listed as a behavior-changing candidate by the 3.1 simplify pass, #1434), and every shipped member parses to one structural class in bare, bracketed and lone-bracketed shapes with the marker text normalised out — zero member forks. What earns the maiden rows is clause SHAPE: marker first against marker later, a word after the marker against none, a marker a separator divides from the name against one glued to it. Two adjacent things are NOT forks of this set and do not want rows: the substring-versus-token split is a question tools/differential/README.md's coverage recipe asks wider than the parser does, and edge-period normalization lives in `_lexicon._normalize`, applying to every token of every vocabulary, so it discriminates spellings rather than members. Only "a member borne as an ordinary name" is member-keyed (decisions/vocabulary-collisions), and it has its own rows. The reduction does NOT carry across to delimiter pairs, and the difference is the line to hold: a pair the library SHIPS is caller-visible behavior, and vocabulary a caller configures is data — deleting `("«", "»")` from the defaults reddens three tests, so cases.py's one-row-per-shipped-pair convention is load-bearing and this criterion is not permission to delete those rows. Within the pairs the code does fork, on whether open and close are the same character (N2) and again inside that class, where `WORD_INTERNAL_DELIMITERS` carves the apostrophe out: `Jane Smith"` reports UNBALANCED_DELIMITER and `Jane Smith'` reports nothing. ASCII against fullwidth is not one of them — swapping `( )` for `( )` across every corpus name holding a paren changes no field and no ambiguity kind. A row may also earn its place a second way, with no fork behind it: pinning a name a release note advertises BY NAME, which is a promise to a reader rather than a branch in the parser. It follows that "N of M entries have no test" is not a finding; it reads as one because it carries a number, and it inflates with every entry added, which is the tell that it measures the data. The finding is "this fork has no test". State the argument without present-tense counts over a drifting wordlist — see docs/design/AGENTS.md — and where a count is genuinely wanted, ship the one-liner instead: ``` uv run python -c " @@ -460,7 +460,7 @@ A second axis cuts across the jobs: whether the names are real or invented, labe - A review agent asked for a verdict per row may judge only the rows it singles out and let a script fill the rest with a default and a stock reason, which makes two readers' agreement a count of shared defaults rather than of judgements. In the 2026-11-13 review of the nicknames list's pairs ORCID evidences (decisions/name-matching, 2026-11-13 THE FAMILIAR FORMS FROM DATA ALONE) both readers wrote `familiar` for every row they had not listed as an exception, and said so only when asked; and #1379's second reader had scripted a whole chunk, 7 distinct reasons over its 330 rows ("short or pet form" alone on 144), which its re-read found (decisions/name-matching, 2026-11-13 AN ALTERNATE SPELLING IS ONE NAME IN ITS SOURCE). So: require a reason of the row's own in the rubric and the prompt; hand a reader small chunks (the re-read used 50 rows or fewer, its source-script sweep about 80); count each reader's distinct reasons PER CHUNK, with the pair's two names taken out of each, which catches a chunk scripted whole (7 over 330 beside 61 to 145 in the other chunks of that review) though not a few rows defaulted inside a chunk, a true reason being as repetitive as a template where most rows share a category ("pet form of X": the 2026-11-13 hand-written verdicts gave 59 and 49 over 414); and plant control rows of a known other category in every chunk, unmarked, which a default reads wrongly and a reader judging each row keeps apart (the re-read's readers kept 60 of 63, and the source-script sweep of that entry 12 of 12). Each reader's verdicts are kept in the reviewing session's scratch folder, not committed (`familiar_reviewed.tsv` keeps one reason per pair), so take the counts before that folder goes. - Release notes describe intent; TAGS are ground truth. Before trusting a changelog cross-reference about what shipped where, run `git diff -- ` — the "1.2.1 pickle shim" claim recurred twice from a changelog line describing a thing that never shipped. - Never pipe a check's output when its exit code matters. Under zsh, `snapshot.py | tail` makes `$?` tail's status. Redirect to a file and read the file. -- Mutation-test a new guard before believing it, and mutate the thing the guard watches — a survivor usually means the fixture satisfies the invariant for free. A guard over a HAND COPY of a pipeline set has two such holes, and #744's review found both in one test of tools/vocab/build.py's check 2, which copies the tokenizer's sets because the tool cannot import the package it writes. Pinning a copy to its source sees only the classes someone copied: the first test pinned `DIVIDERS` alone, and emoji, which the tokenizer strips under `Policy.strip_emoji`, had no copy and no check, so `dr★` compiled and the test passed. Its replacement swept every codepoint `_tokenize._ignorable` drops but accepted any refusal short of a TOML error, so the space in `dr x` passed because the phrase-title check refused it, and a class check 2 never learned would pass too wherever a later check happened to refuse its test text. Drive the sweep from the pipeline's own predicate, match the refusal by the checked rule's own messages, and record the control (hiding the emoji check behind its pinned constant fails the sweep: `test_every_character_the_tokenizer_ignores_is_refused` in tests/v2/test_vocab.py, which now leaves the space out, a phrase's word separator). The predicate reaches only what it decides, though: the interpunct between East Asian characters (rules/T3) is divided by context in `_tokenize_region`, never by `_ignorable`, so hiding that check passes the sweep (measured in #746's review, 2026-10-19). What holds it is its `MUTATIONS` row (`text-with-an-east-asian-interpunct`, input `先·生`); the `EAST_ASIAN_RANGES` and `INTERPUNCT` pins hold only the copies, and stay green with the check gone. Name such a class where the guard stands, and the test that holds it, rather than let the sweep imply it. +- Mutation-test a new guard before believing it, and mutate the thing the guard watches — a survivor usually means the fixture satisfies the invariant for free. A guard over a HAND COPY of a pipeline set has two such holes, and #744's review found both in one test of tools/vocab/build.py's check 2, which copies the tokenizer's sets because the tool cannot import the package it writes. Pinning a copy to its source sees only the classes someone copied: the first test pinned `DIVIDERS` alone, and emoji, which the tokenizer strips under `Policy.strip_emoji`, had no copy and no check, so `dr★` compiled and the test passed. Its replacement swept every codepoint `_tokenize._ignorable` drops but accepted any refusal short of a TOML error, so the space in `dr x` passed because the phrase-title check refused it, and a class check 2 never learned would pass too wherever a later check happened to refuse its test text. Drive the sweep from the pipeline's own predicate, match the refusal by the checked rule's own messages, and record the control (hiding the emoji check behind its pinned constant fails the sweep: `test_every_character_the_tokenizer_ignores_is_refused` in tests/v2/test_vocab.py, which now leaves the space out, a phrase's word separator). The predicate reaches only what it decides, though: the interpunct between East Asian characters (rules/T3) is divided by context in `_tokenize_region`, never by `_ignorable`, so hiding that check passes the sweep (measured in #746's review, 2026-10-19). What holds it is its `MUTATIONS` row (`text-with-an-east-asian-interpunct`, input `先·生`); the `EAST_ASIAN_RANGES` and `TRANSCRIPTION_DOTS` pins hold only the copies, and stay green with the check gone. Name such a class where the guard stands, and the test that holds it, rather than let the sweep imply it. - Before deleting a pin, mutate each pattern it pins and run the suite: a pin can be a pattern's only tripwire. #1008 deleted `nameparser.config.regexes`, which `tests/v2/test_regex_sync.py` held the pipeline's copies to, and dropping U+1AB0-1AFF from `_vocab._MARKS`, or narrowing `_render._SPACES` or `_SPACE_BEFORE_COMMA` to a literal space, then failed nothing, until behavior tests in tests/v2/test_parser.py and tests/v2/test_render.py took each over. - A claim about what a vocabulary entry DOES is a claim about the parse WITHOUT it, so take that parse (`Parser(lexicon=Lexicon.default().remove(w, kind=...))`) and compare: the parse with the entry present shows only that the output is consistent with it. #773's first note on `wm` said that removing it would move `Wm. Smith`, read off the parse with the word listed; with the word removed, `Wm. Smith` read exactly as before, rules/H2's leading-abbreviation title then claiming `Wm.` either way. The corrected note then said only the bare `Wm Smith` moves, and that was wrong too (#789, 2026-10-24): it took the off-switch parse at the head of the name only, and a trailing `Wm.` (rules/H5) and a `Wm.` before a family comma (rules/H6), which read vocabulary rather than shape, moved as well. A shape rule shadows an entry only in the spelling and the slot it reads, so take the off-switch parse for each spelling, bare and period-marked, in each position a rule reads the word in. - Verify the restore, not just the mutation: diff against the pre-mutation copy; do not trust the harness's own restore report. @@ -470,7 +470,7 @@ A second axis cuts across the jobs: whether the names are real or invented, labe - A check that is quiet about a name is not evidence that the baseline read it the same. #603's first draft wrote that 1.4.0 read a title past the second comma as a title because no 1.4.0 name moved unexplained, when the 1.4.0 ledger's broad `fix(comma-family)` rule was claiming each one; the released wheel read suffix 'Jr., Attorney General'. Ask the wheel (`PYTHONSAFEPATH=1 uv run --isolated --no-project --with nameparser==X`, from outside the worktree, or `tools/differential/compare.py --baseline X`) before writing what a release did. - A skip is indistinguishable from "correctly declined": pytest turns an empty parametrize into a skip, and a filter that widens its own skip set cannot fail. After changing any selection shape, verify the guard still REACHES the code it watches — assert the selected set is non-empty, or force-a-decision on its size. - A differential corpus cannot evidence behavior keyed to OUT-of-vocabulary shapes: it holds only names someone wrote down, and an unrecognized word is by definition outside the vocabulary — a green run over the corpus proves nothing about such a rule. -- The corpus can be near-blind to a WRITING CONVENTION even where the vocabulary is well covered, and a small honest count then reads as a small blast radius. Measured for rules/P6: of 782 corpus names, 245 carry a comma, TWO of those end in a particle, and ONE of the two clears the words-to-spare guard and actually moves — so the Dutch trailing-tussenvoegsel listing the rule exists for is essentially unsampled. Before reporting "N names move", report the size of the population that COULD move; when that is ~1, the number is evidence about the corpus. This note's first wording said "exactly ONE ends in a particle", conflating the population with the movers — the very error it exists to prevent, committed inside the correction. Caught by re-running the count against AGENTS.md's axis 1 rather than by re-reading it. A decision taken from invented shapes is blind the same way to where filers put a word: #602 read a generation word after two name words as starting the post-nominals with no count of where one is written, and from 2.4.0 the fielded local corpora's middle-name boxes held hundreds of `Junior` and `Jr` with the surname behind them, read as suffix (decisions/S8's 2026-11-02 entry). Before deciding what a word means where it stands, count which box filers typed it into. +- The corpus can be near-blind to a WRITING CONVENTION even where the vocabulary is well covered, and a small honest count then reads as a small blast radius. Measured for rules/P6 on 2026-08-16 (decisions/P6's order-precedence keystone entry): of 782 corpus names then, 245 carried a comma, TWO of those ended in a particle, and ONE of the two clears the words-to-spare guard and actually moves — so the Dutch trailing-tussenvoegsel listing the rule exists for is essentially unsampled. Before reporting "N names move", report the size of the population that COULD move; when that is ~1, the number is evidence about the corpus. This note's first wording said "exactly ONE ends in a particle", conflating the population with the movers — the very error it exists to prevent, committed inside the correction. Caught by re-running the count against AGENTS.md's axis 1 rather than by re-reading it. A decision taken from invented shapes is blind the same way to where filers put a word: #602 read a generation word after two name words as starting the post-nominals with no count of where one is written, and from 2.4.0 the fielded local corpora's middle-name boxes held hundreds of `Junior` and `Jr` with the surname behind them, read as suffix (decisions/S8's 2026-11-02 entry). Before deciding what a word means where it stands, count which box filers typed it into. - An invariant judged on the part a JOIN PRODUCED is satisfied by whatever the join absorbed. #397's both-sides condition was stated as "a name word stands on each side of the link", and the invariant written from that sentence walks the joined part and asks whether a non-connective word stands on each side of the letter — which a swallowed credential answers yes to, being that word. `Josep Lluis Carod i III` read family 'Carod i III' and PASSED it. The merge has already destroyed the evidence, so the question cannot be re-asked downstream at all. Judge on the PRE-join classes, or against a second parse with the rule turned off — the off-switch parse puts the credential in `suffix`, and "no word the off-switch reading calls a suffix lands inside a joined name part" caught it on 639 parses of the shipped grid where the first invariant caught none (960 over the full cross product, a dated snapshot before the grid was trimmed by shape). The same pairing is worth reaching for whenever a rule MERGES tokens. - A detector that re-implements a rule's grouping will get the grouping wrong. Derive the boundary from the same vocabulary the rule reads, not from the half you happen to be thinking about: walking a particle run over the NEVER-GIVEN set alone (the rule chains through ANY particle) split "de la Vega" after "de la" and reported 50 false movers for #364, where the true count is one. Both wrong answers were plausible and printed cleanly. - Guard the whole family, parametrize over it: a defect on one of N parallel entry points hides behind a per-example test — three times in one session (a guard on one class of two, a decode hint on 3 of 5 entry points, a sync roster missing 4 copies) — and a {class}×{field}×{bad-value} parametrization is what caught each. diff --git a/docs/design/rules/M2-maiden-marker-rule.md b/docs/design/rules/M2-maiden-marker-rule.md index bbcd020ea..91f092e18 100644 --- a/docs/design/rules/M2-maiden-marker-rule.md +++ b/docs/design/rules/M2-maiden-marker-rule.md @@ -107,7 +107,7 @@ **Accepted:** -- The fullwidth-colon spelling arrives as one word, so the marker inside it goes unrecognized; #317 tracks whether it should peel. +- The fullwidth-colon spelling arrives as one word, so the marker inside it goes unrecognized; #1359 tracks whether it should peel. ``` "山田 花子 旧姓:佐藤" → maiden="" ``` diff --git a/docs/design/rules/P8-single-letter-connective-against-the-initial-it-spells.md b/docs/design/rules/P8-single-letter-connective-against-the-initial-it-spells.md index 90a6a0261..789631a12 100644 --- a/docs/design/rules/P8-single-letter-connective-against-the-initial-it-spells.md +++ b/docs/design/rules/P8-single-letter-connective-against-the-initial-it-spells.md @@ -39,7 +39,7 @@ **Accepted:** - Two 1.4.0 parity breaks, one in each direction. A bare capital in a name written wholly in upper case no longer reads as an initial, so "JUAN GARCIA Y LOPEZ" joins where 1.4.0 and 2.0–2.3 read middle "GARCIA Y"; and a marked lowercase letter in a name written wholly in lower case no longer joins, so "jose e maria santos" reads middle "e maria" where they read given "jose e maria". That is #383 answered with "bless" for the mixed-case half — a bare Latin capital among mixed case still reads as an initial, the shape the veto always tested, which is why #267's Cyrillic reading is untouched — and answered with evidence for the one-case half, where the vocabulary decides. -- A maiden marker's run and every word after it are outside the name's own words from the moment classify tags the marker, and they stay outside whether or not the marker pass later declines the marker and leaves it a word (M2). A declined marker therefore does two things at once. It still does not count toward the case class, which shows when it is the only differently-cased token, so "JUAN Y GARCIA née" joins where "JUAN Y GARCIA née Jones" keeps "Y" a name word. And it leaves any connective standing after it to T4 rather than to the one-case fork, so a letter there reads as the initial its capital is, in both spellings, where the fork would have joined it: both "DR. NÉE JUAN Y LOPEZ" and "dr. née juan y lopez" read middle "JUAN Y" with the letter an initial. A clause's words are read by T4 the same way, so such a letter takes the same tag in the two spellings. Accepted rather than repaired: classify cannot know what group will decline, and a clause's words are read by the clause's own rules. +- A maiden marker's run and every word after it are outside the name's own words from the moment classify tags the marker, and they stay outside whether or not the marker pass later declines the marker and leaves it a word (M2). A declined marker therefore does two things at once. It still does not count toward the case class, which shows when it is the only differently-cased token, so "JUAN Y GARCIA née" joins where "JUAN Y GARCIA née Jones" keeps "Y" a name word. And it leaves any connective standing after it to T4 rather than to the one-case fork, so a letter there reads as the initial its capital is, in both spellings, where the fork would have joined it: "DR. NÉE JUAN Y LOPEZ" and "dr. née juan y lopez" read middle "JUAN Y" and "juan y", the letter an initial in both. A clause's words are read by T4 the same way, so such a letter takes the same tag in the two spellings. Accepted rather than repaired: classify cannot know what group will decline, and a clause's words are read by the clause's own rules. --- **Signal:** case contrast: a single-letter connective's case against the name's own words diff --git a/docs/design/rules/R9-patronymic-view.md b/docs/design/rules/R9-patronymic-view.md index 072f95135..58e7f1a6d 100644 --- a/docs/design/rules/R9-patronymic-view.md +++ b/docs/design/rules/R9-patronymic-view.md @@ -72,7 +72,7 @@ **Accepted:** -- A patronymic written with no particle and no rule to read it is not read, since a position says nothing about a parent: Wikidata's Malay names with a patronymic and no family name agree 4 of 9, those written without `bin` read as given and family. +- A patronymic written with no particle and no rule to read it is not read, since a position says nothing about a parent: Wikidata's Malay names with a patronymic and no family name agree 4 of 9 (measured 2026-10-29, #948), those written without `bin` read as given and family. - The particle's kind is the word's, not the name's, by one test: it is a patronymic where, among the bearers measured, the phrase it opens names the bearer's own father more often than it is a family name passed down unchanged, and a clan particle otherwise; the test binds a word a change adds or reopens, and `bar`, `bin`, `binti`, `ibn` and `בת` stand as they are, not re-judged. So a patronymic fills the view where it opens a fixed family name, and a clan particle fills none where a name uses it for the father: `ben` and Hebrew `בן` are clan particles, their family names outnumbering their fathers' names (the Knesset list's `בן` 15 of 15), so an Arab name transcribed in Hebrew script and a Tunisian register's chain leave the view empty; Hassaniya `ould`, which the test reads as a clan particle, is a patronymic by a choice made for the Mauritanian use, so it fills the view in an Algerian surname too (decisions/vocabulary-collisions, 2026-11-12 #1257). ``` "Karim Ould Haddou" → patronymic="Ould Haddou" diff --git a/docs/design/rules/S2-suffix-word-ends-a-name-and-never-opens-the-string.md b/docs/design/rules/S2-suffix-word-ends-a-name-and-never-opens-the-string.md index b5c0b2830..a65cc04dc 100644 --- a/docs/design/rules/S2-suffix-word-ends-a-name-and-never-opens-the-string.md +++ b/docs/design/rules/S2-suffix-word-ends-a-name-and-never-opens-the-string.md @@ -36,13 +36,14 @@ **Precedence:** -- **A suffix-shaped word opening the string** ("Ph. D. Van Johnson"): position outranks the vocabulary match, so a suffix-shaped word written before anything else reads as whatever its position and shape make it — a title where it wears the abbreviation shape (H2), an ordinary name word otherwise — and never as a credential belonging to a name that has not been written yet. The string, not the name: a title, a nickname or a bracketed clause standing first leaves the credential reading intact, which is the ONE place this document says "opening" and does not mean what P4 and the H Background mean by it. +- **A suffix-shaped word opening the string** ("Ph. D. Van Johnson"): position outranks the vocabulary match, so a suffix-shaped word written before anything else reads as whatever its position and shape make it — a title where it wears the abbreviation shape (H2), an ordinary name word otherwise — and never as a credential belonging to a name that has not been written yet. The string, not the name: a title, a nickname or a bracketed clause standing first leaves the spaced `Ph. D.` pair's credential reading intact, which is the ONE place this document says "opening" and does not mean what P4 and the H Background mean by it; a suffix word written as one word there is read by its position, so `Sir PhD Van Johnson` reads given `PhD`. ``` "Ph. D. Van Johnson" → family="Van Johnson" "Ph. D. Van Johnson" → title="Ph." "II Van Johnson" → given="II" · boundary "Stariji Bruegel" → given="Stariji" · boundary "Sir Ph. D. Van Johnson" → suffix="Ph. D." · boundary + "Sir PhD Van Johnson" → given="PhD" · boundary ``` - **A family comma** ("Smith, Ph. D. Jr.", "Ph. D., John"): a family comma is the other boundary: the comma has already named the family, so a credential run may open the part after it (C13), and the part before it is that family, less a title run opening it (H6). ``` @@ -57,7 +58,7 @@ **Accepted:** -- A title before the credential keeps it a credential, and behind a title run that addresses by the given name (H1) the name loses its surname exactly as it did before the clause that a suffix never opens the string — `Sir Ph. D. Van Johnson` reads given `Van Johnson` with an empty family. That is 1.4.0's reading, and that clause cannot reach it: the first piece of the NAME is not computable before this decision, since the abbreviation test H2 uses is true of `Ph.` itself, so a scan that stepped over titles would step over the very piece being judged. +- A title before the spaced `Ph. D.` pair keeps it a credential, and behind a title run that addresses by the given name (H1) the name loses its surname exactly as it did before the clause that a suffix never opens the string — `Sir Ph. D. Van Johnson` reads given `Van Johnson` with an empty family. That is 1.4.0's reading, and that clause cannot reach it: the first piece of the NAME is not computable before this decision, since the abbreviation test H2 uses is true of `Ph.` itself, so a scan that stepped over titles would step over the very piece being judged. - An unambiguous suffix is consumed even when that leaves no family name at all. ``` "Smith Jr." → family="" diff --git a/tools/differential/corpus_rules.jsonl b/tools/differential/corpus_rules.jsonl index 36feb3b20..d51fb89df 100644 --- a/tools/differential/corpus_rules.jsonl +++ b/tools/differential/corpus_rules.jsonl @@ -1532,6 +1532,7 @@ "Sir John" "Sir John Prof." "Sir Ph. D. Van Johnson" +"Sir PhD Van Johnson" "Sir Smith, John" "Sir abdul Jr Smith" "Sir abdul salam" diff --git a/tools/differential/snapshot.jsonl b/tools/differential/snapshot.jsonl index f7d028ef6..a5404092e 100644 --- a/tools/differential/snapshot.jsonl +++ b/tools/differential/snapshot.jsonl @@ -3962,6 +3962,7 @@ {"name": "Sir John", "title": "Sir", "given": "John", "initials": "J."} {"name": "Sir John Prof.", "title": "Sir Prof.", "given": "John", "initials": "J."} {"name": "Sir Ph. D. Van Johnson", "title": "Sir", "given": "Van Johnson", "suffix": "Ph. D.", "initials": "V. J."} +{"name": "Sir PhD Van Johnson", "title": "Sir", "given": "PhD", "family": "Van Johnson", "initials": "P. J.", "capitalized_force": "Sir PhD van Johnson"} {"name": "Sir Smith, John", "title": "Sir", "given": "John", "family": "Smith", "initials": "J. S."} {"name": "Sir Van Johnson", "title": "Sir", "given": "Van", "family": "Johnson", "ambiguities": ["PARTICLE_OR_GIVEN"], "alternatives": ["PARTICLE_OR_GIVEN: particle as family (vocabulary)"], "initials": "V. J."} {"name": "Sir abdul Jr Smith", "title": "Sir", "given": "abdul", "middle": "Jr", "family": "Smith", "initials": "a. J. S.", "capitalized_force": "Sir Abdul Jr Smith"}