diff --git a/AGENTS.md b/AGENTS.md index 46af78205..a95c4173a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -385,7 +385,7 @@ Don't use the bare `python3 -m doctest .rst` CLI (no `optionflags`) to che **`pr/NNN` local branches** track upstream PRs — don't commit to them by accident. Check `git branch --show-current` before starting work. -**Title vs suffix is positional for BARE words, and the leading period-abbreviation rule overrides even that** — a word matching `TITLES` at the front of a name becomes `title`; the same word matching `SUFFIX_ACRONYMS`/`SUFFIX_WORDS` at the end becomes `suffix` (never both, regardless of the word's real-world meaning). The `TITLES`/suffix overlap was audited in #296 (2026-08-23): the pure postnominals (`jr`, `junior`, `phd`, `do`, `se`) left `TITLES`, the v1-residue `dr`/`sra` left the suffix sets, and the eleven words in both on 2026-11-21 (`ms`, `sr`, `lt`, `ra`, `vc`, the ranks `cpl`, `cpo`, `cpt`, `csm`, `sgm`, and since #1128 the Cyrillic `д-р`; `md` and `sa` were duals too until #853 took `md`'s title reading out, a leading `Md` being the given name Muhammad, and #857 took `sa` out of the vocabulary) are deliberate duals that position decides (recount with `L = Parser().lexicon._sets; sorted(L.titles & (L.suffix_acronyms | L.suffix_words))`). External test sources (old issue gists, etc.) sometimes assert `suffix` for a leading professional abbreviation like `RA`/`PD`/`Dipl.-Ing.` — that's the source data being wrong, not a parser bug. Verify position before "fixing" it. Two qualifications the older "purely positional" wording papered over, the first measured 2026-08-01 and the second answered 2026-09-08 (#316): a PERIOD-marked leading word is claimed by the shape rule before any vocabulary is read (`"Esq. Smith"` → `title`, though `esq` is suffix-only), save a listed title and, since #789, a given name written short (`"Chas. Smith"` → `given`), while a run of single letters, which the shape rule never takes, is a title at the head only by rules/H10's vocabulary (`"U.S. Senator John Smith"` → `title='U.S. Senator'`), and a PERIOD-marked trailing word is claimed by VOCABULARY — first the suffix sets, which the peel reads before anything else (`"John Smith Esq."` → `suffix`), then the titles (`"John Smith Prof."` → `title='Prof.'`, `rules/H5`) — while an unlisted abbreviation there stays a name part (`"John Smith Xyz."` → `family='Xyz.'`) unless it is written as two or more period-separated chunks, which since 2.4 IS a trailing shape rule (`Policy.unlisted_dotted_suffixes`, default on: `"John Smith X.Y.Z."` → `suffix='X.Y.Z.'`, read by the same words-to-spare count a bare ambiguous acronym takes, `rules/S3`), except paired initials in a script with capitals, which stay a name word (`"Ram Bahadur B.K."` → `family='B.K.'`, #864). The SINGLE trailing period is still not one, deliberately — it is the abbreviation shape any word can wear. The bare word is where "positional" still holds whole -- outside a part past the second comma, which holds no name word, so C2 reads a bare title word there as a title since #603 (`Eric H. Holder, Jr., Attorney General`), and outside a listed salutation ending the given part after a family comma, which rules/H8 reads as the title since #835 (`Doe, Jane Mrs`), the comma having marked the surname's place -- and the reason it must: `TITLES` holds words that are in no suffix set — 787 of them on 2026-10-11 (746 before #606's salutations), measured with `L = Parser().lexicon._sets; len(L.titles - L.suffix_acronyms - L.suffix_words)`, a figure that grows with the vocabulary and never shrinks the argument — and many are ordinary surnames (`pope`, `bishop`, `judge`, `sheriff`, `baron`, `master`, ...), so a vocabulary-first rule over BARE trailing words would read `"Mary Jane Pope"` as `title='Pope'`, `family='Jane'`. The period is what separates the safe case from that one, and it separates it by being a WRITING convention rather than by making the collision go away: `"Mary Jane Pope"` keeps `family='Pope'` while `"Mary Jane Pope."` reads `title='Pope.'`, `family='Jane'`, a cost accepted under the input-is-a-name premise rather than one the rule prevents (the trailing-position bullet in decisions/vocabulary-exclusions, measured 2026-09-09). Since #316 that sentence describes the shipped rule rather than an aspiration. +**Title vs suffix is positional for BARE words, and the leading period-abbreviation rule overrides even that** — a word matching `TITLES` at the front of a name becomes `title`; the same word matching `SUFFIX_ACRONYMS`/`SUFFIX_WORDS` at the end becomes `suffix` (never both, regardless of the word's real-world meaning). The `TITLES`/suffix overlap was audited in #296 (2026-08-23): the pure postnominals (`jr`, `junior`, `phd`, `do`, `se`) left `TITLES`, the v1-residue `dr`/`sra` left the suffix sets, and the ten words in both on 2026-11-21 (`ms`, `sr`, `lt`, `vc`, the ranks `cpl`, `cpo`, `cpt`, `csm`, `sgm`, and since #1128 the Cyrillic `д-р`; `md`, `sa` and `ra` were duals too until #853 took `md`'s title reading out, a leading `Md` being the given name Muhammad, #857 took `sa` out of the vocabulary, and #1483 gave `ra` a Korean name reading, which makes its title one only inside a title phrase, rules/H9) are deliberate duals that position decides (recount with `L = Parser().lexicon._sets; sorted(L.titles & (L.suffix_acronyms | L.suffix_words))`). External test sources (old issue gists, etc.) sometimes assert `suffix` for a leading professional abbreviation like `PD`/`Dipl.-Ing.` — that's the source data being wrong, not a parser bug. Verify position before "fixing" it. Two qualifications the older "purely positional" wording papered over, the first measured 2026-08-01 and the second answered 2026-09-08 (#316): a PERIOD-marked leading word is claimed by the shape rule before any vocabulary is read (`"Esq. Smith"` → `title`, though `esq` is suffix-only), save a listed title and, since #789, a given name written short (`"Chas. Smith"` → `given`), while a run of single letters, which the shape rule never takes, is a title at the head only by rules/H10's vocabulary (`"U.S. Senator John Smith"` → `title='U.S. Senator'`), and a PERIOD-marked trailing word is claimed by VOCABULARY — first the suffix sets, which the peel reads before anything else (`"John Smith Esq."` → `suffix`), then the titles (`"John Smith Prof."` → `title='Prof.'`, `rules/H5`) — while an unlisted abbreviation there stays a name part (`"John Smith Xyz."` → `family='Xyz.'`) unless it is written as two or more period-separated chunks, which since 2.4 IS a trailing shape rule (`Policy.unlisted_dotted_suffixes`, default on: `"John Smith X.Y.Z."` → `suffix='X.Y.Z.'`, read by the same words-to-spare count a bare ambiguous acronym takes, `rules/S3`), except paired initials in a script with capitals, which stay a name word (`"Ram Bahadur B.K."` → `family='B.K.'`, #864). The SINGLE trailing period is still not one, deliberately — it is the abbreviation shape any word can wear. The bare word is where "positional" still holds whole -- outside a part past the second comma, which holds no name word, so C2 reads a bare title word there as a title since #603 (`Eric H. Holder, Jr., Attorney General`), and outside a listed salutation ending the given part after a family comma, which rules/H8 reads as the title since #835 (`Doe, Jane Mrs`), the comma having marked the surname's place -- and the reason it must: `TITLES` holds words that are in no suffix set — 787 of them on 2026-10-11 (746 before #606's salutations), measured with `L = Parser().lexicon._sets; len(L.titles - L.suffix_acronyms - L.suffix_words)`, a figure that grows with the vocabulary and never shrinks the argument — and many are ordinary surnames (`pope`, `bishop`, `judge`, `sheriff`, `baron`, `master`, ...), so a vocabulary-first rule over BARE trailing words would read `"Mary Jane Pope"` as `title='Pope'`, `family='Jane'`. The period is what separates the safe case from that one, and it separates it by being a WRITING convention rather than by making the collision go away: `"Mary Jane Pope"` keeps `family='Pope'` while `"Mary Jane Pope."` reads `title='Pope.'`, `family='Jane'`, a cost accepted under the input-is-a-name premise rather than one the rule prevents (the trailing-position bullet in decisions/vocabulary-exclusions, measured 2026-09-09). Since #316 that sentence describes the shipped rule rather than an aspiration. ### Tests (`tests/`) diff --git a/docs/design/decisions/C9-one-character-suffix-word-inside-a-comma-part.md b/docs/design/decisions/C9-one-character-suffix-word-inside-a-comma-part.md index 38361f39e..afd122509 100644 --- a/docs/design/decisions/C9-one-character-suffix-word-inside-a-comma-part.md +++ b/docs/design/decisions/C9-one-character-suffix-word-inside-a-comma-part.md @@ -3,7 +3,7 @@ ## Standing - Inside a comma part a one-character suffix word is read by what stands before it: behind another suffix word it continues the run, with a period or without (`Smith, PSM I` → suffix 'PSM I'; `Smith, PSM I.` → suffix 'PSM I.'), and behind a name word an ASCII period makes it a middle initial while the bare letter, with no further comma after it, is the suffix (`Smith, John V.` → middle 'V.'; `Smith, John V` → suffix 'V', v1 parity) — 2026-08-25 #430. -- The class is one-character suffix vocabulary, not a roman numeral (`Smith, John 2.` → middle '2.'), and a run's first word that is title vocabulary too stays in the run (`Smith, RA I` → suffix 'RA I'; `Smith, Jr. I` → suffix 'Jr. I') — 2026-08-25 #430. +- The class is one-character suffix vocabulary, not a roman numeral (`Smith, John 2.` → middle '2.'), and a run's first word that is title vocabulary too stays in the run (`Smith, VC I` → suffix 'VC I'; `Smith, Jr. I` → suffix 'Jr. I') — 2026-08-25 #430. - The given part asks no initial in front of a numeral, the no-comma reading of one, so a numeral behind an initial stays the suffix (`Chang, Andy C I` → middle 'C', suffix 'I') — 2026-08-25 #430. - A lone letter ending the given part ahead of a further comma is the middle initial whatever stands before it, a credential run in front stopping short of it (`Smith, John PhD I, Jr.` → middle 'I', suffix 'PhD, Jr.'), at the cost of splitting a certification level from its credential (`Smith, John PSM I, Jr.`) — 2026-10-25 #819. - The given part's walk asks the numeral's predicate, which reads a one-letter numeral there by the vocabulary, so an unlisted letter stays the middle initial (`SMITH, JOHN X`), and a numeral of two or more letters as the generation (`Smith, John VI` → suffix 'VI') — 2026-10-25 #819. diff --git a/docs/design/decisions/H3-title-runs-floor.md b/docs/design/decisions/H3-title-runs-floor.md index ed6adce8e..5f9c35f7c 100644 --- a/docs/design/decisions/H3-title-runs-floor.md +++ b/docs/design/decisions/H3-title-runs-floor.md @@ -4,7 +4,7 @@ - The leading title run gives back its last word where everything behind the run is suffix pieces and that word is not suffix vocabulary: `Dr Pope Jr` → title 'Dr', family 'Pope', suffix 'Jr' — 2026-09-08 #316. - It gives back one word only: a joined title unit stays the title (`Prince of Wales Jr` → family 'Jr'), and where the word given back is the whole name it reads as the given name (`Dr Jr` → given 'Dr', suffix 'Jr', reporting `title-or-name`) — 2026-09-08 #316. -- The floor asks about the run's last word and nothing else: a run ending in suffix vocabulary keeps it (`Dr Pope RA PhD` → title 'Dr Pope RA'), and a bare numeral behind the run is the numeral fork's, not this floor's (`Dr Pope V` → title 'Dr Pope', given 'V') — 2026-09-08 #316. +- The floor asks about the run's last word and nothing else: a run ending in suffix vocabulary keeps it (`Dr Pope VC PhD` → title 'Dr Pope VC'), and a bare numeral behind the run is the numeral fork's, not this floor's (`Dr Pope V` → title 'Dr Pope', given 'V') — 2026-09-08 #316. Open: none in this file. 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 3bec9c492..b20bc2586 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 @@ -5,7 +5,7 @@ - An input the title peel eats down to one last word that is itself title vocabulary reads that word as the name and reports `title-or-name`, the `detail` naming the word: `Lord Chancellor` → family 'Chancellor', `Dr. Pope` reports — 2026-09-07 #491. - `title-or-name` is emitted at assign's lone-name-word site, not at H1's retag, so it is reported under every name order, and so is the suffix half's `suffix-or-name`; the peel half's `detail` names no field — 2026-09-07 #491. - Nothing is reported where no word was chosen or where the word left standing is no title word: a title alone or a title run with nothing behind it (`Dr.`, `Prince of Wales`), and a title before an ordinary word (`Dr. Smith`) — 2026-09-07 #491. -- An input whose every word is post-nominal vocabulary reads its first word as the name and reports `suffix-or-name` (`Rinpoche`, `QC MP` → given 'QC', `PhD`), reached only where no title was peeled (`RA DDS` reports nothing) and not with a maiden name beside it (`abd née Jones`) or for a lone CJK honorific a script order placed (`さん`); `Jr.` alone is H2's title — 2026-09-07 #491. +- An input whose every word is post-nominal vocabulary reads its first word as the name and reports `suffix-or-name` (`Rinpoche`, `QC MP` → given 'QC', `PhD`), reached only where no title was peeled (`VC DDS` reports nothing) and not with a maiden name beside it (`abd née Jones`) or for a lone CJK honorific a script order placed (`さん`); `Jr.` alone is H2's title — 2026-09-07 #491. - `MA` alone reports `given-or-family` where `PhD` alone reports `suffix-or-name`, an asymmetry between this rule and O5 recorded and not fixed — 2026-09-07 #491. - 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. diff --git a/docs/design/decisions/H6-title-before-a-family-comma.md b/docs/design/decisions/H6-title-before-a-family-comma.md index a09310a17..3b07f456b 100644 --- a/docs/design/decisions/H6-title-before-a-family-comma.md +++ b/docs/design/decisions/H6-title-before-a-family-comma.md @@ -4,7 +4,7 @@ - A run of title words opening the part before a family comma is the title, joining the title field in input order with any title after the comma, and the comma decision is untouched, so the reading is the same under every name order: `Dr. Smith, John` → title 'Dr.', family 'Smith'; `Prof. Dr. Brühl, Ada Cornelia` → title 'Prof. Dr.' — 2026-10-17 #701. - The run admits a word by vocabulary only, never by H2's shape, since the slot is a surname's slot too and a period-marked word there is as often a surname's abbreviated head, a given name written short or a stray period as a title: `Xyz. Smith, John` → family 'Xyz. Smith', `Mt. Pleasant, Jane` → family 'Mt. Pleasant'. `Sta. Maria, Juan` → family 'Sta. Maria' is the particle stop's since #725, which a shape peel would have to keep. A title missing there is fixed by listing it, a given name written short by a `given` reading with `same_as`, and a stray period reads where the rules put it — 2026-10-17 #701; 2026-10-18 #710; 2026-11-06 #1115. -- The run leaves the family its last piece (`Dr., John` → family 'Dr.'), stops at a word that is a particle too (`St Pierre, Ed` and `Freiherr von Berg, Ed` keep their families, while `Dr. Freiherr von Berg, Ed` peels 'Dr.'), and stops where nothing but post-nominals stands behind a title (`RA PhD Jr., John` → family 'RA'), so a title/suffix dual with a name word behind it peels (`Rev. Sr. Smith, Mary` → title 'Rev. Sr.') — 2026-10-17 #701. +- The run leaves the family its last piece (`Dr., John` → family 'Dr.'), stops at a word that is a particle too (`St Pierre, Ed` and `Freiherr von Berg, Ed` keep their families, while `Dr. Freiherr von Berg, Ed` peels 'Dr.'), and stops where nothing but post-nominals stands behind a title (`VC PhD Jr., John` → family 'VC'), so a title/suffix dual with a name word behind it peels (`Rev. Sr. Smith, Mary` → title 'Rev. Sr.') — 2026-10-17 #701. - A surname-like title opening a two-word surname is the title (`Pope Smith, John` → title 'Pope'), an accepted cost — 2026-10-17 #701. - `gov` is a title (`Lt. Gov. Smith, John` → title 'Lt. Gov.'), the first piece the run leaves is the family whatever it is (`Dr. PhD Smith, John` → family 'PhD Smith'), and the particle stop is all that keeps a rank in the family, so `Herzog Lambsdorff, Otto` reads title 'Herzog' (`Graf Lambsdorff, Otto`, a rank particle since decisions/vocabulary-collisions' 2026-11-04 (Derek), #709 entry, keeps family 'Graf Lambsdorff') — 2026-10-17 #701. - The comma-less writing of an abbreviated surname is not this rule's; `sta` and `sto` are saint particles, so `Juan Sta. Maria` reads family 'Sta. Maria' and `Juan Sta. Maria Reyes` family 'Sta. Maria Reyes' — 2026-10-18 #710; 2026-11-04 #725. 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 9b53b60b6..5825bf7c7 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 @@ -117,7 +117,7 @@ Accepted costs, deferred to the rescoped #459 rather than relitigated here: the - 2026-10-22 #826 — CASE IS A COMPARED SURFACE: the snapshot records `capitalized()` and `capitalized(force=True)` for every corpus name, reversing 2026-08-29, WHY CASE IS NOT A COMPARED SURFACE on the test that entry's 2026-09-02 amendment set, a case change that escapes as #408's initials did. Two have. #478 shipped `jose ortega-y-gasset` repaired to `Ortega-Y-Gasset` in 2.2.0 and 2.3.0 (the all-caps spelling had read that way since 2.0.0), and #808 repaired `PA-C` to `Pa-C` and `FNP-BC` to `Fnp-Bc` from 2.0.0 through 2.5.0, each with every check green. The 2026-08-29 entry's other objection, a column arriving pre-failed by 139 entries against 1.4.0, was about the differential ledger. The snapshot (#664) records the tree's own reading and reports only what a change moves, so the column started empty. BOTH VIEWS, because they see different things: only the plain view sees rules/R5's gate, and the one-case names where #478 and #808 showed are its population; the forced view runs the repair over the mixed-case majority, which the gate otherwise hides. Over the 6006 entries on this date, 238 record a `capitalized` view and 695 a `capitalized_force` view. EACH VIEW IS RECORDED ONLY WHERE IT MOVES SOMETHING: `capitalized` where it renders other than `str()` of the parse, `capitalized_force` where it renders other than `capitalized()` does. A name repair leaves alone records neither, so a role move echoes into a case view only in a name repair changes, and there whenever it changes the rendering, since a view is the whole repaired name (`JOHN SMITH` → 'John Smith', under FAMILY_FIRST 'Smith John', no word recased): the echo the initials column has. A snapshot recorded before this entry carries no case view, so `snapshot.py` compares the views only against one that records them (`--since v2.5.0` reported 961 entries before that rule, 910 of them the keys appearing, and 51 after it, as master's own snapshot does). NEGATIVE CONTROLS, run as `snapshot.py --tree ` against this snapshot. The tree before #808's fix (`1ae2aedc^`) moves three entries: `JOHN SMITH, FNP-BC` and `john smith, otr/l` in `capitalized`, and `John Smith, otr/l` in `capitalized_force`, the last seen by the forced view alone. The tree before #478's fix (`20cf32f6^`) moves 405 entries, most of them later behavior changes; among them `JOSE ORTEGA-Y-GASSET` and `jose ortega-y-gasset` move in `capitalized`, and `Jose Ortega-Y-Gasset` in `capitalized_force`, which only the forced view sees. The facade's `capitalize()` is not recorded, since it renders through the same repair. `compare.py` records both views for a 2.x baseline and neither for 1.4.0, whose rows go through `facade_view`. Cost on this date: the two views take 0.18s of `snapshot.read`'s 1.38s, and the file grew from 799,124 to 847,676 bytes. The forced view put some long-standing repairs on record, among them `A.B. Vajpayee` → 'A.b. Vajpayee' and `Ibn-ʿAlī` → 'ibn-ʿalī'. They are recorded as the tree reads them, not adjudicated here. SUPERSEDES: 2026-08-29, WHY CASE IS NOT A COMPARED SURFACE; and in 2026-08-29, THE VERIFICATION LIMIT, its claims that no ledger run at any baseline can see a change that moves only case and that nothing is owed for one, and its 2026-09-02 amendment's conclusion that no `capitalized()` column is owed yet. `compare.py --baseline 2.1.0` now shows that entry's own deviation (`ANH DO` → 'Anh Do', where 2.1.0 gave 'Anh do'); a 1.4.0 baseline still cannot. - 2026-10-22 #838 — CAPITALS INSIDE A WORD. The fall-through was `str.capitalize()` on the whole `_WORD` match, which holds a word's interior full stops and any modifier letter (category Lm, which `\w` matches) that opens it, so a capital not standing first was lowered: `j.r.r. tolkien` → 'J.r.r. Tolkien', `AHMAD IBN-ʿALĪ` → 'Ahmad ibn-ʿalī', and under force `A.B. Vajpayee` → 'A.b. Vajpayee'. 1.4.0 through 2.5.0 give the old readings (wheels, measured 2026-10-22, `HumanName(n).capitalize(force=True)`), so this is a fix, not a regression. The fix title-cases each full-stop chunk from its first character outside Lm. TWO ANSWERS. Every chunk is a word of its own rather than every letter a capital, which gives `St.John`, not `ST.JOHN`, and matches the hyphen split: a chunk takes the Mac/Mc convention as a hyphen part does (`J.MCDONALD SMITH` → 'J.McDonald Smith', where 2.5.0 gave 'J.mcdonald'; `mcdonald.jones` → 'McDonald.Jones'), which the first version missed, the Mac branch then running before the split and keeping everything after the first full stop as written (review of #839). Only Lm is passed over: an apostrophe of any spelling (`'`, U+2018, U+2019) is not a word character, so `'abd` was already 'Abd'; a digit is not passed over, or `3rd` would become '3Rd'. THE COST, ACCEPTED: an unlisted abbreviation whose own ending follows its full stop reads as two words. The snapshot showed it on the CLDR fictional `Dut.ra Prof.ra` ('Dut.Ra Prof.Ra' under force), and with it go the one-case Italian salutations (`SIG.RA` → 'Sig.Ra', `DOTT.SSA` → 'Dott.Ssa') that `str.capitalize()` had always repaired correctly, and the Latvian and Norwegian degrees (`dr.philol.` → 'Dr.Philol.', `st.repr.` → 'St.Repr.', three CLDR-only rows), which now read as their spaced spellings do (`Dr. med. univ.` forced → 'Dr. Med. Univ.', decisions/R5's title-repair evidence). A NARROWING WAS BUILT AND DECLINED: two or more letters after the last full stop, closed by none, kept lowercase as an abbreviation's written ending. It kept `Sig.ra` but gave `st.john` → 'St.john', `lt.gov` → 'Lt.gov' and forced `J.Smith` → 'J.smith', and still missed `dr.philol.`, whose ending is closed; a shape cannot tell an ending from a joined name or word, so the remedy is a listed casing, a `cased` mask asked before this clause. DECIDED (Derek, 2026-10-22): the `St.John` reading, with the Italian abbreviated salutations to be listed as titles with masks before 2.6.0 ships. Unlisted joined credentials are a vocabulary question as well (`jd.cpa` → 'Jd.Cpa'). BONUS: 'ʼn' upper-cases to the Lm apostrophe plus 'N', so 'ʼNa' is now a fixpoint, where the second pass gave 'ʼna'; capitalized()'s docstring no longer lists it. SNAPSHOT, 2026-10-22: the moved entries are listed in this change's diff of snapshot.jsonl, each read. Pinned by rules/R4's examples (each fix row fails on the parent) and test_a_word_takes_its_capital_past_a_caseless_lead. -- 2026-10-22 #840 — THE REMEDY FOR #838's ITALIAN COST SHIPS: the abbreviated salutations and letter-heading honorifics whose ending follows their full stop are titles with `cased` masks (decisions/salutation-titles), so `SIG.RA MARIA ROSSI` repairs to 'Sig.ra Maria Rossi' again, as 1.4.0 through 2.5.0 gave it, and `dott.ssa` to 'Dott.ssa'. The mask is asked before the chunk split, the precedence the 2026-10-22 #838 entry relied on. The accepted cost stands for an unlisted ending (the Sardinian `DUT.RA` → 'Dut.Ra', CLDR's `Dut.ra Prof.ra`). A spaced `Sig. ra` is out of reach: it joins as a title run, `ra` being a listed title, and forced repair writes 'Sig. Ra'. +- 2026-10-22 #840 (its spaced `Sig. ra` sentence's reason superseded by decisions/vocabulary-collisions' 2026-11-21 #1483 entry: `ra` is a title only inside a title phrase since, so `Sig. ra Rossi` reads title 'Sig.', given 'ra'; forced repair still writes 'Sig. Ra') — THE REMEDY FOR #838's ITALIAN COST SHIPS: the abbreviated salutations and letter-heading honorifics whose ending follows their full stop are titles with `cased` masks (decisions/salutation-titles), so `SIG.RA MARIA ROSSI` repairs to 'Sig.ra Maria Rossi' again, as 1.4.0 through 2.5.0 gave it, and `dott.ssa` to 'Dott.ssa'. The mask is asked before the chunk split, the precedence the 2026-10-22 #838 entry relied on. The accepted cost stands for an unlisted ending (the Sardinian `DUT.RA` → 'Dut.Ra', CLDR's `Dut.ra Prof.ra`). A spaced `Sig. ra` is out of reach: it joins as a title run, `ra` being a listed title, and forced repair writes 'Sig. Ra'. - 2026-10-28 #357 — THE SHIM'S HALVES OF THIS RULE'S ENTRIES GO WITH THE SHIM (decisions/3-0-reevaluations' 2026-10-28 #357, REMOVAL entry): the v1 pickle load as a second producer of `UNCLASSIFIED_TAG`, leaving `replace()` the one; the first-parse raise for a v1 `Constants` carrying a mismatched mask (2026-09-23 #459, A DECIDED EXCEPTION), the core `Lexicon` raising on it as before; and the filter of v1 `Constants` entries with its folded cross-set checks (2026-10-02 #541, 2026-10-02 #582). A punctuated mask such as 1.4.0's `M.D.` stays legal in a `Lexicon`. SUPERSEDES: the 2026-09-23 #459, A DECIDED EXCEPTION, 2026-10-02 #541 and 2026-10-02 #582 entries, all about translating a v1 `Constants`, and the 2026-08-29 (#458 review) entry's second producer, the v1 pickle load. - 2026-10-28 #939 — A CONNECTIVE BETWEEN PARTICLES: rules/R4's all-particles Except sets aside a connective that is not also particle vocabulary, standing between the part's words, as rules/R2 does, so `FRITZ FREIHERR UND VON BAR` should repair to 'Fritz Freiherr und Von Bar' where it gives 'Fritz freiherr und von bar', a deviation #939 tracks; decided and measured in decisions/R2's 2026-10-28 #754 (Derek), A CONNECTIVE AMONG PARTICLES entry. - 2026-11-02 #1014 (Derek), DECIDED — A NAME OPENING MAC TAKES ITS INNER CAPITAL FROM A MASK, NOT FROM ITS SPELLING. The fall-through had capitalized after any `ma?c` prefix with two or more letters behind it since 0.2.3, so a single-case `MACHADO` repaired to 'MacHado', `MACIAS` to 'MacIas', `MACIEJEWSKI` to 'MacIejewski'; #56 asked in 2015 for an exceptions list beside the regex, and only the length check shipped. Measured over the mixed-case writings of every word the regex matched, each counted as its writer typed it, in the ORCID family-name box and the names of the UK Electoral Commission donors, GOV.UK people and ClinicalTrials.gov officials local corpora (2026-11-02): 4,616 writings of 970 words, the old convention matching the writer's spelling in 16.3% and plain title case in 83.7%; over the same four sources the Mc convention matched 96.8% of 6,312 Mc writings (94.3% of ORCID's 2,764), the rest mostly names Mc opens that are not Gaelic, `Mchunu` 24 the commonest, then `Mchedlishvili` and `Mchome` 5 each. The Gaelic Mac names split by family, so no shape decides them: `MacDonald` 143 against `Macdonald` 77, `Mackenzie` 59 against `MacKenzie` 44, `Mackay` 73 against `MacKay` 26, `MacLeod` 39 against `Macleod` 18. The mask records the spelling where its bearers lean one way: a word written MacX in more than half of at least three writings carries one, 42 words, which brings the measured match to 91.2% (in-sample, since the masks were chosen from the writings they are scored on; at least two writings gave 60 masks and 92.0%, at least five 25 and 90.2%). Recipe: for each source, read the field named (`family` for ORCID's `raw.jsonl`, `name` for the other three) and take every match of `(?`; the 6 names and the 24 by `config_diff.py diff default 'expr:Parser(lexicon=Lexicon.default().remove("aus", kind="given"))' --local all --match` over the word, the given reading removed leaving the never-given particle, which lists the names matched and moved; the bearer counts are on the word (`tools/vocab/query.py --word aus`). +- 2026-11-21 #1483 — `RA` IS A KOREAN FAMILY NAME AND GIVEN NAME BY DEFAULT (PROPOSAL B), AND DE.TOML READS IT AFTER THE NAME AS A CREDENTIAL. Decided 2026-11-21. SUPERSEDES: the 2026-11-19 #1483 entry's sentence leaving Proposal B open. `ra` was en.toml's ungated credential and de.toml's academic title (Rechtsanwalt) with no name reading, so it was the suffix ending a name in any case (`Kim Ra`, `Sang Hak Ra`) and the title opening one (`Ra Mi Kim`), though it is borne as both. C-i asks for the marking where a word is borne in the position its claim acts on: Korean surnames end a name written given first and Korean given names open one. + - **The readings.** ko.toml gives `ra` a `family` and a `given` reading, the file of the language whose names carry it (nameparser/vocab/README.md); mul.toml was declined, since every strict choice reads it, `en` among them, which would gate the credential in English lists, and a my.toml copy moves nothing, a strict `my` choice already reading the word as a name. The bearer counts are on the entry (`tools/name_usage.py Ra --boxes`, 2026-11-21): ORCID's boxes in Korea hold it 25 times as a given name and 37 as a family name, PatentsView's Korean inventors 135 and 100, the US SSA 251 births, the US Census 1,458 surnames (72.5% asian/PI), ORCID's Myanmar given boxes 2 of 1,755 holders. The name readings derive the gated markers (`SUFFIX_ACRONYMS_AMBIGUOUS`, and `TITLES_AMBIGUOUS` in place of `TITLES`), so the credential needs a word to spare and the case signal (rules/S4, rules/S6) and the title reads only inside a title phrase (rules/H9). Family alone was declined on the measurement made for the decision, re-taken here: it leaves de.toml's title ungated past a second comma, where rules/C2 reads a bare title word (`Jane Doe, PT, RA` title 'RA', 5 names) and after a family comma written in capitals (`KING, RA`, 9 FEC names, suffix to title). + - **de.toml's credential.** A plain German choice turns the other files' vocabulary readings of a word off where de.toml holds one, so with the name readings on it lost en.toml's credential and read a lone `RA` after a comma as the given name, making the comma a family comma (`Hans Müller, RA` → given 'RA', family 'Hans Müller'; master read title 'RA'). de.toml now carries a `credential` reading beside its academic title, Rechtsanwalt written after the name, which the default compile already held through en.toml (`_compiled.py` byte-identical, build checks 4 and 5 passing). Under a plain German choice `Hans Müller, RA`, `Müller, RA` and `John Smith, RA` read suffix 'RA', `Hans Müller, LL.M., RA` suffix 'LL.M., RA' and `Hans Müller RA` suffix 'RA', where master read title 'RA' after a comma and family 'RA' with none. A strict German choice, which reads no ko.toml, keeps the title in front (`RA Müller`, `RA Dr. Hans Müller`) and now reads the credential behind it; it and a strict English choice ungate `ra`, which joins tests/v2/test_reading_index.py's reviewed table. + - **Accepted costs.** (1) `RA` opening a German name is the given name (`RA Müller` → given 'RA'), by default and under a plain German choice, a plain choice never dropping a name reading and no German pack existing; a strict German choice, which reads no ko.toml, keeps the title. A title behind it then falls into the middle name, as behind any given name (`RA Dr. Hans Müller` → given 'RA', middle 'Dr. Hans'; `Herr RA Dr. Müller` → title 'Herr', given 'RA', middle 'Dr.'), the class's reading (`Dean Dr. Hans Müller` reads so on master). No corpus name writes Rechtsanwalt in front. (2) A gated credential written without its last full stop is no dotted acronym (rules/S3), so after a family comma a one-word part reads as the given name, the name reversed (`Jane Doe, R.A` → given 'R.', middle 'A', family 'Jane Doe'; 4 ClinicalTrials.gov names, 2 people), and with no comma it ends the name as the family (`Jane Doe R.A` → middle 'Doe', family 'R.A'). It is the class's reading already (`Jane Doe, M.A`, `Jane Doe, B.A` and `John Smith M.A` read so on master), classify asking the gated set with the stop inside the word, so keeping the suffix means widening that test for every gated acronym, not a vocabulary change; left. A bracketed `R.A.` inside a name reads as a middle name for the same class reason (`John (R.A.) Smith`, as `John (M.A.) Smith` on master). (3) A name written wholly in capitals gives no case signal (rules/S6): `KIM MI RA` keeps suffix 'RA', not fixed, and `RA` opening the part after a family comma in one is the given name, alone or before a credential (`KING, RA`, `DOE, RA`, `, RA` → given 'RA', the initials FEC's filers mean; `SMITH, RA MD` → given 'RA', suffix 'MD'; where master read the whole part as the suffix, 'RA' and 'RA MD'), while `RA` behind a credential there stays in the run (`SMITH, MD RA` → suffix 'MD RA'), and `SMITH, RA, JOHN` reads given 'RA', suffix 'JOHN' (master: suffix 'RA, JOHN'). (4) A word glued to `ra` at a full stop reads its chunk as the gated acronym: rules/R4's example `DUT.RA MARIA SILVA` and CLDR's fictional `Dut.ra Prof.ra Maria Giusepa Juana Teresa von Brühl González Domingo` read given 'DUT.RA' and 'Dut.ra' where they read the title (the CLDR record re-recorded; R4's fence asserts the case repair, unchanged), and `Sang Hak Dut.ra` reads suffix 'Dut.ra'. (5) `Kim RA, Jr.`: the capitals settle the credential, leaving `Kim` a lone given name (rules/O5) where the title reading had left it the family. (6) The spaced Italian `Sig. ra Rossi` reads title 'Sig.', given 'ra', where `ra` joined the title run (title 'Sig. ra'); the glued `Sig.ra Rossi` is unchanged, and decisions/R4's 2026-10-22 #840 entry is marked. (7) `RA` in the given part after a family comma ahead of a name word, behind a title or not, is the given name, not a title (`Smith, RA John` → given 'RA', middle 'John', where 1.4.0 and master read title 'RA'; `Smith, Mr RA John` → title 'Mr', given 'RA', where they read title 'Mr RA'; with no name word after it, `Smith, Mr RA` keeps suffix 'RA'; `Müller, RA Hans` → given 'RA', middle 'Hans', under a plain German choice too): rules/H9's reading of a title that is also a given name, as `Smith, Dean John` and `Smith, Mr Dean John` read on master; a strict German choice keeps the title; ahead of a credential the part is still the credential run (`Smith, RA PhD` → suffix 'RA PhD'). Two more read as the gated class reads on master: `ROBERT (RA) ALLEN` reads nickname 'RA' where it read suffix 'RA', as `ROBERT (MA) ALLEN` does, and `Smith, RA PhD Ma` reads suffix 'RA PhD Ma' where it read title 'RA', given 'PhD', as `Smith, MA PhD Ma` does. Also moved, not costs: `Ra Kim, Mi` reads family 'Ra Kim', as 1.4.0 did, rules/H6's peel before a family comma reading the vocabulary's titles; and `Kim Ae Ra` and `Kim, Ae Ra` still read suffix 'Ae Ra', so decisions/S3's 2026-10-25 question now rests on `ae` alone. + - **The examples that used RA as a dual.** Nine rule examples (rules/H3, H4, H6, S1, S7, C5, C12 and C13), three rule sentences (H4, C9, C11), five decisions Standing lines (H3, H4, H6, S7, C9), eight case rows, eleven code comments and docstrings, a tools test and the paired-initials benchmark used `RA` as a word of both the title and the suffix vocabulary, which it no longer is. Each now writes `VC`, a row naming a rank `LT`; each spelling reads as `RA` did under 1.4.0, 2.2.0 and 2.3.0 and on master, measured 2026-11-21, so the notes' version claims stand. The benchmark's counts were re-taken: 35 and 131 `is_suffix_piece` calls on the tree, 120 and 1,620 at 47fb2b21, as with `RA`. + - **Measured** on 2026-11-21. On the tree committed as `5e775983` (the corpora holding all nine respelled examples: the committed corpus holds 21 names matching the filter at master, 12 there), `config_diff.py diff "expr:Parser(lexicon=Lexicon.default().remove('ra', kind='family').remove('ra', kind='given'))" "expr:Parser(lexicon=Lexicon.default().remove('ra', kind='given'))" default --committed --local all --match '(?i)(?>> korean.parse("Kim Do Hyun").middle, korean.parse("Kim Do Hyun").family ('Do', 'Hyun') - >>> parse("Kim Min Ra").suffix - 'Ra' - >>> korean.parse("Kim Min Ra").family - 'Ra' + >>> parse("Kim Min Ae").suffix + 'Ae' + >>> korean.parse("Kim Min Ae").family + 'Ae' Chinese ``De`` is the same case under strict ``zh``: ``De Xu`` reads given ``De``, family ``Xu``. @@ -1088,8 +1088,8 @@ What a strict choice drops it drops from every name: >>> korean.parse("Kim Min Jun, PhD, MSc").suffix 'PhD, MSc' - >>> parser_for(ko, en, strict=True).parse("Kim Min Ra").suffix - 'Ra' + >>> parser_for(ko, en, strict=True).parse("Kim Min Ae").suffix + 'Ae' >>> korean.parse("Kim Min Jun, RN").given 'RN' >>> parser_for(ko, en, strict=True).parse("Kim Min Jun, RN").suffix diff --git a/docs/migrate.rst b/docs/migrate.rst index b0bb9ab96..37e77ab30 100644 --- a/docs/migrate.rst +++ b/docs/migrate.rst @@ -910,7 +910,7 @@ list, with reasoning, is in each release's section of - :ref:`migrate-3-1` * - 3.2 - Dutch ``Oude``, Malaysian ``a/l``, ``a/p`` and ``anak``, - religious titles before a name + religious titles before a name, Korean ``Ra`` - :ref:`migrate-3-2` Each entry says what it compares with. The lists of readings through @@ -2475,3 +2475,36 @@ patronymic as the family name. The default parse is unchanged: ('Олена', 'Коваленко', 'Петрівна') >>> parse("Коваленко Олена Петрівна").family 'Петрівна' + +Ra as a Korean name +^^^^^^^^^^^^^^^^^^^ + +``Ra``, a Korean family name and given name, reads as a name where it +ends or opens one, where 1.4.0 through 3.1.0 read it as the credential +RA ending a name of three words (2.0 through 3.1 of two too) and the +title RA (Rechtsanwalt) opening one. Written ``RA`` in a name of mixed +case and ending it after a comma, or written ``R.A.``, it is still the +credential. ``Ra`` alone after a family comma (``Kim, Ra``), ``RA`` +opening the part after a family comma in a name written wholly in +capitals (``KING, RA``), ``RA`` in the given part after a family comma +ahead of a name word (``Smith, RA John``) and ``RA`` opening a German +name are now the given name: + +.. doctest:: + + >>> sang_hak = parse("Sang Hak Ra") + >>> sang_hak.middle, sang_hak.family, sang_hak.suffix + ('Hak', 'Ra', '') + >>> parse("Ra Mi Kim").given + 'Ra' + >>> parse("John Smith, RA").suffix + 'RA' + +To read it as 3.1 did, remove its two name readings: + +.. doctest:: + + >>> as_31 = Parser(lexicon=Lexicon.default().remove("ra", kind="family") + ... .remove("ra", kind="given")) + >>> as_31.parse("Sang Hak Ra").suffix + 'Ra' diff --git a/docs/release_log.rst b/docs/release_log.rst index 22169e626..a37732786 100644 --- a/docs/release_log.rst +++ b/docs/release_log.rst @@ -4,6 +4,7 @@ Release Log nameparser 3.2 is under development. + - **Read Ra as a Korean family name and given name, not only as a credential and a title.** ``parse("Sang Hak Ra")`` gives middle ``Hak``, family ``Ra``, where 1.4.0 through 3.1.0 gave family ``Hak``, suffix ``Ra``; ``RA`` ending a name after a comma in a name of mixed case, or written ``R.A.``, is still the credential, while ``Ra`` alone after a family comma (``Kim, Ra``), ``RA`` opening the part after a family comma in a name written wholly in capitals (``KING, RA``), ``RA`` in the given part after a family comma ahead of a name word (``Smith, RA John``) and ``RA`` opening a German name (Rechtsanwalt) are now the given name. :issue:`1483` - **Keep Cheikh and Sultan as given names under a strict Arabic or Malay choice.** With ``languages=frozenset({"ar"})`` chosen and ``strict=True``, ``Cheikh Kaddari`` gives given ``Cheikh``, family ``Kaddari``, where 3.0.0 through 3.1.0 gave title ``Cheikh``, given ``Kaddari``; ``Sultan Zulkarnain`` under a strict ``ms`` choice reads given ``Sultan`` the same way. The default and every plain choice read both as before. :issue:`1463` - **Read the Cyrillic doctorate д-р ending a name as a credential, and the Bulgarian д.м. under a Bulgarian choice.** ``parse("Іван Петренко д-р")`` gives family ``Петренко``, suffix ``д-р``, where 1.4.0 through 3.1.0 gave middle ``Петренко``, family ``д-р``; in front of the name ``д-р`` stays the title, and after a comma it is the suffix too (``Іван Петренко, д-р``). With Bulgarian chosen (``languages=frozenset({"bg"})``), ``доц. д-р Мария Петрова, д.м.`` gives title ``доц. д-р``, family ``Петрова``, suffix ``д.м.``; by default it gives given ``д.м.``, family ``доц. Мария Петрова``, suffix ``д-р``, where 1.4.0 through 3.1.0 kept ``д-р`` in the family. :issue:`1128` - **Read Bc and Ing as titles under locales.CS, written bare or two joined by et.** ``parser_for(locales.CS).parse("Ing. et Ing. Jan Novák")`` gives title ``Ing. et Ing.``, given ``Jan``, family ``Novák``, where 3.0.0 through 3.1.0 gave given ``Ing. et Ing.``, family ``Jan Novák``; the default is unchanged. Under the pack a name that opens with the given name Ing reads it as the title (``Ing Wei Lim``), and initials ``BC`` after a comma read as the title too (``MOSS, BC``); a strict choice of ``cs`` or ``sk`` now keeps ``et`` between two degrees the pack reads (``Mgr. et Mgr.``). :issue:`970` diff --git a/nameparser/_parser.py b/nameparser/_parser.py index c395c0743..1c3ca5f19 100644 --- a/nameparser/_parser.py +++ b/nameparser/_parser.py @@ -244,7 +244,7 @@ def revise(self, name: ParsedName, **fields: str) -> ParsedName: dropped = set(state.dropped) # Force the role BEFORE the entry pass: it keys on # Role.SUFFIX, and a bare value's sub-parse reads its words - # as a name ('RA PhD' is a title and a family there), so + # as a name ('VC PhD' is a title and a family there), so # inside the sub-parse it joined nothing. The sub-parse's # tags are KEPT, "joined" included: a within-piece mark # (the Ph. D. merge) is role-blind and right for every diff --git a/nameparser/_pipeline/_assign.py b/nameparser/_pipeline/_assign.py index 7c56fbf67..4bdde3860 100644 --- a/nameparser/_pipeline/_assign.py +++ b/nameparser/_pipeline/_assign.py @@ -2064,8 +2064,8 @@ def as_a_middle(m: int, token: WorkToken) -> PendingReading: # Berg'), or where everything behind it is post-nominal, which # leaves no family word to address -- H3's concern, by a # stricter test than H3's one-word give-back, so this is not - # `leading_titles` ('RA PhD Jr., John' keeps family 'RA', where - # 'RA PhD Jr. John' reads title 'RA'). A dual is a title wherever + # `leading_titles` ('VC PhD Jr., John' keeps family 'VC', where + # 'VC PhD Jr. John' reads title 'VC'). A dual is a title wherever # a name word follows it ('Rev. Sr. Smith, Mary'). # `is_title_piece` is H5's vocabulary read, so the two slots that # refuse the shape agree on what a title word is, save H5's diff --git a/nameparser/_pipeline/_comma.py b/nameparser/_pipeline/_comma.py index 98a61a1e9..1bc3412df 100644 --- a/nameparser/_pipeline/_comma.py +++ b/nameparser/_pipeline/_comma.py @@ -279,7 +279,7 @@ def _behind_a_generation(state: ParseState, seg0: Sequence[int], # a title reads as a title, a word or a run a connective joins # ('Mr. and Mrs.', a dual inside it included); a lone dual of # the title and the suffix vocabulary is the suffix here, the - # slot being postnominal ('John Smith Jr., AD RA'): C13's two + # slot being postnominal ('John Smith Jr., AD VC'): C13's two # predicates, asked in C13's order title = (not is_suffix_piece(p, pt, tokens) and is_title_piece(p, pt, tokens)) @@ -952,7 +952,7 @@ def decide(state: ParseState, splits: bool | None = True) -> ParseState: # it stands behind that word, so one scan answers every # pair. Asked per pair, the scan re-walked every word in # front of each one, quadratic in the part ('John Smith, ' + - # 'RA '*k + 'G.J. '*k, the duals never ending it; #563's + # 'VC '*k + 'G.J. '*k, the duals never ending it; #563's # shape, back in #613 and caught in review) speaker = -1 for k, p in enumerate(p1): diff --git a/nameparser/_pipeline/_pieces.py b/nameparser/_pipeline/_pieces.py index ae8c53021..ecf5b1373 100644 --- a/nameparser/_pipeline/_pieces.py +++ b/nameparser/_pipeline/_pieces.py @@ -711,7 +711,7 @@ def _anchors(piece: Sequence[int], tokens: Sequence[WorkToken]) -> bool: retired single-character vocabulary matches for the same reason. Not because a numeral is no credential -- a multi-letter suffix word ('III', 'Jr') anchors like any other suffix piece - (`is_single_letter_numeral`). A title/suffix DUAL ('ms', 'ra', + (`is_single_letter_numeral`). A title/suffix DUAL ('ms', 'vc', 'sr') does anchor, except in the given part's leading title run, where it stands in title position ('Smith, Ms Ma' is Ms. Ma Smith); that exclusion is the callers', which start @@ -752,7 +752,7 @@ def credential_anchors(order: Sequence[int], The caller decides where the walk starts, and starts it past the leading title run, where a title/suffix dual reads as a title - ('Smith, RA MA Ma' keeps its middle name). Where `order` holds the + ('Smith, VC MA Ma' keeps its middle name). Where `order` holds the name part, its own leading position is the name the reserve keeps -- `rest[0]` at the no-comma peel, the given part's own first piece at the given-slot call sites -- so ITS writing never anchors @@ -789,7 +789,7 @@ def given_slot_anchors(pieces: Sequence[Sequence[int]], rather than by position: the pass over `start` to `end`, `skip` spliced out, and False before `start`, from `end` on and at every skipped piece. `start` is where the leading title run ends, so a - title/suffix dual standing in it anchors nothing ('Smith, RA MA + title/suffix dual standing in it anchors nothing ('Smith, VC MA Ma'), and the piece at `start` is the given name the reserve keeps. The one home of that query for assign's given slot.""" stop = len(pieces) if end is None else end @@ -875,9 +875,9 @@ def segment_suffix_reading(pieces: Sequence[Sequence[int]], later credential: the dual makes the next name-position word the given name, and reading the part wholly as credentials would stack the anchor's guess on the dual's ('Smith, Ms Ma', 'Smith, - Ms RA Ma' and 'Smith, RA PhD Ma' keep a given name, 'Smith, - Prof. RA Ma' too). The walk then reads the part, and its given - slot's company starts past that given name ('Smith, RA PhD Jr + Ms VC Ma' and 'Smith, VC PhD Ma' keep a given name, 'Smith, + Prof. VC Ma' too). The walk then reads the part, and its given + slot's company starts past that given name ('Smith, VC PhD Jr Ma' reads suffix 'Jr Ma'). A plain title ahead of the credential does not stop this reading ('Smith, Dr. PhD LAc' reads title 'Dr.', suffix 'PhD LAc'). @@ -947,7 +947,7 @@ def segment_suffix_reading(pieces: Sequence[Sequence[int]], -- such a word being a suffix word written as an initial. Under strict the numeral gets no suffix reading behind a suffix word, so a part no credential opened is no run and the reading is None - ('Smith, RA I'); a part a credential opened (C13) still takes the + ('Smith, VC I'); a part a credential opened (C13) still takes the word in through `opened` below and hands it to `absorbed` ('Smith, PSM I.'), which implements rules/C14's Except bullet "A credential opening the part". The walk reads the token's `initial` @@ -984,7 +984,7 @@ def segment_suffix_reading(pieces: Sequence[Sequence[int]], # stood there: once one has, nothing in the part anchors. Tracked # here rather than read off `leading_titles`, whose period-shape # inference counts a suffix like 'Esq.' into the run ('Smith, Esq. - # RA Ma' keeps its anchored 'Ma' only by this walk's reading). + # VC Ma' keeps its anchored 'Ma' only by this walk's reading). leading = True dual_led = False # #603: the first suffix word of the leading run, which may open diff --git a/nameparser/_pipeline/_vocab.py b/nameparser/_pipeline/_vocab.py index 9aeab0ba4..97eb344de 100644 --- a/nameparser/_pipeline/_vocab.py +++ b/nameparser/_pipeline/_vocab.py @@ -636,7 +636,7 @@ def reads_as_initials(word: str, kind: SetApartKind, name word of its comma part, as the initials the person goes by: a credential written in their shape that is no generation word, and a word that is a title too only written with a period after each - letter ('R.A.') or in capitals in a name of mixed case ('RA'), + letter ('V.C.') or in capitals in a name of mixed case ('VC'), Title case reading as the title it also is and capitals in a name written in one case saying nothing (S6); a title alone never. A member of the ambiguous class counts as the credential it is diff --git a/nameparser/config/_compiled.py b/nameparser/config/_compiled.py index a047f2f9f..774c1a5d5 100644 --- a/nameparser/config/_compiled.py +++ b/nameparser/config/_compiled.py @@ -967,7 +967,6 @@ 'pvt', 'qari', "queen's", - 'ra', 'rabbi', 'radio', 'radiologist', @@ -1620,6 +1619,7 @@ 'prince', 'princess', 'queen', + 'ra', 'ranger', 'royal', 'sailor', @@ -2992,6 +2992,7 @@ 'pa', 'pac', 'pe', + 'ra', 'se', 'si', }) diff --git a/nameparser/config/_index.py b/nameparser/config/_index.py index 67957b116..affd56782 100644 --- a/nameparser/config/_index.py +++ b/nameparser/config/_index.py @@ -2923,7 +2923,7 @@ ('quinca', (('pt-BR', 'familiar', (('short_for', ('joaquim',)),)),)), ('quinha', (('pt-BR', 'familiar', (('short_for', ('francisca',)),)),)), ('quinho', (('pt-BR', 'familiar', (('short_for', ('francisco',)),)),)), - ('ra', (('de', 'academic', ()), ('en', 'credential', ()))), + ('ra', (('de', 'academic', ()), ('de', 'credential', ()), ('en', 'credential', ()), ('ko', 'given', ()), ('ko', 'family', ()))), ('rabbi', (('he', 'religious', ()),)), ('radek', (('cs', 'familiar', (('short_for', ('radoslav',)),)), ('pl', 'familiar', (('short_for', ('radoslaw', 'radosław')),)), ('sk', 'familiar', (('short_for', ('radoslav',)),)))), ('radio', (('en', 'modifier', ()),)), diff --git a/nameparser/locales/AGENTS.md b/nameparser/locales/AGENTS.md index 5de3bf0b8..fb48c3349 100644 --- a/nameparser/locales/AGENTS.md +++ b/nameparser/locales/AGENTS.md @@ -11,7 +11,7 @@ Decide which layer the vocabulary belongs in, if the pack carries any. - **Self-selecting vocabulary is default-safe, and belongs in the default lexicon.** Self-selecting means able to match only text of the tradition it came from, the way a hangul surname can only ever match hangul. It goes in `nameparser/vocab/*.toml` (a segmentation surname list such as the Korean one, in `nameparser/config/_ko_surnames.py`, is read as `Lexicon.default().surnames`) rather than in a pack: a pack nobody knows to ask for is vocabulary nobody gets. - **Vocabulary that declares a language its script does not belongs in the pack**, where asking for it is the declaration. A Chinese surname list silently mangles the Japanese names written in the same characters. - **A word reading that is right in its language and wrong as a default** is written in that language's vocabulary file with `default = false` (`nameparser/vocab/README.md`, Properties), and the pack's `languages` turns it on; the pack module lists nothing (`nameparser/locales/hi.py`). -- **Before a pack removes another language's readings, measure a strict choice of its language.** A removal list names other languages' words, so it fails silently in two ways, checked on master `d12af9d6`: removing a reading that is no longer there raises nothing, in a lexicon or a pack, and a reading another language gains later is not on the list, which misreads names and which no test can name. A strict choice (`parser_for(PACK, strict=True)`) reads no other language's file, so neither can happen to it. Prefer it, with what the language's lists write that strict drops added to the language's own vocabulary file, `default = false` (copies of another file's reading must copy every vocabulary reading of the word, since a choice that holds one drops the other files', as `my.toml`'s `lt` copies `en.toml`'s credential with its rank). A pack that removes readings records in its docstring why strict would not do; `locales.VI`'s list predates this rule, and strict `vi` was measured beside it in #1483 and left for a later decision (decisions/vocabulary-collisions, the 2026-11-19 #1483 entry). #1231 shipped `locales.MY` with nine particles and a credential removed; #1483 found five credential syllables the list missed (`PE`, `LAT`, `EI`, `SI`, `PA`), and `RA`, ungated,, all read right by strict `my`, and the fragment was dropped for strict plus my.toml's English ranks. +- **Before a pack removes another language's readings, measure a strict choice of its language.** A removal list names other languages' words, so it fails silently in two ways, checked on master `d12af9d6`: removing a reading that is no longer there raises nothing, in a lexicon or a pack, and a reading another language gains later is not on the list, which misreads names and which no test can name. A strict choice (`parser_for(PACK, strict=True)`) reads no other language's file, so neither can happen to it. Prefer it, with what the language's lists write that strict drops added to the language's own vocabulary file, `default = false` (copies of another file's reading must copy every vocabulary reading of the word, since a choice that holds one drops the other files', as `my.toml`'s `lt` copies `en.toml`'s credential with its rank). A pack that removes readings records in its docstring why strict would not do; `locales.VI`'s list predates this rule, and strict `vi` was measured beside it in #1483 and left for a later decision (decisions/vocabulary-collisions, the 2026-11-19 #1483 entry). #1231 shipped `locales.MY` with nine particles and a credential removed; #1483 found five credential syllables the list missed (`PE`, `LAT`, `EI`, `SI`, `PA`), and `RA`, then ungated, all read right by strict `my`, and the fragment was dropped for strict plus my.toml's English ranks. - **Strict cannot reach a mul.toml reading, and a removal takes the one reading that does the gating.** A strict choice keeps mul.toml, so where the reading in the way is mul.toml's, a fragment is the only route; moving the reading into another file does not help a plain choice either, since a choice never drops a name reading (decision 15), and the build refuses the move twice (check 13: a reading in another file of a word mul.toml holds, and mul.toml's credential beside a name reading elsewhere that strict would ungate). Then remove only what gates the reading you want: rules/H9 gates a title by a `given` reading alone, while the credential gate (`SUFFIX_ACRONYMS_AMBIGUOUS`) reads `given` or `family`. #970's first build of `locales.CS` removed both of `ing`'s name readings and ungated mul.toml's credential with the title, so about 50 corpus surnames read as the suffix (`Mr Tom Ing`, `Tom Ing, MD PhD` family 'Tom'); removing `given` alone ungated the title and kept those surnames. List every reading the word holds (`tools/vocab/query.py --word`) and ask which set each one compiles into before writing the removal. - **A pack with no list of its own ships an empty `Lexicon`** (`Lexicon.empty()`, as `nameparser/locales/ru.py` does); `nameparser/locales/zh.py` is the template for one that carries a list. diff --git a/nameparser/vocab/de.toml b/nameparser/vocab/de.toml index e2ef2a378..82697502d 100644 --- a/nameparser/vocab/de.toml +++ b/nameparser/vocab/de.toml @@ -50,6 +50,7 @@ academic = { same_as = "priv.-doz", dotted = true } [[word]] text = "ra" academic = { expands = "Rechtsanwalt, the address of a lawyer, 'RA Müller'" } +credential = { issue = 1483, expands = "Rechtsanwalt written after the name, 'Hans Müller, RA'", note = "en.toml's credential, here so a plain German choice, which turns the other files' vocabulary readings of the word off, keeps one (#1483), gated as en.toml's is by ko.toml's name readings" } [[word]] text = "univ.prof" diff --git a/nameparser/vocab/ko.toml b/nameparser/vocab/ko.toml index d6b0fdfdd..0f7cbe500 100644 --- a/nameparser/vocab/ko.toml +++ b/nameparser/vocab/ko.toml @@ -86,3 +86,8 @@ note = "teacher/respected elder" side = "after" issue = 308 note = "longest-first peels 선생님 off 김선생님 whole, rather than leaving 김선생 to segment into family 김 and given 선생" + +[[word]] +text = "ra" +given = { us_ssa = 251, wikidata = 4, as_of = 2026-11-21, note = "decided 2026-11-21 (#1483): a Korean given name or its syllable, read so the credential en.toml lists and the title de.toml lists yield to it where it ends or opens a name (rules/S4, rules/H9); ORCID's given boxes hold it in Korea 25 times and Indonesia 23, PatentsView's Korean inventors 135; Burmese given names end in it too (ORCID Myanmar 2 of 1,755); nam_dict band 4 in Korea (tools/name_usage.py Ra --boxes, 2026-11-21)" } +family = { us_census_2010 = 1458, wikidata = 4, as_of = 2026-11-21, note = "decided 2026-11-21 (#1483): the Korean surname 라/나 romanized; Census rank 18,793, asian/PI 72.5%; ORCID's family boxes hold it in Korea 37 times, PatentsView's Korean inventors 100 (tools/name_usage.py Ra --boxes, 2026-11-21)" } diff --git a/tests/v2/cases.py b/tests/v2/cases.py index 81bcb19b8..4cc35eed2 100644 --- a/tests/v2/cases.py +++ b/tests/v2/cases.py @@ -1464,6 +1464,218 @@ def _check_cjk_shape_purity(self) -> None: "Syed Tahir Zaidan", {"given": "Syed", "middle": "Tahir", "family": "Zaidan"}, notes="the given name its bearers file it as (#1469)"), + # #1483: `ra` is a Korean surname and given name as well as en.toml's + # credential and de.toml's title, so ko.toml's name readings gate both + # (rules/S4, rules/H9). Each row's notes checked against the wheels + # they name on 2026-11-21; the feat rows fail on master + Case("a_korean_surname_ra_ending_two_words_is_the_family", + "Kim Ra", + {"given": "Kim", "family": "Ra"}, + ambiguities=("suffix-or-name",), + notes="the gated credential needs a word to spare (rules/S4); " + "1.4.0 read the same fields, 2.x through 3.1.0 suffix " + "'Ra' with no family"), + Case("a_korean_name_ending_in_ra_keeps_it_as_the_family", + "Sang Hak Ra", + {"given": "Sang", "middle": "Hak", "family": "Ra"}, + classification="feat(#1483)", + ambiguities=("suffix-or-name",), + notes="three words in mixed case: Title case leans to the name " + "(rules/S6); 1.4.0 through 3.1.0 read family 'Hak', " + "suffix 'Ra'"), + Case("ra_opening_a_name_is_the_given_name", + "Ra Mi Kim", + {"given": "Ra", "middle": "Mi", "family": "Kim"}, + classification="feat(#1483)", + notes="de.toml's title is a title only in a phrase now " + "(rules/H9); 1.4.0 through 3.1.0 read title 'Ra'"), + Case("ra_behind_a_salutation_is_the_given_name", + "Mr Ra Kumar", + {"title": "Mr", "given": "Ra", "family": "Kumar"}, + classification="feat(#1483)", + notes="1.4.0 through 3.1.0 read title 'Mr Ra', family 'Kumar'"), + Case("ra_opening_a_family_first_name_is_the_family", + "Ra Kim", + {"given": "Kim", "family": "Ra"}, + policy=Policy(name_order=FAMILY_FIRST), + classification="feat(#1483)", + notes="the Korean surname in its native order; 3.1.0 read " + "title 'Ra', family 'Kim'"), + Case("ra_keeps_the_credential_after_a_comma", + "John Smith, RA", + {"given": "John", "family": "Smith", "suffix": "RA"}, + notes="boundary: capitals in a name of mixed case settle the " + "member as the credential (rules/S6), so the gate moves " + "nothing here"), + Case("ra_keeps_the_credential_after_a_second_comma", + "Jane Doe, PT, RA", + {"given": "Jane", "family": "Doe", "suffix": "PT, RA"}, + notes="boundary: with the family reading alone de.toml's " + "title would stay ungated, only a given reading making a " + "title one inside a phrase (rules/H9), and rules/C2 would " + "read it as the title past the second comma"), + Case("ra_written_with_its_stops_keeps_the_credential", + "Jane Doe, R.A.", + {"given": "Jane", "family": "Doe", "suffix": "R.A."}, + notes="boundary: an acronym written with a stop after each " + "letter is no name (rules/S3)"), + Case("ra_written_without_its_last_stop_after_a_comma_reverses", + "Jane Doe, R.A", + {"given": "R.", "middle": "A", "family": "Jane Doe"}, + classification="feat(#1483)", + ambiguities=("suffix-or-name",), + notes="an accepted cost: the gated class written without its " + "last stop is no dotted acronym, and the one-word part " + "after a family comma is the given name, as 'Jane Doe, " + "M.A' reads on master (decisions/vocabulary-collisions, " + "2026-11-21 #1483); 1.4.0 through 3.1.0 read suffix 'R.A'"), + Case("ra_alone_after_a_family_comma_in_capitals_is_the_credential", + "Doe, RA", + {"family": "Doe", "suffix": "RA"}, + classification="fix(#296)", + notes="boundary: in a name of mixed case the capitals settle " + "it; a name written wholly in capitals gives no case " + "signal and reads the given name ('KING, RA'). 1.4.0 " + "through 2.1.0 read title 'RA', 2.2.0 through 3.1.0 as " + "here"), + Case("ra_opening_a_german_name_is_the_given_name", + "RA Müller", + {"given": "RA", "family": "Müller"}, + classification="feat(#1483)", + notes="an accepted cost: Rechtsanwalt in front is a title only " + "in a phrase now (rules/H9), and no choice of languages " + "drops ko.toml's name reading (a strict German choice " + "reads none and keeps the title); 1.4.0 through 3.1.0 " + "read title 'RA'"), + Case("ra_ending_a_name_in_capitals_stays_the_credential", + "KIM MI RA", + {"given": "KIM", "family": "MI", "suffix": "RA"}, + ambiguities=("suffix-or-name",), + notes="boundary, not fixed: a name written wholly in capitals " + "gives no case signal (rules/S6) and has a word to spare " + "(rules/S4); 1.4.0 read the same fields"), + Case("ra_alone_after_a_family_comma_is_the_given_name", + "Kim, Ra", + {"given": "Ra", "family": "Kim"}, + classification="feat(#1483)", + ambiguities=("suffix-or-name",), + notes="Title case leans to the name (rules/S6); 1.4.0 read " + "title 'Ra', first 'Kim', 2.2.0 through 3.1.0 suffix 'Ra' " + "with no given name"), + Case("ra_alone_after_a_family_comma_in_capitals_is_the_given_name", + "KING, RA", + {"given": "RA", "family": "KING"}, + classification="feat(#1483)", + ambiguities=("suffix-or-name",), + notes="a name wholly in capitals gives no case signal (rules/S6), " + "so the lone member after a family comma is the given name: " + "the initials such filers mean, the credential's cost " + "otherwise; 1.4.0 read title 'RA', 3.1.0 suffix 'RA'"), + Case("ra_opening_a_capitals_part_before_a_credential_is_the_given_name", + "SMITH, RA MD", + {"given": "RA", "family": "SMITH", "suffix": "MD"}, + classification="feat(#1483)", + ambiguities=("suffix-or-name",), + notes="an accepted cost, as 'KING, RA' with a credential behind " + "it: no case signal in a name wholly in capitals " + "(rules/S6); 1.4.0 read title 'RA', first 'MD', 3.1.0 " + "suffix 'RA MD'"), + Case("ra_opening_the_given_part_ahead_of_a_name_is_the_given_name", + "Smith, RA John", + {"given": "RA", "middle": "John", "family": "Smith"}, + classification="feat(#1483)", + ambiguities=("suffix-or-name",), + notes="an accepted cost: a title that is also a given name is a " + "title only inside a phrase (rules/H9), as 'Smith, Dean " + "John' reads on master; 1.4.0 through 3.1.0 read title " + "'RA', given 'John'"), + Case("ra_without_its_last_stop_ending_a_name_is_the_family", + "Jane Doe R.A", + {"given": "Jane", "middle": "Doe", "family": "R.A"}, + classification="feat(#1483)", + ambiguities=("suffix-or-name",), + notes="an accepted cost, the no-comma twin of 'Jane Doe, R.A': " + "no dotted acronym (rules/S3), so the gate reads the name " + "word, as 'John Smith M.A' reads on master; 1.4.0 through " + "3.1.0 read suffix 'R.A'"), + Case("ra_in_capitals_before_a_generation_comma_leaves_a_lone_given", + "Kim RA, Jr.", + {"given": "Kim", "suffix": "RA, Jr."}, + classification="feat(#1483)", + ambiguities=("given-or-family",), + notes="an accepted cost: capitals in a name of mixed case settle " + "the credential, leaving 'Kim' one name word, given by " + "default (rules/O5); 1.4.0 read last 'RA', 3.1.0 family " + "'Kim'"), + Case("ra_before_a_generation_comma_is_the_family", + "Kim Ra, Jr.", + {"given": "Kim", "family": "Ra", "suffix": "Jr."}, + ambiguities=("suffix-or-name",), + notes="the Title-case twin of 'Kim RA, Jr.'; 1.4.0 read the same " + "fields, 2.0.0 through 2.3.0 given 'Kim', 2.4.0 through " + "3.1.0 family 'Kim', each suffix 'Ra, Jr.'"), + Case("ra_before_a_credential_comma_is_the_family", + "Kim Ra, PhD", + {"given": "Kim", "family": "Ra", "suffix": "PhD"}, + ambiguities=("suffix-or-name",), + notes="1.4.0 read the same fields, 3.1.0 family 'Kim', suffix " + "'Ra, PhD'"), + Case("ra_in_lower_case_ending_two_words_is_the_family", + "kim ra", + {"given": "kim", "family": "ra"}, + ambiguities=("suffix-or-name",), + notes="a name wholly in one case, with no word to spare (rules/S4); " + "1.4.0 read the same fields, 3.1.0 suffix 'ra'"), + Case("ra_in_lower_case_ending_three_words_stays_the_credential", + "sang hak ra", + {"given": "sang", "family": "hak", "suffix": "ra"}, + ambiguities=("suffix-or-name",), + notes="boundary, the lower-case twin of 'KIM MI RA': no case " + "signal and a word to spare; 1.4.0 and 3.1.0 read the same " + "fields, unreported"), + Case("ra_before_a_family_comma_is_part_of_the_family", + "Ra Kim, Mi", + {"given": "Mi", "family": "Ra Kim"}, + notes="rules/H6 peels a title before a family comma by " + "vocabulary, and 'ra' is a title only inside a phrase now; " + "1.4.0 read the same fields, 3.1.0 title 'Ra', family 'Kim'"), + Case("a_spaced_italian_sig_ra_no_longer_joins_the_title", + "Sig. ra Rossi", + {"title": "Sig.", "given": "ra", "family": "Rossi"}, + classification="feat(#1483)", + notes="an accepted cost: the spaced ending of Signora is no title " + "run once 'ra' is a title only inside a phrase; the glued " + "'Sig.ra Rossi' is unchanged (decisions/R4's #840 entry); " + "1.4.0 through 3.1.0 read title 'Sig. ra'"), + Case("ra_opening_a_german_name_takes_the_next_title_into_the_middle", + "RA Dr. Hans Müller", + {"given": "RA", "middle": "Dr. Hans", "family": "Müller"}, + classification="feat(#1483)", + notes="an accepted cost, cost 1's worst shape: 'Dr.' behind a " + "given name is no leading title, as 'Dean Dr. Hans Müller' " + "reads on master; 1.4.0 through 3.1.0 read title 'RA Dr.'"), + Case("ra_opening_a_family_first_given_last_name_is_the_family", + "Ra Mi Kim", + {"given": "Kim", "middle": "Mi", "family": "Ra"}, + policy=Policy(name_order=FAMILY_FIRST_GIVEN_LAST), + classification="feat(#1483)", + notes="3.1.0 read title 'Ra', given 'Kim', family 'Mi'"), + Case("ra_ending_a_family_first_name_is_the_given_name", + "Kim Ra", + {"given": "Ra", "family": "Kim"}, + policy=Policy(name_order=FAMILY_FIRST), + classification="feat(#1483)", + ambiguities=("suffix-or-name",), + notes="the gated credential under a family-first order; 3.1.0 " + "read given 'Kim', suffix 'Ra'"), + Case("ra_after_a_birth_marker_is_the_maiden_name", + "Jane Doe née Ra", + {"given": "Jane", "family": "Doe", "maiden": "Ra"}, + classification="feat(#1483)", + ambiguities=("suffix-or-name",), + notes="the suffix reading had taken the marker's name, leaving " + "'née' the family; 1.4.0 through 3.1.0 read middle 'Doe', " + "family 'née', suffix 'Ra'"), # #1231: the Burmese pack. Burmese names have no family name, so the # last word lands in family by position. Each row's notes checked # against the 1.4.0, 2.0.0, 2.4.0, 2.8.2 and 3.1.0 wheels on @@ -4555,22 +4767,26 @@ def _check_cjk_shape_purity(self) -> None: "given name. 1.4.0 and 2.3.0 read the same", shape=2), Case("a_dual_opening_the_given_part_anchors_nothing", - "Smith, RA MEng", - {"title": "RA", "given": "MEng", "family": "Smith"}, + "Smith, VC MEng", + {"title": "VC", "given": "MEng", "family": "Smith"}, notes="the same exclusion for the other chunked member. " - "1.4.0 read the same; 2.3.0 read suffix 'RA MEng', " - "the reading #540's marking moved"), + "1.4.0 read the same; 2.3.0 read suffix 'VC MEng', " + "the reading #540's marking moved. " + "Spelled with 'RA' until #1483 gave ra a name reading; " + "'VC' reads as 'RA' did under 1.4.0, 2.2.0 and 2.3.0"), Case("a_dual_opening_the_given_part_turns_the_anchor_off", - "Smith, Ms RA Ma", - {"title": "Ms RA", "given": "Ma", "family": "Smith"}, + "Smith, Ms VC Ma", + {"title": "Ms VC", "given": "Ma", "family": "Smith"}, notes="a dual opening the given part is a title there, and a " "part whose leading title run holds one is anchored by " "nothing, the second dual standing in that same run. " - "1.4.0 and 2.3.0 read the same", + "1.4.0 and 2.3.0 read the same. " + "Spelled with 'RA' until #1483 gave ra a name reading; " + "'VC' reads as 'RA' did under 1.4.0, 2.2.0 and 2.3.0", shape=2), Case("a_dual_opening_the_given_part_silences_a_later_degree", - "Smith, RA PhD Ma", - {"title": "RA", "given": "PhD", "middle": "Ma", + "Smith, VC PhD Ma", + {"title": "VC", "given": "PhD", "middle": "Ma", "family": "Smith"}, classification="fix(#296)", ambiguities=("suffix-or-name",), @@ -4580,8 +4796,10 @@ def _check_cjk_shape_purity(self) -> None: "so 'PhD' speaks for nothing here and 'Ma' ends the " "given part as a middle name, reported by the given " "slot. 2.2.0 and 2.3.0 read the same fields; 1.4.0 " - "through 2.1.0 title 'RA PhD', first 'Ma', 'phd' being " - "title vocabulary until #296", + "through 2.1.0 title 'VC PhD', first 'Ma', 'phd' being " + "title vocabulary until #296. " + "Spelled with 'RA' until #1483 gave ra a name reading; " + "'VC' reads as 'RA' did under 1.4.0, 2.2.0 and 2.3.0", shape=2), Case("a_numeral_in_front_anchors_nothing", "smith, v ed", @@ -7463,10 +7681,12 @@ def _check_cjk_shape_purity(self) -> None: notes="#1323 boundary: 'Ms' written as a title is the given " "part's title, no company, so the part is the given part"), Case("two_caps_behind_a_title_dual_with_nothing_behind_stay_initials", - "John Smith, RA MJ", - {"title": "RA", "given": "MJ", "family": "John Smith"}, + "John Smith, VC MJ", + {"title": "VC", "given": "MJ", "family": "John Smith"}, notes="#1323 boundary: a word in front of the pair speaks for " - "nothing (rules/C5); only credentials behind it do"), + "nothing (rules/C5); only credentials behind it do. " + "Spelled with 'RA' until #1483 gave ra a name reading; " + "'VC' reads as 'RA' did under 1.4.0, 2.2.0 and 2.3.0"), Case("two_caps_behind_a_member_with_nothing_behind_stay_initials", "John Smith, MA MJ", {"given": "MA", "middle": "MJ", "family": "John Smith"}, @@ -7499,10 +7719,12 @@ def _check_cjk_shape_purity(self) -> None: "part's, written in capitals too; only words behind the " "pair speak for it (rules/C5)"), Case("two_caps_behind_a_rank_dual_with_a_credential_stay_initials", - "Jane Doe, RA MJ PhD", - {"title": "RA", "given": "MJ", "family": "Jane Doe", + "Jane Doe, LT MJ PhD", + {"title": "LT", "given": "MJ", "family": "Jane Doe", "suffix": "PhD"}, - notes="#1323 boundary: as 'MS BM PhD'"), + notes="#1323 boundary: as 'MS BM PhD'. " + "Spelled with 'RA' until #1483 gave ra a name reading; " + "'LT' reads as 'RA' did under 1.4.0, 2.2.0 and 2.3.0"), Case("two_caps_before_a_capitals_dual_are_a_credential", "Jane Doe, MJ MS", {"given": "Jane", "family": "Doe", "suffix": "MJ MS"}, @@ -12911,8 +13133,8 @@ def _check_cjk_shape_purity(self) -> None: "#601; rules/C10's maiden-marker Accepted entry). 2.0.0 " "through 2.3.0 read maiden 'Jones', stepping past the core"), Case("suffix_delimiter_core_that_survives_is_a_boundary_too", - "Smith, RA | PhD | FACS", - {"title": "RA", "given": "|", "family": "Smith", + "Smith, VC | PhD | FACS", + {"title": "VC", "given": "|", "family": "Smith", "suffix": "PhD | FACS"}, policy=_SD, classification="fix(#602)", @@ -12931,7 +13153,9 @@ def _check_cjk_shape_purity(self) -> None: "#436's predicate asks what stands between the two " "rather than only what was dropped. With ' - ' and no " "policy the string reads the same, the built-in hyphen " - "being no delimiter after a family comma either (#889)"), + "being no delimiter after a family comma either (#889). " + "Spelled with 'RA' until #1483 gave ra a name reading; " + "'VC' reads as 'RA' did under 1.4.0, 2.2.0 and 2.3.0"), Case("semicolon_glued_after_a_whole_name", "John Smith, MD; PhD", {"given": "John", "family": "Smith", "suffix": "MD; PhD"}, classification="fix(semicolon-suffix-delimiter)", @@ -15424,16 +15648,16 @@ def _check_cjk_shape_purity(self) -> None: "piece is ONE WORD: a joined unit led by a title is a " "title run, and handing it back would turn a title into " "a given name and leave the name with no title at all"), - Case("title_run_floor_declines_an_all_suffix_input", "RA DDS", - {"title": "RA", "family": "DDS"}, classification="parity", + Case("title_run_floor_declines_an_all_suffix_input", "VC DDS", + {"title": "VC", "family": "DDS"}, classification="parity", notes="negative control: the word the run would give back is " - "`RA`, which IS suffix vocabulary, so the floor " - "declines. `ra` is title vocabulary too, so the run is " - "`RA` and H1's fold claims `DDS` -- not the bare-suffix " + "`VC`, which IS suffix vocabulary, so the floor " + "declines. `vc` is title vocabulary too, so the run is " + "`VC` and H1's fold claims `DDS` -- not the bare-suffix " "carve-out, which reads the FIRST word as the name and " - "reports `suffix-or-name` (`DDS RA`). Nothing reports " + "reports `suffix-or-name` (`DDS VC`). Nothing reports " "here. Spelled with `MD` until #853 took md out of the " - "titles"), + "titles, and with `RA` until #1483 gave ra a name reading"), Case("title_run_floor_declines_a_split_credential", "Jr. Ph. D.", {"title": "Jr.", "suffix": "Ph. D."}, classification="parity", notes="negative control: `Jr.` is suffix vocabulary wearing " @@ -16858,17 +17082,18 @@ def _check_cjk_shape_purity(self) -> None: "name word to the walk: with a name word in the letter's " "place the connective joins it as the middle name " "('Smith, Maria y Q' reads middle 'y Q')"), - Case("family_comma_title_resets_the_credential_run", "Smith, RA Dr. I", - {"title": "RA Dr.", "given": "I", "family": "Smith"}, + Case("family_comma_title_resets_the_credential_run", "Smith, VC Dr. I", + {"title": "VC Dr.", "given": "I", "family": "Smith"}, notes="THE RESET. A title ends the run: what follows a bare " "title is not continuing a credential, so the numeral " "behind it does not join and the segment is no run at " "all, leaving the walk to read the dual and the title as " "the given part's titles and 'I' as its given name. " - "Without the reset the numeral continues the 'RA' in " + "Without the reset the numeral continues the 'VC' in " "front of the title and the part reads title 'Dr.', " - "suffix 'RA I'. Spelled with a dual since #603, 'MD' " - "until #853 took md out of the titles and 'RA' since: " + "suffix 'VC I'. Spelled with a dual since #603, 'MD' " + "until #853 took md out of the titles, 'RA' until #1483 " + "gave ra a name reading, and 'VC' since: " "'Smith, PSM Dr. I', this row until then, is a part the " "credential 'PSM' OPENS, which reads as #602's run reads " "whatever stands behind it (rules/C13) -- title 'Dr.', " diff --git a/tests/v2/pipeline/test_pieces.py b/tests/v2/pipeline/test_pieces.py index 606971409..3fbd8b221 100644 --- a/tests/v2/pipeline/test_pieces.py +++ b/tests/v2/pipeline/test_pieces.py @@ -133,7 +133,7 @@ def test_strict_ends_the_run_at_the_initial_shaped_numeral() -> None: the opened part takes it in all the same, and hands it to the caller to report. """ - pieces, ptags, tokens, one_case = _comma_part("Smith, RA I") + pieces, ptags, tokens, one_case = _comma_part("Smith, VC I") args = (pieces, ptags, tokens) assert segment_suffix_reading(*args, True, one_case) == (True, True) assert segment_suffix_reading(*args, False, one_case) is None @@ -176,21 +176,21 @@ def test_a_dual_in_the_leading_title_run_turns_the_anchor_off() -> None: as the parent did, its given slot's company starting past the given name. A plain title does not do this, and a dual behind a credential anchors like any suffix word.""" - for text in ("Smith, Ms Ma", "Smith, Ms RA Ma", "Smith, RA PhD Ma", - "Smith, RA MS Ma", "SMITH, RA MS BA", - "Smith, Prof. RA Ma", "smith, prof. ra ma", - "Smith, Dr. RA PhD Ma"): + for text in ("Smith, Ms Ma", "Smith, Ms VC Ma", "Smith, VC PhD Ma", + "Smith, VC MS Ma", "SMITH, VC MS BA", + "Smith, Prof. VC Ma", "smith, prof. vc ma", + "Smith, Dr. VC PhD Ma"): assert _comma_part_reading(text)[0] is None, text assert _comma_part_reading("Smith, Dr. PhD LAc") == ( (False, True, True), [2]) assert _comma_part_reading("Smith, PhD Ms Ma") == ( (True, True, True), [2]) # with no member to anchor, the dual reads as the suffix it is - assert _comma_part_reading("Smith, RA PhD") == ((True, True), []) + assert _comma_part_reading("Smith, VC PhD") == ((True, True), []) # and the walk's given slot, past the given name, reads its own # company as behind any given name - assert parse("Smith, RA PhD Jr Ma").suffix == "Jr Ma" - assert parse("Smith, RA PhD Jr Ma").given == "PhD" + assert parse("Smith, VC PhD Jr Ma").suffix == "Jr Ma" + assert parse("Smith, VC PhD Jr Ma").given == "PhD" def _leading(text: str) -> int: @@ -223,7 +223,7 @@ def test_the_leading_run_declines_to_give_back_a_suffix_word() -> None: what leaves the whole-segment carve-out and the all-title inputs exactly as they were. """ - assert _leading("RA DDS") == 1 # 'RA' is suffix vocabulary + assert _leading("VC DDS") == 1 # 'VC' is suffix vocabulary ('RA' until #1483 took ra out of the titles) assert _leading("Jr. Ph. D.") == 1 # so is 'Jr.' assert _leading("Marquess of Bath") == 1 # nothing behind the run assert _leading("Dr.") == 1 # the whole-segment carve-out @@ -581,10 +581,10 @@ def test_a_multi_letter_numeral_anchors_like_any_suffix_word() -> None: def test_the_anchor_pass_starts_past_the_leading_title_run() -> None: # a title/suffix dual opening the given part is a title there and # anchors nothing, at the given slot and in the part read whole - assert parse("Smith, RA MA Ma").middle == "Ma" + assert parse("Smith, VC MA Ma").middle == "Ma" assert parse("Smith, Ms Ma").given == "Ma" # past that position the same dual anchors - assert parse("John Smith RA MEng").suffix == "RA MEng" + assert parse("John Smith VC MEng").suffix == "VC MEng" def test_the_given_slot_asks_the_anchor_only_when_the_writing_declines( diff --git a/tests/v2/pipeline/test_post_rules.py b/tests/v2/pipeline/test_post_rules.py index efe75c5a8..575168e47 100644 --- a/tests/v2/pipeline/test_post_rules.py +++ b/tests/v2/pipeline/test_post_rules.py @@ -2082,7 +2082,7 @@ def test_a_joined_credential_reads_as_its_spelling_written_apart() -> None: #: credential settles the member in its clause (rules/S1), so the two #: spellings read alike in every shape. Fields only, as above. _MEMBERS = ("MA", "Ma", "M.A", "MBA", "Ed", "KC", "JD") -_SETTLERS = ("PhD", "MD", "RN", "Esq", "NP-C", "MS", "RA") +_SETTLERS = ("PhD", "MD", "RN", "Esq", "NP-C", "MS", "VC") #: How many rows' two spellings read differently with `set_apart_kind` #: reading a joined word holding a member as a plain suffix, the @@ -2091,7 +2091,10 @@ def test_a_joined_credential_reads_as_its_spelling_written_apart() -> None: #: Each is a joined pair inside or before a name word, set apart where #: its spelling written apart stays the nickname. 'MS' and 'RA', words #: that are titles too, joined the settlers after the second review -#: found them settling a joined member and not a clause one. +#: found them settling a joined member and not a clause one; 'VC' took +#: RA's place when #1483 made ra a title only inside a phrase, which had +#: moved this control to 1632, unseen, and with VC it reads 1608 again +#: (re-taken 2026-11-21). _UNGUARDED_MEMBER_PAIRS_1138 = 1608 #: How many (pair, shape, order) rows the member invariant reads. diff --git a/tests/v2/test_benchmark.py b/tests/v2/test_benchmark.py index 60be8ad36..7a1a9015a 100644 --- a/tests/v2/test_benchmark.py +++ b/tests/v2/test_benchmark.py @@ -1137,7 +1137,8 @@ def test_a_clause_link_run_does_not_cost_quadratically() -> None: # k=32 on this tree (3.7x), against 120 and 1,620 at 47fb2b21 (13.5x), # where every pair rescanned. The dual was 'MD' until #853 took md out # of the titles; re-taken with 'RA' on 2026-10-23, 35 and 131 on the -# tree (3.7x) and 120 and 1,620 at 47fb2b21 again. A change to what the scan calls must +# tree (3.7x) and 120 and 1,620 at 47fb2b21 again, and with 'VC' on +# 2026-11-21, when #1483 gave ra a name reading, the same four counts. A change to what the scan calls must # move `only=` with it, and re-take that negative control. _PAIR_SCAN_SMALL = 8 _PAIR_SCAN_LARGE = 32 @@ -1147,12 +1148,12 @@ def test_a_clause_link_run_does_not_cost_quadratically() -> None: def test_the_paired_initials_title_scan_does_not_cost_quadratically() -> None: if sys.getprofile() is not None: pytest.skip("a profile hook is already installed; this test owns it") - small_text = "John Smith, " + "RA " * _PAIR_SCAN_SMALL + "G.J. " * _PAIR_SCAN_SMALL - large_text = "John Smith, " + "RA " * _PAIR_SCAN_LARGE + "G.J. " * _PAIR_SCAN_LARGE + small_text = "John Smith, " + "VC " * _PAIR_SCAN_SMALL + "G.J. " * _PAIR_SCAN_SMALL + large_text = "John Smith, " + "VC " * _PAIR_SCAN_LARGE + "G.J. " * _PAIR_SCAN_LARGE # REACHABILITY: the flip REPORTS only where the scan ran and found # nothing but titles in front of the first pair, every shape word # being a pair (rules/C11's "nothing but other paired initials"). - # A change that stopped the scan being asked -- 'RA' leaving the + # A change that stopped the scan being asked -- 'VC' leaving the # titles, the pair test moving -- loses the report and fails here # rather than leaving this guard measuring nothing. for text, k in ((small_text, _PAIR_SCAN_SMALL), diff --git a/tests/v2/test_cases.py b/tests/v2/test_cases.py index c98985913..2953dc943 100644 --- a/tests/v2/test_cases.py +++ b/tests/v2/test_cases.py @@ -530,9 +530,12 @@ def test_the_field_sweep_sees_the_claims_it_checks() -> None: # suffix-or-name under three orders; 2296 -> 2321 the same day, its # test review's eight rows under three orders and its family-first # row under its declared policy; 2321 -> 2330 the same day, #1128's - # reporting rows. - assert claims == 2330, ( - f"the field sweep checks {claims} claims, recorded as 2330 on " + # reporting rows; 2330 -> 2342 the same day, #1483's `ra` rows + # reporting suffix-or-name; 2342 -> 2367 the same day, its review's + # comma, order and spelling rows; 2367 -> 2373 the same day, its + # second review's 'SMITH, RA MD' and 'Smith, RA John'. + assert claims == 2373, ( + f"the field sweep checks {claims} claims, recorded as 2373 on " f"2026-11-21") @@ -1034,8 +1037,10 @@ def test_the_alternative_sweep_sees_the_fields_it_checks() -> None: # day, its review's 'PETR JAN DIS' under three orders; 632 -> 647 on # 2026-11-21, #1517's five caps-shape rows under three orders, # 'Smith, M.B. ChB' being a stand-in reread; 647 -> 669 the same - # day, its test review's rows - assert (checked, skipped) == (669, 512), (checked, skipped) + # day, its test review's rows; 669 -> 672 the same day, #1483's + # `ra` rows reporting suffix-or-name; 672 -> 675 the same day, its + # review's rows + assert (checked, skipped) == (675, 512), (checked, skipped) def test_every_case_name_is_unique() -> None: diff --git a/tests/v2/test_locales.py b/tests/v2/test_locales.py index 57a020674..4d488128a 100644 --- a/tests/v2/test_locales.py +++ b/tests/v2/test_locales.py @@ -988,7 +988,10 @@ def test_my_pack_contents() -> None: ("THEIN AUNG EI", "THEIN", "AUNG", "EI", ""), ("THEIN AUNG SI", "THEIN", "AUNG", "SI", ""), ("THEIN AUNG PA", "THEIN", "AUNG", "PA", ""), - ("Thein Aung Ra", "Thein", "Aung", "Ra", ""), + # 'Thein Aung Ra' stood here until #1483 gave ra a name reading, + # which reads it so with no choice; in capitals the default still + # reads the credential, no case speaking for the name + ("THEIN AUNG RA", "THEIN", "AUNG", "RA", ""), ("AUNG SAN WIN", "AUNG", "SAN", "WIN", ""), ("Win, Aung San", "Aung", "San", "Win", ""), (", AUNG PE", "AUNG", "PE", "", ""), diff --git a/tests/v2/test_name_usage_tool.py b/tests/v2/test_name_usage_tool.py index 2ce8b21d5..4570620a2 100644 --- a/tests/v2/test_name_usage_tool.py +++ b/tests/v2/test_name_usage_tool.py @@ -1985,18 +1985,20 @@ def test_main_exits_2_on_an_unusable_tally_without_losing_the_other_sources( def test_main_rank_lists_credentials_with_vocabulary_and_readings( monkeypatch: pytest.MonkeyPatch, tmp_path: Path, capsys: pytest.CaptureFixture[str]) -> None: - # Q-R-S still reverses after a comma: joined single letters are no + # VC is a title/suffix dual ('RA' stood here until #1483 gave ra a + # name reading, its vocabulary then 'ambiguous acronym'). Q-R-S + # still reverses after a comma: joined single letters are no # caps shape (rules/S9), so the given-name readout stays exercised - _cache_tally(monkeypatch, tmp_path, _tally(RA=50, **{"Q-R-S": 40}, ESQ=3)) + _cache_tally(monkeypatch, tmp_path, _tally(VC=50, **{"Q-R-S": 40}, ESQ=3)) assert tool.main(["--no-wikidata", "--json", "--rank", "5"]) == 0 rows = {r["credential"]: r for r in json.loads(capsys.readouterr().out)["rows"]} assert [r["rank"] for r in rows.values()] == [1, 2, 3] - assert rows["RA"]["vocabulary"] == "acronym, title" - assert (rows["RA"]["after_comma"], rows["RA"]["bare"]) == ("suffix", "suffix") + assert rows["VC"]["vocabulary"] == "acronym, title" + assert (rows["VC"]["after_comma"], rows["VC"]["bare"]) == ("suffix", "suffix") assert rows["Q-R-S"]["vocabulary"] == "-" assert (rows["Q-R-S"]["after_comma"], rows["Q-R-S"]["bare"]) == ("given", "family") assert rows["ESQ"]["vocabulary"] == "suffix word" - assert rows["RA"]["census"] == "not downloaded" + assert rows["VC"]["census"] == "not downloaded" def test_main_rank_unlisted_keeps_each_credentials_overall_rank( diff --git a/tests/v2/test_parser.py b/tests/v2/test_parser.py index ba01baef0..67a14bbbe 100644 --- a/tests/v2/test_parser.py +++ b/tests/v2/test_parser.py @@ -3389,12 +3389,13 @@ def test_a_choice_that_changes_nothing_leaves_the_sets_as_they_are() -> None: {"middle": "Do", "family": "Hyun"}), (("ko",), "Kim Bin Hyun", {"family": "Bin Hyun"}, # ar's and ms's {"middle": "Bin", "family": "Hyun"}), - (("ko",), "Ra Min Jun", {"title": "Ra"}, # de's academic title - {"given": "Ra", "title": ""}), - (("ko",), "Kim Min Ra", {"suffix": "Ra"}, # en's credential - {"family": "Ra", "suffix": ""}), + # en's credential; 'Kim Min Ra' stood here, and 'Ra Min Jun' for + # de's academic title, until #1483 gave ra ko.toml's name readings, + # which read it as a name with no choice + (("ko",), "Kim Min Ae", {"suffix": "Ae"}, + {"family": "Ae", "suffix": ""}), # what adding en costs: its credential is back - (("ko", "en"), "Kim Min Ra", {"suffix": "Ra"}, {"suffix": "Ra"}), + (("ko", "en"), "Kim Min Ae", {"suffix": "Ae"}, {"suffix": "Ae"}), # en's rank; 'Gen Hoshino' stood here until #999 made 'gen' a # title only in a phrase, which reads given 'Gen' with no choice (("ja",), "Capt Hoshino", {"title": "Capt"}, {"given": "Capt"}), @@ -3589,9 +3590,62 @@ def test_a_strict_choice_keeps_a_callers_readings_over_the_union( == parser_for(_choosing("ko", "en"), strict=True).lexicon) +@pytest.mark.parametrize("strict,text,fields", [ + # de.toml's own credential reading keeps RA the credential after the + # name, which a plain German choice would otherwise lose: choosing de + # turns en.toml's credential off, de.toml holding a vocabulary + # reading of the word, while ko.toml's name readings stay on, and a + # lone RA after a comma read as the given name, making the comma a + # family comma and reversing the name ('Hans Müller, RA' -> given + # 'RA', family 'Hans Müller') (#1483) + (False, "Hans Müller, RA", + {"given": "Hans", "family": "Müller", "suffix": "RA"}), + (False, "Müller, RA", {"family": "Müller", "suffix": "RA"}), + (False, "Hans Müller, LL.M., RA", + {"given": "Hans", "family": "Müller", "suffix": "LL.M., RA"}), + (False, "Hans Müller RA", + {"given": "Hans", "family": "Müller", "suffix": "RA"}), + (False, "Hans Müller, Dr., RA", + {"title": "Dr.", "given": "Hans", "family": "Müller", "suffix": "RA"}), + (False, "Jane Doe, PT, RA", + {"given": "Jane", "family": "Doe", "suffix": "PT, RA"}), + # in front a plain choice reads the name reading, as the default does, + # a title behind it falling into the middle name; in capitals after a + # family comma it is the given name, no case speaking for the + # credential + (False, "RA Müller", {"given": "RA", "family": "Müller"}), + (False, "RA Dr. Hans Müller", + {"given": "RA", "middle": "Dr. Hans", "family": "Müller"}), + (False, "KING, RA", {"given": "RA", "family": "KING"}), + # a strict choice reads no ko.toml: the title in front, the + # credential behind + (True, "RA Müller", {"title": "RA", "family": "Müller"}), + (True, "RA Dr. Hans Müller", + {"title": "RA Dr.", "given": "Hans", "family": "Müller"}), + (True, "Hans Müller, RA", + {"given": "Hans", "family": "Müller", "suffix": "RA"}), + (True, "Jane Doe, PT, RA", + {"given": "Jane", "family": "Doe", "suffix": "PT, RA"}), + (True, "KING, RA", {"family": "KING", "suffix": "RA"}), + # its cost: a Korean surname ending a name is the credential again, + # as the default read it before #1483 + (True, "Kim Ra", {"given": "Kim", "suffix": "Ra"}), +]) +def test_a_german_choice_reads_ra_after_the_name_as_the_credential( + strict: bool, text: str, fields: dict[str, str]) -> None: + name = parser_for(_choosing("de"), strict=strict).parse(text) + got = {f: getattr(name, f) for f in + ("title", "given", "middle", "family", "suffix") if getattr(name, f)} + assert got == fields + + def test_a_packs_fragment_is_unioned_on_after_the_strict_compile() -> None: - pack = _choosing("ko", lexicon=Lexicon.empty().add("ra", kind="credential")) - assert parser_for(pack, strict=True).parse("Kim Min Ra").suffix == "Ra" + # a word no file holds, so only the fragment can read it ('ra' stood + # here until #1483 gave it ko.toml's name readings, which gate it) + pack = _choosing("ko", lexicon=Lexicon.empty().add("zzq", kind="credential")) + assert parser_for(pack, strict=True).parse("Kim Min Zzq").suffix == "Zzq" + assert parser_for(_choosing("ko"), strict=True).parse( + "Kim Min Zzq").suffix == "" def _choice_tags() -> list[tuple[str, bool]]: diff --git a/tests/v2/test_properties.py b/tests/v2/test_properties.py index ea9f6aa5b..af0c05ce6 100644 --- a/tests/v2/test_properties.py +++ b/tests/v2/test_properties.py @@ -470,7 +470,7 @@ def test_an_empty_head_reads_as_its_family_comma_twin() -> None: #: title/suffix duals, period-marked suffix words H2 reads as titles, #: and a plain name and a plain title beside them. _OPENERS = ("Md", "MD", "Cem", "JP", "A.M.", "M.S.", "Junior", "Jr", "PhD", - "II", "Mdiv", "Sr.", "Ms", "RA", "Jr.", "Esq.", "Md.", "Sam", + "II", "Mdiv", "Sr.", "Ms", "VC", "Jr.", "Esq.", "Md.", "Sam", "Dr.") _OPENED_BODIES = ("Rahman", "van der Berg", "Smith Jones", "(Bob) Rahman", "Rahman nee Khan", "de la Vega") @@ -489,7 +489,8 @@ def test_a_head_before_a_credential_reads_as_it_does_alone() -> None: Negative control, recorded 2026-11-02 on master at c1ceb3b3, before C3 counted an opening suffix word: 1,062 of the 2,052 rows differed - from the head alone.""" + from the head alone; the same at c1ceb3b3 with 'VC' in the openers + in place of 'RA', re-taken 2026-11-21 (#1483).""" rows = 0 differ = [] for order in (GIVEN_FIRST, FAMILY_FIRST, FAMILY_FIRST_GIVEN_LAST): diff --git a/tests/v2/test_reading_index.py b/tests/v2/test_reading_index.py index 674c70a9a..4e799cdd4 100644 --- a/tests/v2/test_reading_index.py +++ b/tests/v2/test_reading_index.py @@ -392,7 +392,11 @@ def test_a_file_holding_only_familiar_readings_is_chosen_only_strictly( #: tags on 2026-10-31; the strict-gap batches of 2026-11-03 moved it, and #: #345 added hi's sushri, its Odia given name in or.toml; #1483 my's #: ranks, whose given names only en.toml writes; #1463 took off ar's cheikh -#: and ms's sultan, each given a given reading in its file). A +#: and ms's sultan, each given a given reading in its file; de's and +#: en's ra, whose name readings only ko.toml writes, #1483 on +#: 2026-11-21, a strict German or English choice reading the +#: credential as master's default did, and a strict German one the +#: title in front). A #: word leaves this table when a name reading is written in the chosen #: file whose names carry it, and joins it when a chosen file's #: vocabulary reading loses its gate: review each move. @@ -400,6 +404,8 @@ def test_a_file_holding_only_familiar_readings_is_chosen_only_strictly( "ar": {"ben"}, "ca": {"del", "la"}, "cs": {"st"}, + "de": {"ra"}, + "en": {"ra"}, "fil": {"del", "la", "san"}, "fr": {"la", "marquis", "marquise", "saint", "st"}, "ga": {"mac"}, diff --git a/tools/differential/cldr_agreement.json b/tools/differential/cldr_agreement.json index 3d0628794..410160526 100644 --- a/tools/differential/cldr_agreement.json +++ b/tools/differential/cldr_agreement.json @@ -6862,6 +6862,10 @@ "text": "фон Брюль Ада Корнелия Сезар Мартин, к. м. н." }, "sc/foreignFull/givenFirst": { + "given_names": { + "expected": "Maria Giusepa Juana Teresa", + "got": "Dut.ra Prof.ra Maria Giusepa Juana Teresa" + }, "surname1_base": { "expected": "Brühl", "got": "Brühl González Domingo" @@ -6870,7 +6874,11 @@ "expected": "González Domingo", "got": "" }, - "text": "Dut.ra Prof.ra Maria Giusepa Juana Teresa von Brühl González Domingo" + "text": "Dut.ra Prof.ra Maria Giusepa Juana Teresa von Brühl González Domingo", + "title": { + "expected": "Dut.ra Prof.ra", + "got": "" + } }, "sc/foreignFull/surnameFirst": { "family": { diff --git a/tools/differential/corpus_rules.jsonl b/tools/differential/corpus_rules.jsonl index 858ba0886..b7166386e 100644 --- a/tools/differential/corpus_rules.jsonl +++ b/tools/differential/corpus_rules.jsonl @@ -921,8 +921,8 @@ "John Smith Jr. Jones" "John Smith Jr. PhD Jones" "John Smith Jr. Prof." -"John Smith Jr., AD RA" "John Smith Jr., AD Sr. and Mr." +"John Smith Jr., AD VC" "John Smith Jr., J." "John Smith Jr., M.J." "John Smith Jr., MBChB PhD" @@ -1104,10 +1104,10 @@ "John Smith, Phd-Md" "John Smith, Prof. - of Surgery" "John Smith, Pu-Ph" -"John Smith, RA Jones" -"John Smith, RA MJ" "John Smith, V." "John Smith, V; MD" +"John Smith, VC Jones" +"John Smith, VC MJ" "John Smith, Vice" "John Smith, X.Y. P.Q." "John Smith, X.Y.Z." @@ -1540,8 +1540,6 @@ "Queen Elizabeth II" "Queen Mother Elizabeth" "R S Lakshmi" -"RA DDS" -"RA PhD Jr., John" "RAHMAN, MD" "RAHMAN, MD ABDUL" "RAHMAN, MD." @@ -1549,7 +1547,7 @@ "RAM BAHADUR B.K." "RITA DE CASSIA SOUZA" "ROB ROY MACGREGOR" -"ROBERT (RA) ALLEN" +"ROBERT (VC) ALLEN" "RONALD MACDONALD" "Rahim @ Jaki Osman" "Rahim @ Jaki PhD bin Osman" @@ -1603,7 +1601,7 @@ "Rewati Od (Mahar)" "Rinehart, J.D. Jr." "Rinpoche" -"Robert (RA) Allen" +"Robert (VC) Allen" "Roman A. Abramovich" "Ronald Macdonald" "Royce, Ed" @@ -1812,13 +1810,13 @@ "Smith, PhD MEng" "Smith, PhD Ma" "Smith, Pharm D" -"Smith, RA PhD Ma" "Smith, RN - CRNA" "Smith, Sgt Major" "Smith, Sir" "Smith, Sr." "Smith, U.S. Senator John" "Smith, V; MD" +"Smith, VC PhD Ma" "Smith, Van V" "Smith, XYZ" "Smith, de Mesnil Jean" @@ -1881,6 +1879,8 @@ "VAN DER WALT" "VAN GOGH VINCENT" "VAN TER HORST" +"VC DDS" +"VC PhD Jr., John" "VI, AD" "Van Berg Jan de" "Van Buren, Ed" diff --git a/tools/differential/corpus_shapes.jsonl b/tools/differential/corpus_shapes.jsonl index be4c21b53..0871f01a2 100644 --- a/tools/differential/corpus_shapes.jsonl +++ b/tools/differential/corpus_shapes.jsonl @@ -260,10 +260,10 @@ {"name": "Smith, MEng", "shape": 2} {"name": "Smith, Ma", "shape": 2} {"name": "Smith, Ms Ma", "shape": 2} -{"name": "Smith, Ms RA Ma", "shape": 2} +{"name": "Smith, Ms VC Ma", "shape": 2} {"name": "Smith, PhD MEng", "shape": 2} {"name": "Smith, PhD Ma", "shape": 2} -{"name": "Smith, RA PhD Ma", "shape": 2} +{"name": "Smith, VC PhD Ma", "shape": 2} {"name": "Smith, meng", "shape": 2} {"name": "Uddin, Mr Md Karim", "shape": 2} {"name": "Van Buren, Ed", "shape": 2} diff --git a/tools/differential/snapshot.jsonl b/tools/differential/snapshot.jsonl index 12e3ee670..1c5b15446 100644 --- a/tools/differential/snapshot.jsonl +++ b/tools/differential/snapshot.jsonl @@ -759,7 +759,7 @@ {"name": "DUPONT Mary", "given": "DUPONT", "family": "Mary", "initials": "D. M.", "capitalized_force": "Dupont Mary"} {"name": "DUPONT Mary Ann", "given": "DUPONT", "middle": "Mary", "family": "Ann", "initials": "D. M. A.", "capitalized_force": "Dupont Mary Ann"} {"name": "DUPONT Mary y", "given": "DUPONT", "family": "Mary y", "initials": "D. M.", "capitalized_force": "Dupont Mary y"} -{"name": "DUT.RA MARIA SILVA", "title": "DUT.RA", "given": "MARIA", "family": "SILVA", "initials": "M. S.", "capitalized": "Dut.Ra Maria Silva"} +{"name": "DUT.RA MARIA SILVA", "given": "DUT.RA", "middle": "MARIA", "family": "SILVA", "initials": "D. M. S.", "capitalized": "Dut.Ra Maria Silva"} {"name": "Dale, Antonius van", "given": "Antonius", "family": "van Dale", "ambiguities": ["PARTICLE_OR_GIVEN"], "alternatives": ["PARTICLE_OR_GIVEN: name as middle (declared)"], "initials": "A. D."} {"name": "Dalen, Cornelis van", "given": "Cornelis", "family": "van Dalen", "ambiguities": ["PARTICLE_OR_GIVEN"], "alternatives": ["PARTICLE_OR_GIVEN: name as middle (declared)"], "initials": "C. D."} {"name": "Dame Mary", "title": "Dame", "given": "Mary", "initials": "M."} @@ -1098,7 +1098,7 @@ {"name": "Dumreicher, Johann von", "given": "Johann", "family": "von Dumreicher", "ambiguities": ["PARTICLE_OR_GIVEN"], "alternatives": ["PARTICLE_OR_GIVEN: name as middle (declared)"], "initials": "J. D."} {"name": "Dupont J.-P.", "given": "Dupont", "family": "J.-P.", "initials": "D. J."} {"name": "Dupont, MARY", "given": "MARY", "family": "Dupont", "initials": "M. D.", "capitalized_force": "Mary Dupont"} -{"name": "Dut.ra Prof.ra Maria Giusepa Juana Teresa von Brühl González Domingo", "title": "Dut.ra Prof.ra", "given": "Maria", "middle": "Giusepa Juana Teresa", "family": "von Brühl González Domingo", "initials": "M. G. J. T. B. G. D.", "capitalized_force": "Dut.Ra Prof.Ra Maria Giusepa Juana Teresa von Brühl González Domingo"} +{"name": "Dut.ra Prof.ra Maria Giusepa Juana Teresa von Brühl González Domingo", "given": "Dut.ra", "middle": "Prof.ra Maria Giusepa Juana Teresa", "family": "von Brühl González Domingo", "initials": "D. P. M. G. J. T. B. G. D.", "capitalized_force": "Dut.Ra Prof.Ra Maria Giusepa Juana Teresa von Brühl González Domingo"} {"name": "Dòmhnall Iain Tormod Caimbeul", "given": "Dòmhnall", "middle": "Iain Tormod", "family": "Caimbeul", "initials": "D. I. T. C."} {"name": "Dóra Mátrai", "given": "Dóra", "family": "Mátrai", "initials": "D. M."} {"name": "Dóra Sigurðsson", "given": "Dóra", "family": "Sigurðsson", "initials": "D. S."} @@ -2242,8 +2242,8 @@ {"name": "John Smith Jr. Jones", "given": "John", "middle": "Smith Jr.", "family": "Jones", "initials": "J. S. J. J."} {"name": "John Smith Jr. PhD Jones", "given": "John", "family": "Smith", "suffix": "Jr. PhD Jones", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: name as family (position)"], "initials": "J. S.", "generation": "Jr.", "credentials": "PhD Jones"} {"name": "John Smith Jr. Prof.", "title": "Prof.", "given": "John", "family": "Smith", "suffix": "Jr.", "initials": "J. S.", "generation": "Jr."} -{"name": "John Smith Jr., AD RA", "given": "John", "family": "Smith", "suffix": "Jr., AD RA", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: name as given (position)"], "initials": "J. S.", "generation": "Jr.", "credentials": "AD RA"} {"name": "John Smith Jr., AD Sr. and Mr.", "title": "Sr. and Mr.", "given": "John", "family": "Smith", "suffix": "Jr., AD", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: name as given (position)"], "initials": "J. S.", "generation": "Jr.", "credentials": "AD"} +{"name": "John Smith Jr., AD VC", "given": "John", "family": "Smith", "suffix": "Jr., AD VC", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: name as given (position)"], "initials": "J. S.", "generation": "Jr.", "credentials": "AD VC"} {"name": "John Smith Jr., J.", "given": "J.", "family": "John Smith", "suffix": "Jr.", "initials": "J. J. S.", "generation": "Jr."} {"name": "John Smith Jr., M.J.", "given": "M.", "middle": "J.", "family": "John Smith", "suffix": "Jr.", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: credential as suffix (shape)"], "initials": "M. J. J. S.", "generation": "Jr."} {"name": "John Smith Jr., MBChB PhD", "given": "John", "family": "Smith", "suffix": "Jr., MBChB PhD", "initials": "J. S.", "generation": "Jr.", "credentials": "MBChB PhD"} @@ -2449,13 +2449,13 @@ {"name": "John Smith, Phd-Md", "given": "Phd-Md", "family": "John Smith", "initials": "P. J. S.", "capitalized_force": "PhD-Md John Smith"} {"name": "John Smith, Prof. - of Surgery", "title": "Prof. of Surgery", "given": "John", "family": "Smith", "initials": "J. S."} {"name": "John Smith, Pu-Ph", "given": "Pu-Ph", "family": "John Smith", "initials": "P. J. S."} -{"name": "John Smith, RA Jones", "title": "RA", "given": "Jones", "family": "John Smith", "initials": "J. J. S.", "capitalized_force": "Ra Jones John Smith"} -{"name": "John Smith, RA MJ", "title": "RA", "given": "MJ", "family": "John Smith", "initials": "M. J. S.", "capitalized_force": "Ra Mj John Smith"} {"name": "John Smith, RAI", "given": "John", "family": "Smith", "suffix": "RAI", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: name as given (position)"], "initials": "J. S."} {"name": "John Smith, V Jr.", "given": "John", "family": "Smith", "suffix": "V Jr.", "initials": "J. S.", "generation": "V Jr."} {"name": "John Smith, V MD", "given": "John", "family": "Smith", "suffix": "V MD", "initials": "J. S.", "generation": "V", "credentials": "MD"} {"name": "John Smith, V.", "given": "John", "family": "Smith", "suffix": "V.", "initials": "J. S.", "generation": "V."} {"name": "John Smith, V; MD", "given": "John", "family": "Smith", "suffix": "V; MD", "initials": "J. S.", "generation": "V;", "credentials": "MD"} +{"name": "John Smith, VC Jones", "title": "VC", "given": "Jones", "family": "John Smith", "initials": "J. J. S.", "capitalized_force": "Vc Jones John Smith"} +{"name": "John Smith, VC MJ", "title": "VC", "given": "MJ", "family": "John Smith", "initials": "M. J. S.", "capitalized_force": "Vc Mj John Smith"} {"name": "John Smith, Vice", "title": "Vice", "given": "John", "family": "Smith", "initials": "J. S."} {"name": "John Smith, X.Y. P.Q.", "given": "John", "family": "Smith", "suffix": "X.Y. P.Q.", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: name as given (position)"], "initials": "J. S."} {"name": "John Smith, X.Y.Z.", "given": "John", "family": "Smith", "suffix": "X.Y.Z.", "initials": "J. S."} @@ -3760,8 +3760,6 @@ {"name": "Quincy Adams", "given": "Quincy", "family": "Adams", "initials": "Q. A."} {"name": "Quinquela Martín, Benito", "given": "Benito", "family": "Quinquela Martín", "initials": "B. Q. M."} {"name": "R S Lakshmi", "given": "R", "middle": "S", "family": "Lakshmi", "initials": "R. S. L."} -{"name": "RA DDS", "title": "RA", "family": "DDS", "initials": "D.", "capitalized": "Ra Dds"} -{"name": "RA PhD Jr., John", "given": "John", "family": "RA", "suffix": "PhD Jr.", "initials": "J. R.", "capitalized_force": "John Ra PhD Jr.", "generation": "Jr.", "credentials": "PhD"} {"name": "RAHMAN, MD", "family": "RAHMAN", "suffix": "MD", "initials": "R.", "capitalized": "Rahman, MD"} {"name": "RAHMAN, MD ABDUL", "given": "MD", "middle": "ABDUL", "family": "RAHMAN", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: credential as suffix (vocabulary)"], "initials": "M. A. R.", "capitalized": "Md Abdul Rahman"} {"name": "RAHMAN, MD.", "family": "RAHMAN", "suffix": "MD.", "initials": "R.", "capitalized": "Rahman, MD."} @@ -3769,7 +3767,7 @@ {"name": "RAM BAHADUR B.K.", "given": "RAM", "middle": "BAHADUR", "family": "B.K.", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: credential as suffix (shape)"], "initials": "R. B. B. K.", "capitalized": "Ram Bahadur B.K."} {"name": "RITA DE CASSIA SOUZA", "given": "RITA", "middle": "DE CASSIA", "family": "SOUZA", "initials": "R. C. S.", "capitalized": "Rita de Cassia Souza"} {"name": "ROB ROY MACGREGOR", "given": "ROB", "middle": "ROY", "family": "MACGREGOR", "initials": "R. R. M.", "capitalized": "Rob Roy MacGregor"} -{"name": "ROBERT (RA) ALLEN", "given": "ROBERT", "family": "ALLEN", "suffix": "RA", "initials": "R. A.", "capitalized": "Robert Allen RA"} +{"name": "ROBERT (VC) ALLEN", "given": "ROBERT", "family": "ALLEN", "suffix": "VC", "initials": "R. A.", "capitalized": "Robert Allen VC"} {"name": "RONALD MACDONALD", "given": "RONALD", "family": "MACDONALD", "initials": "R. M.", "capitalized": "Ronald MacDonald"} {"name": "RONALD MCDONALD", "given": "RONALD", "family": "MCDONALD", "initials": "R. M.", "capitalized": "Ronald McDonald"} {"name": "Rabbi Cohen", "title": "Rabbi", "family": "Cohen", "initials": "C."} @@ -3864,7 +3862,7 @@ {"name": "Rinpoche", "given": "Rinpoche", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: post-nominal as suffix (vocabulary)"], "initials": "R."} {"name": "Rob And Beth Edmunds", "given": "Rob And Beth", "family": "Edmunds", "initials": "R. B. E.", "capitalized_force": "Rob and Beth Edmunds"} {"name": "Rob Edmunds", "given": "Rob", "family": "Edmunds", "initials": "R. E."} -{"name": "Robert (RA) Allen", "given": "Robert", "family": "Allen", "nickname": "RA", "initials": "R. A.", "capitalized_force": "Robert \"Ra\" Allen"} +{"name": "Robert (VC) Allen", "given": "Robert", "family": "Allen", "nickname": "VC", "initials": "R. A.", "capitalized_force": "Robert \"Vc\" Allen"} {"name": "Robert Aitken", "given": "Robert", "family": "Aitken", "initials": "R. A."} {"name": "Robert Morris", "given": "Robert", "family": "Morris", "initials": "R. M."} {"name": "Robert Prince", "given": "Robert", "family": "Prince", "initials": "R. P."} @@ -4272,7 +4270,7 @@ {"name": "Smith, Md XYZ", "family": "Smith", "suffix": "Md XYZ", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: name as given (position)"], "initials": "S.", "capitalized_force": "Smith, MD Xyz"} {"name": "Smith, Ms Jane", "title": "Ms", "given": "Jane", "family": "Smith", "initials": "J. S."} {"name": "Smith, Ms Ma", "title": "Ms", "given": "Ma", "family": "Smith", "initials": "M. S."} -{"name": "Smith, Ms RA Ma", "title": "Ms RA", "given": "Ma", "family": "Smith", "initials": "M. S.", "capitalized_force": "Ms Ra Ma Smith"} +{"name": "Smith, Ms VC Ma", "title": "Ms VC", "given": "Ma", "family": "Smith", "initials": "M. S.", "capitalized_force": "Ms Vc Ma Smith"} {"name": "Smith, Ms.", "family": "Smith", "suffix": "Ms.", "initials": "S.", "capitalized_force": "Smith, MS."} {"name": "Smith, Ms. Jane", "title": "Ms.", "given": "Jane", "family": "Smith", "initials": "J. S."} {"name": "Smith, PSM I", "family": "Smith", "suffix": "PSM I", "initials": "S.", "generation": "I", "credentials": "PSM"} @@ -4292,13 +4290,13 @@ {"name": "Smith, PhD Ma", "family": "Smith", "suffix": "PhD Ma", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: name as given (declared)"], "initials": "S.", "capitalized_force": "Smith, PhD MA"} {"name": "Smith, Pharm D", "given": "Pharm", "middle": "D", "family": "Smith", "initials": "P. D. S."} {"name": "Smith, Prof.", "title": "Prof.", "family": "Smith", "initials": "S."} -{"name": "Smith, RA PhD Ma", "title": "RA", "given": "PhD", "middle": "Ma", "family": "Smith", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: credential as suffix (vocabulary)"], "initials": "P. M. S.", "capitalized_force": "Ra PhD Ma Smith"} {"name": "Smith, RN - CRNA", "family": "Smith", "suffix": "RN - CRNA", "initials": "S."} {"name": "Smith, Sgt Major", "title": "Sgt Major", "family": "Smith", "initials": "S."} {"name": "Smith, Sir", "title": "Sir", "given": "Smith", "initials": "S."} {"name": "Smith, Sr.", "family": "Smith", "suffix": "Sr.", "initials": "S.", "generation": "Sr."} {"name": "Smith, U.S. Senator John", "title": "U.S. Senator", "given": "John", "family": "Smith", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: credential as suffix (shape)"], "initials": "J. S."} {"name": "Smith, V; MD", "given": "V;", "family": "Smith", "suffix": "MD", "initials": "V. S."} +{"name": "Smith, VC PhD Ma", "title": "VC", "given": "PhD", "middle": "Ma", "family": "Smith", "ambiguities": ["SUFFIX_OR_NAME"], "alternatives": ["SUFFIX_OR_NAME: credential as suffix (vocabulary)"], "initials": "P. M. S.", "capitalized_force": "Vc PhD Ma Smith"} {"name": "Smith, Van V", "given": "Van", "family": "Smith", "suffix": "V", "initials": "V. S.", "generation": "V"} {"name": "Smith, XYZ", "given": "XYZ", "family": "Smith", "initials": "X. S.", "capitalized_force": "Xyz Smith"} {"name": "Smith, de Mesnil Jean", "family": "Smith de Mesnil Jean", "initials": "S. M. J."} @@ -4536,6 +4534,8 @@ {"name": "VAN DER WALT", "given": "VAN", "family": "DER WALT", "ambiguities": ["PARTICLE_OR_GIVEN"], "alternatives": ["PARTICLE_OR_GIVEN: particle as family (vocabulary)"], "initials": "V. W.", "capitalized": "Van der Walt"} {"name": "VAN GOGH VINCENT", "given": "VAN", "middle": "GOGH", "family": "VINCENT", "ambiguities": ["PARTICLE_OR_GIVEN"], "alternatives": ["PARTICLE_OR_GIVEN: particle as family (vocabulary)"], "initials": "V. G. V.", "capitalized": "Van Gogh Vincent"} {"name": "VAN TER HORST", "given": "VAN", "family": "TER HORST", "ambiguities": ["PARTICLE_OR_GIVEN"], "alternatives": ["PARTICLE_OR_GIVEN: particle as family (vocabulary)"], "initials": "V. H.", "capitalized": "Van ter Horst"} +{"name": "VC DDS", "title": "VC", "family": "DDS", "initials": "D.", "capitalized": "Vc Dds"} +{"name": "VC PhD Jr., John", "given": "John", "family": "VC", "suffix": "PhD Jr.", "initials": "J. V.", "capitalized_force": "John Vc PhD Jr.", "generation": "Jr.", "credentials": "PhD"} {"name": "VI, AD", "given": "AD", "family": "VI", "initials": "A. V.", "capitalized": "Ad Vi"} {"name": "VINCENT VAN GOGH", "given": "VINCENT", "family": "VAN GOGH", "initials": "V. G.", "capitalized": "Vincent van Gogh"} {"name": "Va'apu'u Vitale", "given": "Va'apu'u", "family": "Vitale", "initials": "V. V.", "capitalized_force": "Va'Apu'U Vitale"}