From cad9a03b8cf44cc4e7ed2b47407ac81f59367ddd Mon Sep 17 00:00:00 2001 From: Derek Gulbranson Date: Mon, 26 Oct 2026 18:20:39 -0700 Subject: [PATCH] Read King as a given name outside a title phrase (#752 phase 2j, #348) The fourth title batch of phase 2j. `king` gains a dated given reading (US SSA 37,890 births; Census rank 34 as a surname), so it is a title only inside a title phrase, unreported. `King Curtis`, `Mr King Smith` and `SMITH, KING MR` read given 'King', where 1.4.0 through 2.6.0 read a title; `His Majesty King Charles` and `King of England` keep it. The cost, accepted by Derek on 2026-10-26 and recorded in rules/H9: a monarch written with the bare title reads it as the given name (`King Henry` -> given 'King', family 'Henry'). `king` was the worked example of a title that is also a surname across rules H1, H3-H8, M2, S2 and S8, their decisions, AGENTS.md, usage.rst and the tests; each now uses `pope`, which reads as `king` did on master in every one. decisions/v1-xfail-triage's "king stays in TITLES" is superseded. Measured against master 957509d1: PSC 58 fixed, 0 broken; FEC 73 and ctgov 12 moves, all fixes; tse, ukec, jrc and nepal unchanged. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 4 +- docs/design/decisions/H3-title-runs-floor.md | 4 +- ...t-vocabulary-still-has-to-name-somebody.md | 4 +- .../design/decisions/H5-trailing-title-run.md | 2 +- .../H6-title-before-a-family-comma.md | 2 +- .../H8-salutation-ending-the-given-part.md | 2 +- docs/design/decisions/H9-title-phrase.md | 6 ++ .../design/decisions/M2-maiden-marker-rule.md | 4 +- .../decisions/S8-credentials-trailing-run.md | 2 +- docs/design/decisions/v1-xfail-triage.md | 6 +- .../design/decisions/vocabulary-exclusions.md | 2 +- docs/design/decisions/vocabulary-model.md | 1 + docs/design/rules/H-titles-and-honorifics.md | 2 +- .../rules/H1-title-and-one-name-word.md | 2 +- docs/design/rules/H3-title-runs-floor.md | 4 +- ...t-vocabulary-still-has-to-name-somebody.md | 6 +- docs/design/rules/H5-trailing-title-run.md | 8 +- .../rules/H6-title-before-a-family-comma.md | 6 +- ...ned-name-unit-carrying-title-vocabulary.md | 6 +- .../H8-salutation-ending-the-given-part.md | 2 +- docs/design/rules/H9-title-phrase.md | 6 ++ docs/design/rules/M2-maiden-marker-rule.md | 4 +- ...-ends-a-name-and-never-opens-the-string.md | 4 +- .../rules/S8-credentials-trailing-run.md | 4 +- docs/release_log.rst | 1 + docs/usage.rst | 4 +- nameparser/_lexicon.py | 2 +- nameparser/_pipeline/_pieces.py | 6 +- nameparser/config/_compiled.py | 2 +- nameparser/vocab/en.toml | 4 +- tests/test_conjunctions.py | 4 +- tests/test_first_name.py | 13 ++- tests/test_suffixes.py | 26 ++--- tests/test_titles.py | 8 +- tests/v2/cases.py | 94 ++++++++++++------- tests/v2/pipeline/test_group.py | 6 +- tests/v2/pipeline/test_pieces.py | 10 +- tests/v2/rules_budget.json | 4 +- tests/v2/test_parser.py | 2 +- tests/v2/test_properties.py | 6 +- tools/differential/corpus_rules.jsonl | 29 +++--- tools/differential/snapshot.jsonl | 36 +++---- 42 files changed, 207 insertions(+), 143 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 7db04875f..0c6232f4d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -297,7 +297,7 @@ Add a dedicated `copy.deepcopy()` round-trip test for it too (see `test_regexes_ **Titles permanently shadow first names — be conservative** — any word in `TITLES` is always consumed as a title and can never be parsed as a first name. `"Dean"` is the canonical example: it's a common academic title *and* a common given name, so it is not in `TITLES` but in `TITLES_AMBIGUOUS`, a title only inside a title phrase (`Dean of Students`, `Associate Dean`; rules/H9, #752 phase 2i), and users who need it everywhere add it via opt-in `Constants`. A title that is also a given name now has that machinery: a `given` reading on the word moves it there, decided word by word in measured batches (decisions/vocabulary-model's 2026-10-24 order). A rule that reads a title by its neighbours in the title run meets more phrase shapes than the qualifier-then-head it was designed on: the object of a connective (`President of the United States`, `the Queen's Bench`, whose `united`, `states` and `bench` are modifiers with no head after them), a head before `of` (`Member of Parliament`), and a qualifier written after its head (`Chargé d'Affaires`, `Princess Royal`). Phase 2i's first build, "a modifier needs a head title after it", broke `President of the United States`, `Chargé d'Affaires` and the committed `Queen's Bench` row, found by the case table and the committed corpora, and then read a modifier ENDING the name out of H5's trailing run (`Jane Smith Vice.`), found by the design-docs review; put each shape, and the trailing position, in the grid of any such rule. Before adding a word to `TITLES`, ask: "Could this plausibly be someone's given name in any culture?" If yes, don't add it globally; it belongs in caller-supplied `Constants` instead. This same caution applies to international honorifics — `Prince`, `Sheikh`, `Frau` are all first names in some contexts. It also applies to any prefix sub-set gated on "never a first name": obscure-looking foreign particles are surprisingly often real given names — `Von` (Von Miller), `Vander` (Brazilian, also the Arcane character). When unsure, exclude — a missing member just means that name isn't auto-handled, whereas a wrong member misparses a real person. The decided exception is a word borne as a name only RARELY in the leading position — mostly a surname written last (`graf`, `greve`, `knight`), a few with small given-name or surname-first counts (`herra`, `hrabia`): the title claim acts only in front, so it ships, and a name that begins with it (`Greve Anna`, `Herra Wijaya` → title) is the accepted cost. That is a judgment by incidence, made per word, with the counts taken recorded on the word's entry in `nameparser/vocab/` (herra's, hrabia's; graf, which predates #606, and greve and knight, which #606 proposed, carry none) and the class in `decisions/salutation-titles` (rules/H1's Accepted clause states the cost), not a rule a sweep can apply: a word that commonly leads a real name (Vietnamese `Ông`, the given names `thiru`, `puan`, `marshal`) is still out. `tools/name_usage.py` produces the counts this judgment starts from (role counts, plus Wikidata citizenship to tell where a family name is written first); its Wikidata column is a lower bound (Shehu Shagari has no given-name statement), so a small count there proves little and a zero proves nothing, and its nam_dict row gives a band per country rather than a count, with a missing name proving nothing either. -**The period-abbreviation title inference runs at the head of the GIVEN-NAME part, not the head of the name** — an unrecognized multi-letter word ending in a single trailing period (`_pieces._PERIOD_ABBREV`, a hand copy of the `period_abbreviation` regex, `{2,}` letters — it was assign's until #424 and group's until #439) is treated as a title in the leading title run, e.g. `"Insp. Jane Morse"` → `title='Insp.'`. "Leading" is per SEGMENT: `_peel_leading_titles` is called for NO_COMMA segment 0, SUFFIX_COMMA segment 0, and FAMILY_COMMA **segment 1**, so `"Morse, Det. Insp. Jane"` → `title='Det. Insp.'` and a lone `"Smith, Xyz."` → `title='Xyz.'` — long-standing, verified against 1.4.0, and the mechanism behind #296 (`"Smith, Jr."` read title in 1.4.0; the comma's credential read takes it as suffix `Jr.` now). The docs said "leading word" until 2026-08-01 and were wrong for every comma path. FAMILY_COMMA **segment 0** peels too since #701, but by VOCABULARY only (rules/H6, in assign's family-comma branch rather than `_peel_leading_titles`): `Dr. Smith, John` → `title='Dr.'`, while `Xyz. Smith, John` keeps family `Xyz. Smith`, and a title-particle (`St`, `Freiherr`) stops the run, as does a title with nothing but post-nominals behind it (`Dr. Jr., John` keeps family `Dr.`); a title/suffix dual with a name word behind it still peels (`Rev. Sr. Smith, Mary`). It does not mutate `C.titles`, so the periodless form (`"Insp"`) is unaffected elsewhere. The `{2,}` length requirement — not a separate initials check — is what excludes single-letter initials like `"J."`; the same word after the given name is left as a middle name. **The inference OUTRANKS vocabulary where it runs**: `"Esq. Smith"` → `title='Esq.'` even though `esq` is suffix-only vocabulary, because the shape rule fires before anything consults the suffix sets. The one vocabulary it yields to, since #789 (phase 2k of #752), is a given name written short (`Lexicon.given_name_abbreviations`, a `given` reading with `same_as` in the TOML): `"Chas. Smith"` → `given='Chas.'`, read off classify's `vocab:given-abbreviation` tag in `is_leading_title` and off the lexicon in `_vocab.is_title_shaped`, the two spellings of one test that `test_is_title_shaped_and_is_leading_title_agree` holds together. The second spelling is what rules/C4's comma count and the title phrase's head run ask, so a change to the shape moves comma names nobody wrote it for: #789's first grid held no comma and missed `Chas. Smith, Ed` (given 'Ed', family 'Chas. Smith' before, suffix 'Ed' after), which only mutating `is_title_shaped`'s half alone showed. Put a word of the ambiguous class after a comma behind the shaped word (`X. Smith, Ed`), and a modifier in front of it (`Vice X. Smith, Ed`), in the grid of any change to the shape, and mutate each spelling separately. **The INFERENCE still runs in one direction only, and that is what the two slots share and where they part** (rewritten 2026-09-08, #316): a period-marked word is claimed by SHAPE at the front and by VOCABULARY at the back, so an unlisted abbreviation opening a name is a title while an unlisted abbreviation ending one is a NAME word (`"John Smith Xyz."` → `family='Xyz.'`). A trailing period-marked word the vocabulary knows as a title now IS one (`"John Smith Prof."` → `title='Prof.'`, `rules/H5`) — the comma path read a lone `Smith, Prof.` that way already, and the given part's `Smith, John Prof.` since 2.3.0 (1.4.0 through 2.2.0 read `Doe, Jane Mrs.` middle 'Mrs.'), so the two agree now — and a trailing period-marked word the UNAMBIGUOUS SUFFIX vocabulary knows is still a suffix, the suffix run being peeled first (`"John Smith Esq."` → `suffix='Esq.'`). A BARE trailing title word stays a name word (`"John Smith Sir"`, `"Mary Jane King"`), which is the doctrine line below, save a listed salutation ending the given part after a family comma (rules/H8, `"Doe, Jane Mrs"` → `title='Mrs'`). Meanwhile `period_joined_vocab` resolves INTERIOR-period tokens (`Lt.Gov.`, `Msc.Ed.`) to title-or-suffix by vocabulary, and `_extract._suffix_shaped` treats any period-final delimited content as not-a-nickname. Four sites, and the trailing one now resolves by two vocabularies in order rather than one; unifying the rest is open design work, not settled. (#109; see `docs/usage.rst` "Titles you didn't configure") +**The period-abbreviation title inference runs at the head of the GIVEN-NAME part, not the head of the name** — an unrecognized multi-letter word ending in a single trailing period (`_pieces._PERIOD_ABBREV`, a hand copy of the `period_abbreviation` regex, `{2,}` letters — it was assign's until #424 and group's until #439) is treated as a title in the leading title run, e.g. `"Insp. Jane Morse"` → `title='Insp.'`. "Leading" is per SEGMENT: `_peel_leading_titles` is called for NO_COMMA segment 0, SUFFIX_COMMA segment 0, and FAMILY_COMMA **segment 1**, so `"Morse, Det. Insp. Jane"` → `title='Det. Insp.'` and a lone `"Smith, Xyz."` → `title='Xyz.'` — long-standing, verified against 1.4.0, and the mechanism behind #296 (`"Smith, Jr."` read title in 1.4.0; the comma's credential read takes it as suffix `Jr.` now). The docs said "leading word" until 2026-08-01 and were wrong for every comma path. FAMILY_COMMA **segment 0** peels too since #701, but by VOCABULARY only (rules/H6, in assign's family-comma branch rather than `_peel_leading_titles`): `Dr. Smith, John` → `title='Dr.'`, while `Xyz. Smith, John` keeps family `Xyz. Smith`, and a title-particle (`St`, `Freiherr`) stops the run, as does a title with nothing but post-nominals behind it (`Dr. Jr., John` keeps family `Dr.`); a title/suffix dual with a name word behind it still peels (`Rev. Sr. Smith, Mary`). It does not mutate `C.titles`, so the periodless form (`"Insp"`) is unaffected elsewhere. The `{2,}` length requirement — not a separate initials check — is what excludes single-letter initials like `"J."`; the same word after the given name is left as a middle name. **The inference OUTRANKS vocabulary where it runs**: `"Esq. Smith"` → `title='Esq.'` even though `esq` is suffix-only vocabulary, because the shape rule fires before anything consults the suffix sets. The one vocabulary it yields to, since #789 (phase 2k of #752), is a given name written short (`Lexicon.given_name_abbreviations`, a `given` reading with `same_as` in the TOML): `"Chas. Smith"` → `given='Chas.'`, read off classify's `vocab:given-abbreviation` tag in `is_leading_title` and off the lexicon in `_vocab.is_title_shaped`, the two spellings of one test that `test_is_title_shaped_and_is_leading_title_agree` holds together. The second spelling is what rules/C4's comma count and the title phrase's head run ask, so a change to the shape moves comma names nobody wrote it for: #789's first grid held no comma and missed `Chas. Smith, Ed` (given 'Ed', family 'Chas. Smith' before, suffix 'Ed' after), which only mutating `is_title_shaped`'s half alone showed. Put a word of the ambiguous class after a comma behind the shaped word (`X. Smith, Ed`), and a modifier in front of it (`Vice X. Smith, Ed`), in the grid of any change to the shape, and mutate each spelling separately. **The INFERENCE still runs in one direction only, and that is what the two slots share and where they part** (rewritten 2026-09-08, #316): a period-marked word is claimed by SHAPE at the front and by VOCABULARY at the back, so an unlisted abbreviation opening a name is a title while an unlisted abbreviation ending one is a NAME word (`"John Smith Xyz."` → `family='Xyz.'`). A trailing period-marked word the vocabulary knows as a title now IS one (`"John Smith Prof."` → `title='Prof.'`, `rules/H5`) — the comma path read a lone `Smith, Prof.` that way already, and the given part's `Smith, John Prof.` since 2.3.0 (1.4.0 through 2.2.0 read `Doe, Jane Mrs.` middle 'Mrs.'), so the two agree now — and a trailing period-marked word the UNAMBIGUOUS SUFFIX vocabulary knows is still a suffix, the suffix run being peeled first (`"John Smith Esq."` → `suffix='Esq.'`). A BARE trailing title word stays a name word (`"John Smith Sir"`, `"Mary Jane Pope"`), which is the doctrine line below, save a listed salutation ending the given part after a family comma (rules/H8, `"Doe, Jane Mrs"` → `title='Mrs'`). Meanwhile `period_joined_vocab` resolves INTERIOR-period tokens (`Lt.Gov.`, `Msc.Ed.`) to title-or-suffix by vocabulary, and `_extract._suffix_shaped` treats any period-final delimited content as not-a-nickname. Four sites, and the trailing one now resolves by two vocabularies in order rather than one; unifying the rest is open design work, not settled. (#109; see `docs/usage.rst` "Titles you didn't configure") **Cyrillic suffix regexes need `re.I` even when the pattern is suffix-only** — a Latin title-cased word (`Ivanovich`) keeps its suffix lowercase, so `re.I` seemed skippable; but an irregular Cyrillic suffix can be nearly the whole word (`ильич`), so title-casing capitalizes into the suffix itself (`Ильич`). `east_slavic_patronymic_cyrillic` shipped without `re.I` on the Latin reasoning and silently failed on capitalized irregular forms — don't assume Latin's title-case safety transfers to Cyrillic. (#185) @@ -349,7 +349,7 @@ Don't use the bare `python3 -m doctest .rst` CLI (no `optionflags`) to che **Prefix-join uses value-based `list.index()`** in `join_on_conjunctions` — fragile when a token value repeats (e.g. a trailing title that's also a suffix acronym, or two `van`s); constrain such lookups to start at `i + 1`. See #100. -**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 still in both (`ms`, `sr`, `lt`, `ra`, `vc`, and the ranks `cpl`, `cpo`, `cpt`, `csm`, `sgm`; `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. 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`), 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; 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 (`king`, `bishop`, `prince`, `pope`, `judge`, `sheriff`, `baron`, `master`, ...), so a vocabulary-first rule over BARE trailing words would read `"Mary Jane King"` as `title='King'`, `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 King"` keeps `family='King'` while `"Mary Jane King."` reads `title='King.'`, `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 still in both (`ms`, `sr`, `lt`, `ra`, `vc`, and the ranks `cpl`, `cpo`, `cpt`, `csm`, `sgm`; `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. 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`), 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; 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`, `prince`, `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/H3-title-runs-floor.md b/docs/design/decisions/H3-title-runs-floor.md index 22c1ee782..ed6adce8e 100644 --- a/docs/design/decisions/H3-title-runs-floor.md +++ b/docs/design/decisions/H3-title-runs-floor.md @@ -2,9 +2,9 @@ ## Standing -- 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 King Jr` → title 'Dr', family 'King', suffix 'Jr' — 2026-09-08 #316. +- 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 King RA PhD` → title 'Dr King RA'), and a bare numeral behind the run is the numeral fork's, not this floor's (`Dr King V` → title 'Dr King', 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 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. 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 d5914278b..2525be50f 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 @@ -2,7 +2,7 @@ ## Standing -- 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. King` reports — 2026-09-07 #491. +- 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. @@ -10,7 +10,7 @@ - A lone name unit that is a join carrying title vocabulary reports `title-or-name` too (`John of Prince`, `Smith and Prince`), 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 Prince`, `van and Prince`, `Attorney General of Minnesota` report) — 2026-09-08 #518. -Elsewhere: the title run's floor that leaves `King` standing in `Dr King Jr` and `Dr. King MD`, both reporting here, is decisions/H3's 2026-09-08 entry; the suffix and join halves' `detail` naming the field the word lands in, which moves with the order (`Rinpoche` 'a given name' by default, 'a family name' family-first), is decisions/A1's 2026-10-08 #626 entry; the join clause's move into a rule of its own is decisions/H7's 2026-10-20 #761 entry. +Elsewhere: the title run's floor that leaves `Pope` standing in `Dr Pope Jr` and `Dr. Pope MD`, both reporting here, is decisions/H3's 2026-09-08 entry; the suffix and join halves' `detail` naming the field the word lands in, which moves with the order (`Rinpoche` 'a given name' by default, 'a family name' family-first), is decisions/A1's 2026-10-08 #626 entry; the join clause's move into a rule of its own is decisions/H7's 2026-10-20 #761 entry. Open: none in this file. diff --git a/docs/design/decisions/H5-trailing-title-run.md b/docs/design/decisions/H5-trailing-title-run.md index c0cfada3b..e74aba293 100644 --- a/docs/design/decisions/H5-trailing-title-run.md +++ b/docs/design/decisions/H5-trailing-title-run.md @@ -3,7 +3,7 @@ ## Standing - After the trailing suffix run, successive period-marked words the title vocabulary lists chain into the title from the end, leaving one name word standing, and join the title field in input order: `John Smith Prof.` → title 'Prof.', family 'Smith'; `John Smith Prof. Dr.` → title 'Prof. Dr.'; `Dr. John Smith Prof.` → title 'Dr. Prof.' — 2026-09-08 #316. -- The back is claimed by vocabulary and the front by shape, so an unlisted abbreviation (`John Smith Xyz.` → family 'Xyz.') and a bare title word (`John Smith Sir`, `Mary Jane King`) are name words there, the walk asking `is_title_piece` and never `is_leading_title` — 2026-09-08 #316. A listed salutation ending the given part after a family comma is the exception, read as the title bare (decisions/H8). +- The back is claimed by vocabulary and the front by shape, so an unlisted abbreviation (`John Smith Xyz.` → family 'Xyz.') and a bare title word (`John Smith Sir`, `Mary Jane Pope`) are name words there, the walk asking `is_title_piece` and never `is_leading_title` — 2026-09-08 #316. A listed salutation ending the given part after a family comma is the exception, read as the title bare (decisions/H8). - No fork is reported; where the doubt is real, the word left standing carries it (H4) — 2026-09-08 #316. - The given part after a family comma gets the walk: `Smith, John Prof.` → title 'Prof.', given 'John' — 2026-09-08 #316. - The trailing peel and the title chain are one reading run to a fixed point (`_pieces.tail_reading`), so a trailing title is transparent to the suffix reading (`John Smith Jr. Prof.` → suffix 'Jr.'; `abdul rahman MA Prof.` reads as `abdul rahman MA` does, plus the title), and the bound join takes no piece the chain takes (`Sir abdul Prof.` → given 'abdul') — 2026-09-09 (the /simplify round on the bundle's PR). 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 4dd9298a0..2e9efea38 100644 --- a/docs/design/decisions/H6-title-before-a-family-comma.md +++ b/docs/design/decisions/H6-title-before-a-family-comma.md @@ -5,7 +5,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 surname can open with an abbreviated word: `Xyz. Smith, John` → family 'Xyz. Smith', `Sta. Maria, Juan` → family 'Sta. Maria' — 2026-10-17 #701; 2026-10-18 #710. - 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. -- A surname-like title opening a two-word surname is the title (`King Smith, John` → title 'King'), an accepted cost — 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 `Graf Lambsdorff, Otto` reads title 'Graf' — 2026-10-17 #701. - The comma-less writing of an abbreviated surname is not this rule's and still splits it (`Juan Sta. Maria` → middle 'Sta.', family 'Maria'); listing `sta` and `sto` as particles is weighed and not decided — 2026-10-18 #710. diff --git a/docs/design/decisions/H8-salutation-ending-the-given-part.md b/docs/design/decisions/H8-salutation-ending-the-given-part.md index 814e1d823..f4067fb16 100644 --- a/docs/design/decisions/H8-salutation-ending-the-given-part.md +++ b/docs/design/decisions/H8-salutation-ending-the-given-part.md @@ -4,7 +4,7 @@ - A salutation ending the given part after a family comma, written bare or with a stop at its edge that H5's abbreviation shape does not take (`Mr..`), is the title, read as its period-marked spelling reads in every comma shape and under every name order: `Doe, Jane Mrs` → title 'Mrs', given 'Jane'; `DOE, JOHN Q MR` → title 'MR', middle 'Q' — 2026-10-24 #835. - Only the salutations marked `after_given` in the vocabulary qualify, and a salutation borne as a given name or a surname is left out by an exclusion carrying its counts, since a middle name may be either (`Doe, John Goodman` keeps middle 'Goodman') — 2026-10-24 #835. -- No other title kind qualifies (`Doe, John King` and `Doe, Jane Dr` keep their middle names), a title/suffix dual stays a suffix (`Doe, Jane Ms`), and the comma-less writing is H5's (`Jane Doe Mrs` keeps family 'Mrs') — 2026-10-24 #835. +- No other title kind qualifies (`Doe, John Pope` and `Doe, Jane Dr` keep their middle names), a title/suffix dual stays a suffix (`Doe, Jane Ms`), and the comma-less writing is H5's (`Jane Doe Mrs` keeps family 'Mrs') — 2026-10-24 #835. - A salutation that is someone's middle name reads as the title after a family comma, an accepted cost (`Doe, Jane Miss`); so does the empty head's one given word moving to the family as the period-marked spelling moves it (`, Jane Mrs` → family 'Jane') — 2026-10-24 #835. - The rule reads the comma, not a declared order: `Doe Jane Mrs` under FAMILY_FIRST keeps middle 'Mrs', so the family-comma invariant of decisions/two-input-invariants does not hold for a trailing salutation — 2026-10-24 #835. diff --git a/docs/design/decisions/H9-title-phrase.md b/docs/design/decisions/H9-title-phrase.md index 97f0386d4..f7a0b4cc6 100644 --- a/docs/design/decisions/H9-title-phrase.md +++ b/docs/design/decisions/H9-title-phrase.md @@ -50,3 +50,9 @@ - THE COSTS, in rules/H9's Accepted clause, none written by any name the corpora hold (0 matches in the eight local corpora and the committed ones, 2026-10-26): the Sikh title in the spelling `Gyani` before a name reads as the given name (`Gyani Zail Singh`; its usual spelling `giani` has no given reading and keeps the title); a title before the word that is no style, modifier or attaching title is no partner (`Lord Buddha Tamang` → given 'Buddha'; `His Holiness Buddha Ram` and `Grand Buddha Ram` keep the title); and the epithet with its article reads as the `mahdi` entry's does, after a comma and before a name (`Ram Tamang, the Buddha` → given 'the Buddha', `The Buddha Ram` → given 'The Buddha'). - MEASURED (2026-10-26, against master `021028b2`, py3.11, every local check with `--base`). nepal-candidates: 121 romanized names moved (`snapshot.py --local nepal-candidates`), 117 the word read out of the title alone and 4 gaining or losing a report: 2 lose H4's `title-or-name`, the name having been nothing but vocabulary (`Gyani Lama`, `lama` a title too, as `Lord Buddha` and `Lord Mahdi` lose it), and 2 gain the `suffix-or-name` any name with a trailing credential word and words to spare gets (`Buddha Lama ma` reads as `Ram Lama ma`). Spelling consistency (mechanisms.md#PAIRED-SPELLINGS-PER-CHANGE, romanized against Devanagari, by structure): 128 pairs now alike, none apart. ctgov-officials 4 moved, all fixes, 2 of them one official written twice whose credential master read as the given name (`Buddha Aa, CAPS, Aa, CAPS` → given 'Buddha', the credentials suffixes, `suffix-or-name` on the name word between them). PSC (1,039,174 scored), fec-individuals, tse-donors, jrc-names, the committed corpora and CLDR and GND agreement do not move. Recompute: `uv run python tools/differential/snapshot.py --local nepal-candidates --base ` (and `ctgov-officials`); the pairs compare `local_corpora._read`'s structure of each record's `name` and `devanagari` in each tree, run from that tree's checkout. +- **2026-10-26 #752, phase 2j, `king` (Derek) — THE FOURTH TITLE BATCH: A MONARCH'S BARE TITLE READS AS THE GIVEN NAME.** The batch decisions/vocabulary-model's 2026-10-24 #752 (Derek) entry put fourth. `king` gains a dated `given` reading and is a title only inside a title phrase; no listed phrase holds it, so nothing is reported. `King Curtis`, `Mr King Smith` and `SMITH, KING MR` read given 'King', where 1.4.0 through 2.6.0 read title 'King' and `Mr King` (`SMITH, KING MR`: title 'KING', given 'MR' in 1.4.0 through 2.1.0, title 'KING MR' from 2.2.0). A style keeps the title (`His Majesty King Charles` → title 'His Majesty King', given 'Charles', the title still addressing by the given name), as does `of` (`King of England`). The other sites read as for `mahdi` and `buddha` (the entries above): before a family comma (`King Smith, John` → family 'King Smith', 1.4.0's reading, where 2.5.0 through 2.6.0 peeled `King`), ending the name (`Mary Smith King.` → family 'King.'), alone after a full name and a comma, past a second comma, and under a family-first order the word before a name is the family. + - THE COUNTS, recorded on the word (`uv run python tools/name_usage.py King`, 2026-10-26): given US SSA 37,890 births, Wikidata 178 (a lower bound; United States 92), nam_dict band 1 in the U.S.A. and China; family Census 465,422 (rank 34), Wikidata 4,554. + - THE COST, measured and decided. A monarch written with the bare title in front reads `King` as the given name: `King Henry` → given 'King', family 'Henry', where 1.4.0 through 2.6.0 read title 'King', given 'Henry'; so do `King Charles III`, `King John V.` and `King and Queen Smith` (given 'King and Queen'). `queen` is in no batch, so `Queen Elizabeth II` keeps its title. In the committed corpora the cost is three rows (`King Henry`, `King John V.`, `King John Alexander V`). Of the local corpora only jrc-names, drawn from news text, writes monarchs: 20 persons (39 spellings) open with `King`, by a reading of each about half monarchs or legendary kings and half people whose given name, stage name or nickname is King; PSC, FEC, ctgov and ukec write none. Shown these figures, Derek decided on 2026-10-26: "Accept the royal cost for king". Recorded in rules/H9's Accepted clause. + - `king` WAS THE WORKED EXAMPLE OF A TITLE THAT IS ALSO A SURNAME, in rules H1, H3 to H8, M2, S2 and S8, their decisions Standing lines, AGENTS.md, docs/usage.rst, two code comments and eleven case rows and tests. Each now uses `pope`, chosen because it reads as `king` read on master in every one of those examples (19 inputs checked against `queen`, `bishop`, `pope`, `baron`, `judge`, `sheriff`, `mayor` and `emperor`; only `pope` and `queen` matched all, `pope` being the commoner surname). decisions/v1-xfail-triage's "`king` stays in TITLES" is superseded there. + - MEASURED (2026-10-26, against master `957509d1`, py3.11, every local check with `--base`). PSC (1,039,174 scored): 58 records fixed, none broken, 5 changed. fec-individuals 73 moved, all fixes: `AA, KING …` given names (51) and `KING AA, AA` family parts that H6 had peeled (22). ctgov-officials 12, all fixes: officials whose given name is King (`King A. Aa`), and one whose credential master read as the given name (`Aa King, AA Aa` → given 'Aa', family 'King', the credentials suffixes). tse-donors, ukec-individuals, jrc-names and nepal-candidates pairs (0 now alike, 0 apart: both spellings of a person move together), CLDR and GND agreement do not move. The committed corpora move 11 names before the rules examples were rewritten: the three royal rows, `King Curtis` (#348's example, fixed), `King Smith, John` and `Mary Jane King.` (1.4.0's readings), a maiden clause, and four that only lose H4's `title-or-name`, the word no longer being title vocabulary (`Dr. King`, `Dr King Jr`, `Dr. King MD`; `Smith and King` reports `given-or-family` instead). + Recompute: `uv run python tools/differential/local_agreement.py psc-individuals --base `, and `uv run python tools/differential/snapshot.py --local fec-individuals --base ` (and `ctgov-officials`). diff --git a/docs/design/decisions/M2-maiden-marker-rule.md b/docs/design/decisions/M2-maiden-marker-rule.md index c460dbda4..f0c9ce9c1 100644 --- a/docs/design/decisions/M2-maiden-marker-rule.md +++ b/docs/design/decisions/M2-maiden-marker-rule.md @@ -11,8 +11,8 @@ - A shape-only roman numeral ends the clause where the clause-free name reads it as the suffix, a title or the merged `Ph. D.` behind it included: `John née Jones Smith VI` → maiden 'Jones Smith', suffix 'VI'; `Jane Doe nee Smith VI Prof.` → suffix 'VI', title 'Prof.' — 2026-10-04 #610. - The take reads its clause-free view over `_pieces.trailing_candidates`, written beside the peel, a superset of what `tail_reading` takes with no exception and no case fact — 2026-10-04 #610; 2026-10-18 (Derek), #731 reverted. - Where a trailing rule reads the part, a trailing title ends the clause, and a credential or numeral in front of it gets the stop it gets with the title absent: `Jane Doe nee Smith Prof.` → title 'Prof.', maiden 'Smith'; `Jane Doe nee Smith MA Prof.` and `… Prof. MA` both → maiden 'Smith', suffix 'MA'; `Jane Doe nee Smith V Prof.` → suffix 'V' — 2026-09-26 #535. -- The title chain never takes the first word after the marker: `Jane Doe nee King.` keeps maiden 'King.', `Jane Doe nee Prof. Dr.` reads maiden 'Prof.', title 'Dr.', and a first word in the title vocabulary counts as a word, so `Jane Doe nee King. ba` gives up 'ba' as `Jane Doe nee Smith ba` does — 2026-09-26 #535. -- Accepted, the transparency boundary: where the clause keeps the credential the two spellings differ, a title inside the kept text unable to leave without the words behind it (`Doe nee Smith ba Prof.` → title 'Prof.', maiden 'Smith ba'; `Doe nee Smith Prof. ba` → maiden 'Smith Prof. ba'), and H5's `King.` cost reaches a birth name (`Jane Doe nee Smith King.` → title 'King.', maiden 'Smith') — 2026-09-26 #535. +- The title chain never takes the first word after the marker: `Jane Doe nee Pope.` keeps maiden 'Pope.', `Jane Doe nee Prof. Dr.` reads maiden 'Prof.', title 'Dr.', and a first word in the title vocabulary counts as a word, so `Jane Doe nee Pope. ba` gives up 'ba' as `Jane Doe nee Smith ba` does — 2026-09-26 #535. +- Accepted, the transparency boundary: where the clause keeps the credential the two spellings differ, a title inside the kept text unable to leave without the words behind it (`Doe nee Smith ba Prof.` → title 'Prof.', maiden 'Smith ba'; `Doe nee Smith Prof. ba` → maiden 'Smith Prof. ba'), and H5's `Pope.` cost reaches a birth name (`Jane Doe nee Smith Pope.` → title 'Pope.', maiden 'Smith', the example `King.` until `king` left the titles on 2026-10-26) — 2026-09-26 #535. - Where a trailing rule reads the part, a member of the ambiguous class ending the maiden name is kept by the clause and reported, nobody writing a credential straight after the marker as its floor: `Jane Doe nee MA` → maiden 'MA', `Jane Doe nee Smith Ma` → maiden 'Smith Ma', and `Jane Doe nee Smith MA` → suffix 'MA', each reporting `suffix-or-name` but the last, whose capitals settle it in silence since 2026-10-25 #785 (decisions/S6) — 2026-09-19 (Derek), #533. - Accepted with it: `JANE DOE NEE YO-YO MA` → maiden 'YO-YO', suffix 'MA', the one-case reading's cost; `Jane Doe nee Smith X.Y.Z.` → suffix 'X.Y.Z.', as `John Doe X.Y.Z.` reads; `Jane Smith nee Jones and MA` → maiden 'Jones and', suffix 'MA', the take running before the joins — 2026-09-19 (Derek), #533. - A word the clause gives up reads as a post-nominal or title or the clause keeps it, so where a trailing rule reads the part every word written after a taken marker is roled maiden, title or suffix (before a family comma it is not, as above); held since #601 by binding the clause-free reading as roles — 2026-09-19 (Derek), #533 review, A WORD; 2026-10-04 (Derek), #601. diff --git a/docs/design/decisions/S8-credentials-trailing-run.md b/docs/design/decisions/S8-credentials-trailing-run.md index ada99a001..4ee9e68dd 100644 --- a/docs/design/decisions/S8-credentials-trailing-run.md +++ b/docs/design/decisions/S8-credentials-trailing-run.md @@ -6,7 +6,7 @@ Examples name each field as the default order reads it; under the family-first o - An unambiguous suffix word of two or more letters, in any script, standing after two name words with no comma or before a suffix comma, or after the given word in the part after a family comma, starts a run to the end of its part: every later word reads as a suffix except a title word, which reads as a title, and an absorbed name word reports `suffix-or-name` (`John Smith PhD Jones` → suffix 'PhD Jones'; `Eric H. Holder Jr. Attorney General` → suffix 'Jr.', title 'Attorney General') — 2026-10-04 #602; 2026-10-14 #679. - A roman numeral of two or more letters that reads as the generation starts the run as a listed one does (`John Smith VI Jones` → suffix 'VI Jones', as `John Smith III Jones`), its shape alone reported — 2026-10-25 #784. -- What never starts the run: a title word (`Mary Jane King Smith` keeps family 'Smith'), a member of the ambiguous class but a credential split across a space (below) and a listed member its capitals settle (below), a single letter, a connective (`Josep Carod i Rovira` keeps family 'Carod i Rovira'), and a word that is also particle or bound given-name vocabulary (`Mohamed Ali Abd Allah` → family 'Allah'); a title/suffix dual does start it — 2026-10-04 #602. +- What never starts the run: a title word (`Mary Jane Pope Smith` keeps family 'Smith'), a member of the ambiguous class but a credential split across a space (below) and a listed member its capitals settle (below), a single letter, a connective (`Josep Carod i Rovira` keeps family 'Carod i Rovira'), and a word that is also particle or bound given-name vocabulary (`Mohamed Ali Abd Allah` → family 'Allah'); a title/suffix dual does start it — 2026-10-04 #602. - An honorific or generational word starts the run as a credential does, whatever its script (`राम शर्मा साहब मोहन` → suffix 'साहब मोहन'); the one-character honorifics stay out by the two-letter minimum — 2026-10-14 #679. - A lone particle counts toward the two name words only where the credential stands right behind it (`John von PhD Jones` → family 'von', suffix 'PhD Jones', under the family-first orders given 'von'); a particle run counts once, and a particle the run took is not asked (`Freiherr von vd PhD Jones` keeps middle 'PhD') — 2026-10-10 #627. - Lifting the credential out of the name, the family-comma path's older reading (`John Smith PhD Jones` as family 'Jones', suffix 'PhD'), was declined — 2026-10-04 #602. diff --git a/docs/design/decisions/v1-xfail-triage.md b/docs/design/decisions/v1-xfail-triage.md index 4f72920f5..57802c9dd 100644 --- a/docs/design/decisions/v1-xfail-triage.md +++ b/docs/design/decisions/v1-xfail-triage.md @@ -7,14 +7,14 @@ The reconciled v1-style banks (`tests/test_*.py`) carried eight `@pytest.mark.xf ## Standing - A trailing `I` before a further comma stays a middle initial, the commoner reading: `Maier, Amy I, Jr.` reads middle 'I', suffix 'Jr.', where `Maier, Amy I` reads suffix 'I' (rules/C9) — 2026-09-01 (Derek's triage) -- `king` stays in TITLES for the addressing forms: `Dr King Jr` reads title 'Dr', family 'King', suffix 'Jr' (H3's peel floor, since 2026-09-08), and `King, Dr Jr` reads the same fields — 2026-09-01 (Derek's triage) +- `Dr King Jr` reads title 'Dr', family 'King', suffix 'Jr', and `King, Dr Jr` reads the same fields, with no report since `king` became a given name outside a title phrase (`Dr Pope Jr` keeps H3's floor and its report) — 2026-09-01 (Derek's triage); 2026-10-26 #752, phase 2j - `ben` stays out of the particles, colliding with the given name Ben where the particle claim acts: `Ahmad ben Husain` reads middle 'ben', family 'Husain' — 2026-09-01 (Derek's triage) - An input that is all titles takes its last title word as the name, a convention accepted rather than defended: `The Right Hon. the President of the Queen's Bench Division` reads family 'Division' — 2026-09-01 (Derek's triage) - The two surviving markers are #490's, cited by issue: `E.T. Smith` and `U.S. District Judge Marc Thomas Treadwell`, dotted initials against dotted vocabulary; #489's `Her Majesty Queen Elizabeth` (given 'Elizabeth') was fixed on 2026-09-08 — 2026-09-01 - `juan garcia III` repairs to `Juan Garcia III` and its test is an ordinary pin — 2026-09-23 #492. - #485's `xfail:` corpus-label prefix is not adopted: a surviving marker carries its issue number, and a decided reading moving is a classified change — 2026-09-01 #485. -Elsewhere: the `title-or-name` report on the word the title peel leaves standing (`Dr King Jr`, `The Right Hon. … Division`) is decisions/H4's 2026-09-07 #491 entry, reaching `Dr King Jr` since decisions/H3's 2026-09-08 #316 floor left `King` standing. +Elsewhere: the `title-or-name` report on the word the title peel leaves standing (`Dr Pope Jr`, `The Right Hon. … Division`) is decisions/H4's 2026-09-07 #491 entry, which reached `Dr King Jr` from decisions/H3's 2026-09-08 #316 floor until `king` left the title vocabulary on 2026-10-26. Open: [#490](https://github.com/derek73/python-nameparser/issues/490) — dotted initials against dotted title and credential vocabulary. @@ -33,4 +33,4 @@ Open: [#490](https://github.com/derek73/python-nameparser/issues/490) — dotted - 2026-09-23 [#492](https://github.com/derek73/python-nameparser/issues/492) — FIXED (the #459/#492/#478 bundle): `juan garcia III` repairs to `Juan Garcia III`, R5's gate leaving the suffixes out (decisions/R5, 2026-09-23). The marker is gone and the test is renamed `tests/test_capitalization.py::test_capitalization_exception_for_already_capitalized_III`, the `_KNOWN_FAILURE` suffix the bullet above kept being no longer true. Two markers remain, both #490's, and the marker counts above — this entry's heading, the FIX CANDIDATES line and the #485 bullet — were amended in place on this date, following the #489 fix's precedent. `tools/differential/corpus.jsonl` still carries the old test name as a label: that file is v1's own suite harvested at a pinned ref (tools/differential/README.md), so the label names where the row came from and is left as it is. - 2026-09-01 #485 — #485'S `xfail:` LABEL PREFIX IS NOT ADOPTED: the bullet below, written in this triage. - [#485](https://github.com/derek73/python-nameparser/issues/485) is superseded. It proposed prefixing corpus labels with `xfail:` so a radar diff on a name like `Dr King Jr` reads as a known-bad parse improving rather than a regression. The premise was that a v1 xfail marker is a usable triage signal; after this triage it is not, because the marker no longer tracks the disposition — `Dr King Jr` is now a PIN, so a radar diff on it means a decided reading moved, which is precisely the signal the prefix would have suppressed. The four that remain carry issue numbers, which is the same information in a place that cannot go stale against the pinned historical ref. The 2026-09-08 fix STRENGTHENS this rather than unsettling it, and the argument is worth stating because the fix looks at first like the counterexample: `Dr King Jr` moved, so a diff on it is exactly what #485's prefix predicted — but it moved by DECISION, with a ledger rule and a rewritten pin, which is a classified change and not a known-bad parse quietly improving. Had the prefix shipped, that diff would have read as the aspiration finally coming true and nobody would have been asked to classify it. Two markers remain, both #490's (re-counted 2026-09-23, #492), and they still carry issue numbers. - +- 2026-10-26 #752, phase 2j (Derek) — `king` LEAVES THE TITLE VOCABULARY. SUPERSEDES: in 2026-09-01 (Derek's triage), "`king` stays in TITLES for the addressing forms". `king` gains a `given` reading and is a title only inside a title phrase (decisions/H9's entry of this date); `Dr King Jr` and `King, Dr Jr` keep the fields this triage pinned, the first losing its `title-or-name` report, and the triage's tests and examples that used `king` as title vocabulary use `pope` now, which reads as `king` did on master in every one of them. diff --git a/docs/design/decisions/vocabulary-exclusions.md b/docs/design/decisions/vocabulary-exclusions.md index c45ca1590..68b85410f 100644 --- a/docs/design/decisions/vocabulary-exclusions.md +++ b/docs/design/decisions/vocabulary-exclusions.md @@ -62,7 +62,7 @@ Excluded (TITLES): - The per-word refusals are data since #750 (2026-10-19): each word refused a title reading — the Indic ঠাকুর/ठाकुर, कुमारी/কুমারী, बेगम/বেগম, शेख/শেখ, आचार्य and राजा/रानी (#343, #344), and #606's ông/bà, thiru, puan, pan, rodina, gróf, cik, paron, tikin, Latin janab, marshal and justice, #662's malam (Derek's decline) and bay, #660's shehu, and #789's wm (2026-10-22) — is an `excluded` entry in its language's file with its reason, and with its counts as name readings where they were taken. `uv run python tools/vocab/query.py --excluded title` lists them. A contributor who adds one back meets the reason as a build error. - shehu's counts do not settle a graf-class weighing, and must not be read as if they did: its one leading-position figure, the Wikidata given-name count on its entry, is a lower bound (Shagari's own entry has no given-name statement), and its other counts are family-name bearers, a position C-i does not ask about. The evidence that Shehu leads a name is not a count. It is Shagari himself, and CLDR's Hausa sample data, whose six renderings carrying the word all file it as the given name (`grep '"given": "Shehu"' tools/differential/cldr_fields.jsonl`). It arrived with an early bulk import (1a51555f) and was never put to C-i before #660. Whoever re-argues it counts Hausa given-name use first; the accepted cost is the honorific use, `Shehu Abubakar` reading given Shehu as any untitled name does, and the reading belongs in an opt-in pack if anyone asks for it. malam is the opposite case: CLDR's Hausa data files Malam as the title (`grep '"title": "Malam"' tools/differential/cldr_fields.jsonl`), so its refusal is a decline on the counts, not a shehu-style removal. - The class-level half of the Indic refusals stays here: the divergence on शेख/শেখ is deliberate and is the sri/shri case run backwards — the Latin sheikh cluster SHIPS as given-name titles for the Arabic addressing form, while the Indic spellings name the family. shehu's removal moved three CLDR corpus names (`Shehu Muhammed`, `Muhammed, Shehu`, `Modibbo, Shehu Bello`), all three now agreeing with CLDR on every role (moves: `uv run python tools/differential/snapshot.py --since v2.4.1`). -- The trailing-position rule that must NOT be adopted, and 2026-09-08 says what the line is: TITLES holds hundreds of words in no suffix set, at least nineteen of them ordinary English surnames (king, judge, bishop, baron, sheriff, ...), so a blanket "vocabulary outranks position in the trailing slot" reading would turn "Mary Jane King" into title="King" with the family name gone. The leading half of this argument is AGENTS.md's "Dean is deliberately absent" gotcha; this is the trailing half, and it shadows the family name rather than the given (#316). What #316 settled is that the prohibition is on BARE words: "Mary Jane King" still reads family King, while "John Smith Prof." reads title Prof. **The second half of that argument is RETRACTED 2026-09-09**, in review of the docs commit: "a period-marked trailing word being one nobody writes as a surname" claimed the period keeps the collision out of the trailing slot, and it does not. Measured on the branch tree — "Mary Jane King." reads title "King.", given Mary, family Jane, the family name shadowed exactly as the bare reading would have shadowed it, and "John Smith Judge." reads title "Judge." The reach is the vocabulary rather than a handful: of the 746 titles in no suffix set, 627 read as a trailing title once a period is written behind them, and every one of the 119 that do not is kept out by the abbreviation SHAPE — a digit, a hyphen, an apostrophe, or a script whose letters carry combining marks (rules/H2 records that half) — no plain ASCII-letter title missing at all. So king, judge, bishop, baron and sheriff ARE reachable in the trailing slot; what the prohibition above buys is the bare spelling and nothing more. The period is a WRITING convention the rule can read, not evidence about the word, and reading it is an ACCEPTED COST under the premise that the input is a name (rules.md H Background): someone who ends a name with a period-marked word has written an abbreviation. rules/H5 carries it as an Accepted clause with "Mary Jane King." as the executable example. Recompute the reach with `L = Parser().lexicon; ws = [w for w in L.titles - L.suffix_acronyms - L.suffix_words if " " not in w]; len([w for w in ws if parse("Mary Jane %s." % w).title])` against `len(ws)` — 627 of 746 on 2026-09-09 — the digits move as the vocabulary grows and neither argument does. See #H5. The bare prohibition has one exception since #835 (decisions/H8): a listed salutation ending the given part after a family comma is the title, the comma having marked the surname's place and the salutations borne as names being excluded. +- The trailing-position rule that must NOT be adopted, and 2026-09-08 says what the line is: TITLES holds hundreds of words in no suffix set, at least nineteen of them ordinary English surnames (king, judge, bishop, baron, sheriff, ...), so a blanket "vocabulary outranks position in the trailing slot" reading would turn "Mary Jane King" into title="King" with the family name gone. The leading half of this argument is AGENTS.md's "Dean is deliberately absent" gotcha; this is the trailing half, and it shadows the family name rather than the given (#316). What #316 settled is that the prohibition is on BARE words: "Mary Jane King" still reads family King, while "John Smith Prof." reads title Prof. **The second half of that argument is RETRACTED 2026-09-09**, in review of the docs commit: "a period-marked trailing word being one nobody writes as a surname" claimed the period keeps the collision out of the trailing slot, and it does not. Measured on the branch tree — "Mary Jane King." reads title "King.", given Mary, family Jane, the family name shadowed exactly as the bare reading would have shadowed it, and "John Smith Judge." reads title "Judge." The reach is the vocabulary rather than a handful: of the 746 titles in no suffix set, 627 read as a trailing title once a period is written behind them, and every one of the 119 that do not is kept out by the abbreviation SHAPE — a digit, a hyphen, an apostrophe, or a script whose letters carry combining marks (rules/H2 records that half) — no plain ASCII-letter title missing at all. So king, judge, bishop, baron and sheriff ARE reachable in the trailing slot; what the prohibition above buys is the bare spelling and nothing more. The period is a WRITING convention the rule can read, not evidence about the word, and reading it is an ACCEPTED COST under the premise that the input is a name (rules.md H Background): someone who ends a name with a period-marked word has written an abbreviation. rules/H5 carries it as an Accepted clause with "Mary Jane King." as the executable example. (Since 2026-10-26 `king` is a title only inside a title phrase, decisions/H9, #752 phase 2j: "Mary Jane King." reads family "King." and the surnames this paragraph names are pope, judge, bishop, baron and sheriff, rules/H5's example "Mary Jane Pope.".) Recompute the reach with `L = Parser().lexicon; ws = [w for w in L.titles - L.suffix_acronyms - L.suffix_words if " " not in w]; len([w for w in ws if parse("Mary Jane %s." % w).title])` against `len(ws)` — 627 of 746 on 2026-09-09 — the digits move as the vocabulary grows and neither argument does. See #H5. The bare prohibition has one exception since #835 (decisions/H8): a listed salutation ending the given part after a family comma is the title, the comma having marked the surname's place and the salutations borne as names being excluded. Excluded (Policy.script_orders defaults): Script.KATAKANA is deliberately absent — a pure-katakana token is predominantly a transcribed foreign name kept in its source order, so nothing defaults on it (rule W4's boundary). Noted 2026-08-15: of the three Script-keyed axes, this is the one with no force-a-decision guard (mechanisms.md#FORCE-A-DECISION-TABLE), so a new Script member silently gets no order. diff --git a/docs/design/decisions/vocabulary-model.md b/docs/design/decisions/vocabulary-model.md index 9ba7c79a7..b53601e80 100644 --- a/docs/design/decisions/vocabulary-model.md +++ b/docs/design/decisions/vocabulary-model.md @@ -218,6 +218,7 @@ Open: #752 (phase 2, derived ambiguity; its sub-phases 2a to 2m, each its own PR - `dean`, `justice` and `major` gain an office or military reading beside a dated `given` one; `justice`'s exclusion (#606) is replaced by the reading. The batches of 2j declare the rest. Adding the four fields changes `Lexicon`'s pickle layout, as phase 2h did. - **2026-10-26 #752, phase 2i (Derek) — `attaches` MAY NAME A TITLE WORD AS WELL AS A KIND, AND `grace` AND `marshal` JOIN THE CONTESTED TITLES.** Amends the `attaches` bullet of the 2026-10-25 #752, phase 2i entry: a kind reaches every word that later joins it, and once `marshal` became a contested military word the military kind made `Sgt Marshal Smith` a title phrase. A list entry that is no kind must be a word with a title reading (a build check, its mutation in tests/v2/test_vocab.py). `major` attaches to `general` and `sergeant` and `sgt` to `major`. `grace` (style) and `marshal` (military, its #606 exclusion replaced) carry dated `given` readings. The measurement and Derek's answers are decisions/H9's entry of this date. +- **2026-10-26 #752, phase 2j, `king` (Derek) — THE FOURTH TITLE BATCH: `king` has a dated `given` reading**, US SSA 37,890 births and Census rank 34 as a surname, so it is a title only inside a title phrase. `King Curtis` and `Mr King Smith` read given 'King'; a monarch written with the bare title does too (`King Henry`), the cost Derek accepted on 2026-10-26. `pope` replaces `king` as the worked example of a title that is also a surname wherever the rules and tests used it. The measurement is decisions/H9's entry of this date. - **2026-10-26 #752, phase 2j, `buddha`, `siddha` and `gyani` (#869) — THE THIRD TITLE BATCH: each has a declared `given` reading**, `siddha`'s and `gyani`'s without a count, which their notes explain: the first halves of Nepali compound given names, which no source outside nepal-candidates counts. `Buddha Bahadur Tamang` reads given 'Buddha', middle 'Bahadur'; `guru` stays a title for a `ne` pack (the 2026-10-24 #752 (Derek) entry). The measurement is decisions/H9's entry of this date. - **2026-10-26 #752, phase 2j, `mahdi` and `bard` (#867) — THE SECOND TITLE BATCH: both words have a dated `given` reading.** `Mahdi Karimi`, `Mr Mahdi Karimi`, `Karimi, Mahdi` and `Bard Larsen` read the given name, where 1.4.0 through 2.6.0 read a title; no listed phrase holds either word, so nothing is reported. The measurement is decisions/H9's entry of this date. - **2026-10-26 #752, phase 2j, `wing` — THE FIRST TITLE BATCH: `wing` HAS A DATED `given` READING.** The order is the 2026-10-24 #752 (Derek) entry's. Decision 10 had already read `wing` as a name at the head of the name, so the reading reaches the parts decision 10 left as listed, after a comma and ending the name: `Lau, Wing Kai` reads given 'Wing', and `John Smith Wing.` family 'Wing.'. The rule and the measurement are decisions/H9's entry of this date. diff --git a/docs/design/rules/H-titles-and-honorifics.md b/docs/design/rules/H-titles-and-honorifics.md index ca3a923e0..3743847e5 100644 --- a/docs/design/rules/H-titles-and-honorifics.md +++ b/docs/design/rules/H-titles-and-honorifics.md @@ -1,5 +1,5 @@ ## Titles & honorifics (H) -Background: an honorific title precedes a name and is not itself part of it; it addresses or ranks the person. Most titles address by surname ("Mr. Johnson"), but a few — knighthoods, some clerical and courtesy titles — address by given name ("Sir John"). The library keeps a vocabulary of titles and, separately, of these given-name titles. A period-marked word is claimed by SHAPE at the front and by VOCABULARY at the back. At the front an unlisted abbreviation is a title (H2), the shape outranking the vocabulary save a given name written short; at the back there is no shape rule, so only a listed title word chains into the title (H5) and an unlisted abbreviation stays a name word. A BARE title word at the back is a name word too, TITLES holding ordinary surnames — king, judge, bishop — which is what bars the blanket vocabulary-wins answer (#316, decided 2026-09-08); the one exception is a listed salutation ending the given part after a family comma, the comma having marked the surname's place (H8). Some title words need a partner to be titles at all: a title that is also borne as a given name, and a word that only qualifies a head title, are titles only inside a title phrase (H9), so "Dean Smith" and "Wing Lau" read given names where "Dean of Students" and "Wing Commander" read titles. An input the title peel eats down to one last title-vocabulary word is H4's, and what it does with that word is a convention rather than a reading of the vocabulary. Two criteria govern two different questions here. Membership in the given-name-title list follows HOW THE TITLE ADDRESSES: a title that precedes and addresses by the given name belongs (Sir, Sheikh, the Arabic honorifics الدكتور/الشيخ — which qualify even though those traditions fully retain family names). Whether an EMPTY FAMILY is correct output is the separate question, governed by surname retention: renunciation abolishes the surname, so for Swami, Guru, Baba or Lama family="" is right (#346), while rabbi and imam traditions keep surnames — "Rabbi Cohen" addresses by title and keeps family "Cohen". Conflating the two criteria either ejects the Arabic entries or sweeps in titles that break +Background: an honorific title precedes a name and is not itself part of it; it addresses or ranks the person. Most titles address by surname ("Mr. Johnson"), but a few — knighthoods, some clerical and courtesy titles — address by given name ("Sir John"). The library keeps a vocabulary of titles and, separately, of these given-name titles. A period-marked word is claimed by SHAPE at the front and by VOCABULARY at the back. At the front an unlisted abbreviation is a title (H2), the shape outranking the vocabulary save a given name written short; at the back there is no shape rule, so only a listed title word chains into the title (H5) and an unlisted abbreviation stays a name word. A BARE title word at the back is a name word too, TITLES holding ordinary surnames — pope, judge, bishop — which is what bars the blanket vocabulary-wins answer (#316, decided 2026-09-08); the one exception is a listed salutation ending the given part after a family comma, the comma having marked the surname's place (H8). Some title words need a partner to be titles at all: a title that is also borne as a given name, and a word that only qualifies a head title, are titles only inside a title phrase (H9), so "Dean Smith" and "Wing Lau" read given names where "Dean of Students" and "Wing Commander" read titles. An input the title peel eats down to one last title-vocabulary word is H4's, and what it does with that word is a convention rather than a reading of the vocabulary. Two criteria govern two different questions here. Membership in the given-name-title list follows HOW THE TITLE ADDRESSES: a title that precedes and addresses by the given name belongs (Sir, Sheikh, the Arabic honorifics الدكتور/الشيخ — which qualify even though those traditions fully retain family names). Whether an EMPTY FAMILY is correct output is the separate question, governed by surname retention: renunciation abolishes the surname, so for Swami, Guru, Baba or Lama family="" is right (#346), while rabbi and imam traditions keep surnames — "Rabbi Cohen" addresses by title and keeps family "Cohen". Conflating the two criteria either ejects the Arabic entries or sweeps in titles that break "Rabbi Cohen". diff --git a/docs/design/rules/H1-title-and-one-name-word.md b/docs/design/rules/H1-title-and-one-name-word.md index af820969f..315b48b61 100644 --- a/docs/design/rules/H1-title-and-one-name-word.md +++ b/docs/design/rules/H1-title-and-one-name-word.md @@ -59,7 +59,7 @@ "St Sir de Mesnil" family-first → given="de Mesnil" ``` - A title word in the run that no vocabulary knows does not change what the run addresses by, the last word being the one asked — `His Excellency Lord Duncan` reads family `Duncan` because `lord` is not a given-name title, not because the run is long. `lord` and `lady` stay out of that list by decision (#519): each addresses by given name only as a courtesy style for children of the senior ranks (`Lord Peter`, `Lady Diana`) and by title or surname for every peer and every wife (`Lord Byron`, `Lady Thatcher`), and the text does not say which the bearer is, which the list cannot express; `prince` and `princess` are in it. -- A title word that is also borne as a name, though rarely as the first word of one (`graf`, `greve`, `herra`), is the title in front of a name, so a name that BEGINS with it -- a surname written first without a comma, or a given name -- gives that word to the title, under a declared family-first order too. Written last without a period, or alone before a family comma, it is the name; a period behind it makes it the title by H5, as for `Mary Jane King.` (#606), and a name word behind it before a family comma makes it the title by H6. +- A title word that is also borne as a name, though rarely as the first word of one (`graf`, `greve`, `herra`), is the title in front of a name, so a name that BEGINS with it -- a surname written first without a comma, or a given name -- gives that word to the title, under a declared family-first order too. Written last without a period, or alone before a family comma, it is the name; a period behind it makes it the title by H5, as for `Mary Jane Pope.` (#606), and a name word behind it before a family comma makes it the title by H6. ``` "Greve Smith, Anna" → title="Greve" "Greve Anna" → family="Anna" diff --git a/docs/design/rules/H3-title-runs-floor.md b/docs/design/rules/H3-title-runs-floor.md index 36009d59f..a79fddbde 100644 --- a/docs/design/rules/H3-title-runs-floor.md +++ b/docs/design/rules/H3-title-runs-floor.md @@ -6,8 +6,8 @@ - **The run leaves one NAME word standing**, and a word of the suffix vocabulary is not that word: where everything behind the run is post-nominal, the run gives its last word back to the name, provided that word stands alone and is not itself suffix vocabulary. ``` - "Dr King Jr" → family="King" - "Dr King Jr" → suffix="Jr" + "Dr Pope Jr" → family="Pope" + "Dr Pope Jr" → suffix="Jr" "RA DDS" → family="DDS" ``` diff --git a/docs/design/rules/H4-input-that-is-nothing-but-vocabulary-still-has-to-name-somebody.md b/docs/design/rules/H4-input-that-is-nothing-but-vocabulary-still-has-to-name-somebody.md index c05737905..986067992 100644 --- a/docs/design/rules/H4-input-that-is-nothing-but-vocabulary-still-has-to-name-somebody.md +++ b/docs/design/rules/H4-input-that-is-nothing-but-vocabulary-still-has-to-name-somebody.md @@ -19,8 +19,8 @@ "Lord Chancellor" → ambiguities=("title-or-name",) "The Right Hon. the President of the Queen's Bench Division" → family="Division" "The Right Hon. the President of the Queen's Bench Division" → ambiguities=("title-or-name",) -"Dr. King" → ambiguities=("title-or-name",) -"Dr. King MD" → ambiguities=("title-or-name",) +"Dr. Pope" → ambiguities=("title-or-name",) +"Dr. Pope MD" → ambiguities=("title-or-name",) "Rinpoche" → ambiguities=("suffix-or-name",) "QC MP" → given="QC" "Dr. Smith" → ambiguities=() @@ -28,7 +28,7 @@ **Except:** -- **A title in front takes the input out of the suffix half**, which is reached only where no title was peeled first. What it does NOT do is take the input out of the rule: the title run leaves a name word standing (H3), and where that word is title vocabulary the TITLE half claims it — `Dr. King MD` reports `title-or-name` on `King`, while `RA DDS` reports nothing, `DDS` being no title. +- **A title in front takes the input out of the suffix half**, which is reached only where no title was peeled first. What it does NOT do is take the input out of the rule: the title run leaves a name word standing (H3), and where that word is title vocabulary the TITLE half claims it — `Dr. Pope MD` reports `title-or-name` on `Pope`, while `RA DDS` reports nothing, `DDS` being no title. ``` "RA DDS" → ambiguities=() ``` diff --git a/docs/design/rules/H5-trailing-title-run.md b/docs/design/rules/H5-trailing-title-run.md index d04f60592..ea664cac0 100644 --- a/docs/design/rules/H5-trailing-title-run.md +++ b/docs/design/rules/H5-trailing-title-run.md @@ -30,7 +30,7 @@ "John Smith Prof. Dr." → title="Prof. Dr." "Smith, John Prof." → title="Prof." "John Smith Sir" → family="Sir" -"Mary Jane King" → family="King" +"Mary Jane Pope" → family="Pope" "John Smith Esq." → suffix="Esq." "John Smith Xyz." → family="Xyz." · boundary ``` @@ -63,10 +63,10 @@ **Accepted:** -- The reach is the whole title vocabulary, the ordinary surnames in it included. TITLES holds king, judge and bishop, and a period written behind one of them is enough to make it the title and take it out of the name: `Mary Jane King.` reads title `King.` with family `Jane`, where the bare spelling keeps family `King`. That is a cost accepted under the premise that the input is a name (H Background), not a case this rule prevents — the period is a writing convention rather than evidence about the word, so every title whose spelling wears the abbreviation shape is reachable this way, and the BARE spelling is what the trailing slot is protected from. +- The reach is the whole title vocabulary, the ordinary surnames in it included. TITLES holds pope, judge and bishop, and a period written behind one of them is enough to make it the title and take it out of the name: `Mary Jane Pope.` reads title `Pope.` with family `Jane`, where the bare spelling keeps family `Pope`. That is a cost accepted under the premise that the input is a name (H Background), not a case this rule prevents — the period is a writing convention rather than evidence about the word, so every title whose spelling wears the abbreviation shape is reachable this way, and the BARE spelling is what the trailing slot is protected from. ``` - "Mary Jane King." → title="King." - "Mary Jane King." → family="Jane" + "Mary Jane Pope." → title="Pope." + "Mary Jane Pope." → family="Jane" ``` --- diff --git a/docs/design/rules/H6-title-before-a-family-comma.md b/docs/design/rules/H6-title-before-a-family-comma.md index 3d0c4ba25..888aeddb7 100644 --- a/docs/design/rules/H6-title-before-a-family-comma.md +++ b/docs/design/rules/H6-title-before-a-family-comma.md @@ -42,14 +42,14 @@ - **The run always leaves the family at least one word.** ``` "Dr., John" → family="Dr." · boundary - "Dr. King, John" → family="King" · boundary + "Dr. Pope, John" → family="Pope" · boundary ``` **Accepted:** -- A title word that is also an ordinary surname (king, judge, bishop, greve) opening a surname of two words is read as the title, as it is in front of a name with no comma (H1). A double-barrelled surname that begins with such a word loses it. +- A title word that is also an ordinary surname (pope, judge, bishop, greve) opening a surname of two words is read as the title, as it is in front of a name with no comma (H1). A double-barrelled surname that begins with such a word loses it. ``` - "King Smith, John" → title="King" + "Pope Smith, John" → title="Pope" ``` - What keeps a word in the family is the particle stop and nothing else. German ranks the title vocabulary lists, other than 'Freiherr', are titles only, so they peel, though since 1919 a rank is part of the legal surname for all of them alike; that is the vocabulary's distinction, not this rule's. ``` diff --git a/docs/design/rules/H7-joined-name-unit-carrying-title-vocabulary.md b/docs/design/rules/H7-joined-name-unit-carrying-title-vocabulary.md index faf02331d..b55c3a1b3 100644 --- a/docs/design/rules/H7-joined-name-unit-carrying-title-vocabulary.md +++ b/docs/design/rules/H7-joined-name-unit-carrying-title-vocabulary.md @@ -10,9 +10,9 @@ "St van Bishop" → family="van Bishop" "St van Bishop" → ambiguities=("particle-or-given", "title-or-name") ``` -- **The reach is every such join.** The clause reaches EVERY join whose non-leading member is TITLES vocabulary, not the one word that prompted it: `Smith and King`, `John and King`, `Smith and Bishop` and `John of Judge` all report it, as `John of Prince` and `Smith and Prince` do. +- **The reach is every such join.** The clause reaches EVERY join whose non-leading member is TITLES vocabulary, not the one word that prompted it: `Smith and Pope`, `John and Pope`, `Smith and Bishop` and `John of Judge` all report it, as `John of Prince` and `Smith and Prince` do. ``` - "Smith and King" → ambiguities=("title-or-name",) + "Smith and Pope" → ambiguities=("title-or-name",) "John of Judge" → ambiguities=("title-or-name",) ``` - **Behind a peeled title.** A join OPENING the name with a title word is a title run (H3) instead. Behind a peeled title the join is not: a title needs a following piece and the join is the last one, so `Attorney General of Minnesota` and `Deputy Secretary of State` keep `Attorney` and `Deputy` as the title and report the rest — the two corpus names the clause reached on 2026-09-08, and `General` or `Secretary` being a title is exactly the fork. @@ -35,7 +35,7 @@ **Accepted:** -- That reach is the king/judge/bishop collision set met inside a join, and the report is the honest answer there rather than a misfire — a second surname that is also title vocabulary is exactly the doubt the kind names, and those words stay in the vocabulary for the addressing forms, which is decisions/vocabulary-collisions' call. +- That reach is the pope/judge/bishop collision set met inside a join, and the report is the honest answer there rather than a misfire — a second surname that is also title vocabulary is exactly the doubt the kind names, and those words stay in the vocabulary for the addressing forms, which is decisions/vocabulary-collisions' call. --- **Signal:** count: one name unit left standing, more than one word, holding title vocabulary diff --git a/docs/design/rules/H8-salutation-ending-the-given-part.md b/docs/design/rules/H8-salutation-ending-the-given-part.md index 4143ea84c..a9ea44f1f 100644 --- a/docs/design/rules/H8-salutation-ending-the-given-part.md +++ b/docs/design/rules/H8-salutation-ending-the-given-part.md @@ -36,7 +36,7 @@ ``` - **A title of any other kind stays a name word.** Office, rank and religious words are borne as middle names, and an academic title is not a salutation, so Dr written bare there stays one too. ``` - "Doe, John King" → middle="King" + "Doe, John Pope" → middle="Pope" "Doe, Jane Dr" → middle="Dr" ``` - **A title/suffix dual stays with the suffix run** (S2): Ms and Sr are post-nominals as well, and the suffix reading takes them before any title reading is asked. diff --git a/docs/design/rules/H9-title-phrase.md b/docs/design/rules/H9-title-phrase.md index adaef4ce0..1f5f19c47 100644 --- a/docs/design/rules/H9-title-phrase.md +++ b/docs/design/rules/H9-title-phrase.md @@ -21,6 +21,7 @@ "Sgt Marshal Smith" → given="Marshal" "Mr Mahdi Karimi" → given="Mahdi" "Buddha Bahadur Tamang" → given="Buddha" + "King Curtis" → given="King" ``` - **A modifier in the leading run of titles before the first comma** has its phrase in a head title after it in that run, in `of` after it, or in the object of `of` or `the` there. A modifier outside that run, ending the name or after a comma, is read as any title is, save one that may be a given name, which is read everywhere as it is in that run. ``` @@ -118,6 +119,11 @@ "Gyani Zail Singh" → given="Gyani" "Lord Buddha Tamang" → given="Buddha" ``` +- A monarch written with the bare title in front reads it as the given name, a style before it or `of` after it keeping the title; the record data at hand writes the word there as a given name, and only news text writes monarchs that way. + ``` + "King Henry" → given="King" + "His Majesty King Charles" → title="His Majesty King" + ``` - Once a partner has made the word a title, a coordinating join behind it takes the next word into the title too. ``` "Chief Dean and Mary Smith" → title="Chief Dean and Mary" diff --git a/docs/design/rules/M2-maiden-marker-rule.md b/docs/design/rules/M2-maiden-marker-rule.md index 504f1e6e9..a0fa171e5 100644 --- a/docs/design/rules/M2-maiden-marker-rule.md +++ b/docs/design/rules/M2-maiden-marker-rule.md @@ -34,10 +34,10 @@ "Jane Doe nee Smith Prof. MA" → maiden="Smith" "Jane Doe nee Smith V Prof." → suffix="V" "Jane Doe nee Smith VI Prof." → suffix="VI" - "Jane Doe nee King." → maiden="King." · boundary + "Jane Doe nee Pope." → maiden="Pope." · boundary "Jane Doe nee Prof. Dr." → maiden="Prof." · boundary "Jane van der Berg nee Smith Prof." → title="Prof." - "Jane van der Berg nee Prof. King. MA" → maiden="Prof." · boundary + "Jane van der Berg nee Prof. Pope. MA" → maiden="Prof." · boundary "Jane Doe nee Smith PhD Smith" → maiden="Smith" "Jane Doe nee Smith PhD Smith" → suffix="PhD Smith" "Jane van der Berg née y Jones" → maiden="y Jones" diff --git a/docs/design/rules/S2-suffix-word-ends-a-name-and-never-opens-the-string.md b/docs/design/rules/S2-suffix-word-ends-a-name-and-never-opens-the-string.md index 5a0342b50..ebcc5dc8e 100644 --- a/docs/design/rules/S2-suffix-word-ends-a-name-and-never-opens-the-string.md +++ b/docs/design/rules/S2-suffix-word-ends-a-name-and-never-opens-the-string.md @@ -49,7 +49,7 @@ "Ph. D., John" → family="Ph. D." · boundary ``` - **The connectives, the particle chain and the bound given-name join** ("John van der Berg MA"): the run at a name's trailing slot is read ONCE, once the connectives have joined (P3) and before the particle chain (P2) and the bound given-name join (P5) are made, counting a particle run and the name words the chain will take with it as the one name word it will make of them — the words both particles and suffix vocabulary standing straight behind a particle among them, while a word the reading weighs counts as a word of its own wherever it stands; inside a credential run a word stands on its own, a title word there still a title — and neither join reaches a word the run took. -- **A title run in front of a trailing suffix word** ("Dr King Jr"): a title run leaves one NAME word standing and a post-nominal cannot be it (H3), so `Dr King Jr` reads family `King`, suffix `Jr` exactly as this rule states. +- **A title run in front of a trailing suffix word** ("Dr Pope Jr"): a title run leaves one NAME word standing and a post-nominal cannot be it (H3), so `Dr Pope Jr` reads family `Pope`, suffix `Jr` exactly as this rule states. - **Written case and the count, at the bare ambiguous acronym** ("Jack MA"): written case outranks the count in a mixed-case name everywhere but the first slot after a comma, where the count decides first (S6, C4); the given part's trailing slot after a family comma is read without the count (S5); and an unambiguous credential in front outranks both (S7). - **An ambiguous acronym written with its periods** ("Jack M.A."): it counts unambiguously, and is not the bare acronym S4 counts words to spare for (S3). - **A credential's run against its company** ("John Smith PhD Prof. Ma"): a title standing between the credential and the member, and a member a particle chain (P2) had taken, are the credential's run's (S8), where the company could not reach them (S7); so are a one-letter numeral and a name word, which end the company but not the run. A connective between the credential and a word after it is joined to the credential first (P3), so no run starts, except in a part a credential opens after a comma (C13); one further in is the run's. @@ -61,7 +61,7 @@ ``` "Smith Jr." → family="" ``` -- What the title run's floor (H3) cannot reach stays descriptive and is small: where the run's whole content is the word given back, no title is left to name anybody, so the word stands as the name rather than as the family — `Dr Jr` reads given `Dr`, suffix `Jr`, reporting `title-or-name` (H4), and `Sir Jr` reads by the same branches — given `Sir`, suffix `Jr`, the same kind reported — the run being empty by then and no branch reading `vocab:given-title`. The vocabulary half is decided and unchanged (decisions/v1-xfail-triage: `king` stays a title, for the addressing forms). +- What the title run's floor (H3) cannot reach stays descriptive and is small: where the run's whole content is the word given back, no title is left to name anybody, so the word stands as the name rather than as the family — `Dr Jr` reads given `Dr`, suffix `Jr`, reporting `title-or-name` (H4), and `Sir Jr` reads by the same branches — given `Sir`, suffix `Jr`, the same kind reported — the run being empty by then and no branch reading `vocab:given-title`. The vocabulary half is decided: `pope` is title vocabulary, as `king` was until it became a given name outside a title phrase (decisions/v1-xfail-triage, decisions/H9). ``` "Dr Jr" → suffix="Jr" ``` diff --git a/docs/design/rules/S8-credentials-trailing-run.md b/docs/design/rules/S8-credentials-trailing-run.md index 08240de3f..a1d0283f0 100644 --- a/docs/design/rules/S8-credentials-trailing-run.md +++ b/docs/design/rules/S8-credentials-trailing-run.md @@ -11,7 +11,7 @@ "John Smith MA JD Jones" → suffix="MA JD Jones" "Maria Ana MA Silva" → family="Silva" "Jean Pierre MA DUPONT" → family="DUPONT" - "Mary Jane MA King" → family="King" + "Mary Jane MA Pope" → family="Pope" "Maria Ana MA de la Vega" → family="de la Vega" "Maria Ana MA Ortega y Gasset" → family="Ortega y Gasset" "Smith, John VI Jones" → suffix="VI Jones" @@ -27,7 +27,7 @@ ``` - **What is a credential here.** A title word never starts the run, and neither does a member of the ambiguous class its writing leaves unsettled, a single letter, a connective, a word that is also particle or bound given-name vocabulary, the capitals of `DO` included: a credential is the writer's mark that the post-nominals have begun, and those carry no such mark. An honorific or a generational word carries it as a credential does, whatever its script. ``` - "Mary Jane King Smith" → family="Smith" + "Mary Jane Pope Smith" → family="Smith" "Josep Carod i Rovira" → family="Carod i Rovira" "Mohamed Ali Abd Allah" → family="Allah" "John Smith Ma Jones" → family="Jones" diff --git a/docs/release_log.rst b/docs/release_log.rst index 97d472e87..1a1ae388d 100644 --- a/docs/release_log.rst +++ b/docs/release_log.rst @@ -14,6 +14,7 @@ Release Log - **Read the Brazilian agnomens and French fils as suffixes where the name has a word to spare.** ``Pedro Alves Filho`` and ``Alexandre Dumas fils`` give last ``Alves`` and ``Dumas``, suffix ``Filho`` and ``fils``, where 1.4.0 through 2.6.0 gave middle ``Alves`` and ``Dumas``, last ``Filho`` and ``fils``; ``Neto``, ``Netto``, ``Sobrinho`` and the feminines ``Filha``, ``Neta``, ``Sobrinha`` read the same way. Each is a surname too, so a name of two words keeps it as the last name (``Ana Neto``, ``PEDRO FILHO``) and ``Fils`` in Title case in a mixed-case name stays the last name (``Marie Fils``), the parse reports the choice as a ``suffix-or-name`` ambiguity. ``Lexicon.suffix_words_ambiguous`` lists the words and ``Lexicon.agnomens`` the ones read by the word count alone. :issue:`843`, :issue:`752` - **Read a credential that is also a name, written in capitals in a mixed-case name, as settled.** ``John Smith MA`` reports no ``suffix-or-name`` ambiguity, where 2.0.0 through 2.6.0 reported one, and ``Smith, John MA Jones`` gives suffix ``MA Jones``, where 2.0.0 through 2.6.0 gave middle ``MA Jones`` and 1.4.0 middle ``Jones``, suffix ``MA``. A name written in one case still reports (``JOHN SMITH MA``), and with no comma a name word behind the capitals keeps them a name word, since they may be initials (``Maria Ana MA Silva`` keeps last ``Silva``). :issue:`785`, :issue:`752` - **Read a title that is also a given name as a title only inside a title phrase.** ``Chief Justice John Roberts`` gives title ``Chief Justice``, first ``John``, where 1.4.0 through 2.6.0 gave title ``Chief``, first ``Justice``; ``Field Marshal Bernard Montgomery``, ``Dean of Students Jane Smith`` and ``Major General John Smith`` give the phrase as the title too. Outside a phrase the word is still a name, so ``Dean Smith`` and ``Grace Smith`` give first ``Dean`` and ``Grace``; ``Dean Smith`` now reports a ``title-or-name`` ambiguity unless a comma has marked the given name (``Smith, Dean``), while ``Grace``, a title only in a phrase such as ``His Grace``, reports nothing. Listing the word as a title still makes it one everywhere (``Lexicon.default().add(titles={"dean"})``). :issue:`752`, :issue:`853` + - **Fix the given name King reading as a title.** ``King Curtis`` and ``Mr King Smith`` give first ``King``, where 1.4.0 through 2.6.0 gave title ``King`` and ``Mr King``; ``SMITH, KING`` reads the same. A monarch written with the bare title reads it as a first name too (``King Henry`` gives first ``King``, last ``Henry``), where a style keeps it (``His Majesty King Henry``). :issue:`752`, :issue:`348` - **Fix the Nepali given names Buddha, Siddha and Gyani reading as titles.** ``Buddha Bahadur Tamang`` and ``Gyani Maya Gurung`` give first ``Buddha`` and ``Gyani``, middle ``Bahadur`` and ``Maya``, where 1.4.0 through 2.6.0 gave title ``Buddha`` and ``Gyani``, first ``Bahadur`` and ``Maya``; ``Siddha Raj Joshi`` and ``Tamang, Buddha Bahadur`` read the same. ``Guru`` is still a title. The Sikh title written ``Gyani`` reads as a given name too (``Gyani Zail Singh``); its usual spelling ``Giani`` is still a title. :issue:`869`, :issue:`752` - **Fix the given names Mahdi and Bard reading as titles.** ``Mahdi Karimi`` and ``Bard Larsen`` give first ``Mahdi`` and ``Bard``, where 1.4.0 through 2.6.0 gave title ``Mahdi`` and ``Bard`` with no first name; ``Mr Mahdi Karimi`` and ``Karimi, Mahdi`` read the same. Inside a title phrase either is still a title (``Mahdi of Sudan``), but the epithet with its article is not: ``Muhammad Ahmad, the Mahdi`` gives first ``the Mahdi``, last ``Muhammad Ahmad``, where 1.4.0 through 2.6.0 gave title ``the Mahdi``. :issue:`867`, :issue:`752` - **Fix a lone title qualifier at the head of a name reading as a title.** ``Wing Lau`` and ``Mr Wing Lau`` give first ``Wing``, where 1.4.0 through 2.6.0 gave title ``Wing`` and ``Mr Wing``; a qualifier such as ``Wing``, ``Vice`` or ``Grand`` is a title only with a title after it (``Wing Commander Lau``). After a comma it is still a title (``John Smith, Vice``), except ``Wing``, which is also a given name: ``Lau, Wing Kai`` gives first ``Wing``, middle ``Kai``, where 1.4.0 through 2.6.0 gave title ``Wing``, first ``Kai``. ``John Smith Wing.`` gives last ``Wing.``, as 1.4.0 through 2.2.0 did, where 2.3.0 through 2.6.0 gave title ``Wing.``. Like ``Dean``, it reverses a full name before a comma (``John Smith, Wing`` gives first ``Wing``, last ``John Smith``). :issue:`752` diff --git a/docs/usage.rst b/docs/usage.rst index 29db8e304..62edc0843 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -958,11 +958,11 @@ chunks is the exception, read as a credential by its shape (see 'N.C.C.' That asymmetry is deliberate. The title vocabulary holds hundreds of -words that are ordinary surnames — ``king``, ``judge``, ``bishop`` — +words that are ordinary surnames — ``pope``, ``judge``, ``bishop`` — so inferring a trailing title from the shape alone would cost real names their family field. The period is what separates the two: a trailing title word written *without* one is a name word, so -``parse("Mary Jane King").family`` is ``'King'``. +``parse("Mary Jane Pope").family`` is ``'Pope'``. A credential in front changes that. It starts a run of post-nominals and titles that lasts to the end of the name, so a bare title word diff --git a/nameparser/_lexicon.py b/nameparser/_lexicon.py index 2192a7cf2..14a1f7e13 100644 --- a/nameparser/_lexicon.py +++ b/nameparser/_lexicon.py @@ -717,7 +717,7 @@ class Lexicon: #: Salutations that read as a title where one ENDS the given part #: after a family comma, written bare: "Doe, Jane Mrs" reads title #: "Mrs" where an office or rank word there stays a middle name - #: ("Doe, John King"), rules/H8. A period-marked title word reads as + #: ("Doe, John Pope"), rules/H8. A period-marked title word reads as #: a title there whether listed here or not (rules/H5). Entries need #: not also be in ``titles``; one that is not is never consulted. #: Full default list: diff --git a/nameparser/_pipeline/_pieces.py b/nameparser/_pipeline/_pieces.py index fd7891330..35b6023d8 100644 --- a/nameparser/_pipeline/_pieces.py +++ b/nameparser/_pipeline/_pieces.py @@ -422,11 +422,11 @@ def leading_titles(pieces: Sequence[Sequence[int]], # with no title at all. # # Two residuals. A run whose last word IS suffix vocabulary is not - # given back, so 'Dr King RA PhD' still reads title 'Dr King RA', + # given back, so 'Dr Pope RA PhD' still reads title 'Dr Pope RA', # family 'PhD'. And the floor asks is_suffix_piece, which vetoes a - # bare initial-shaped numeral, so 'Dr King V' keeps the whole run + # bare initial-shaped numeral, so 'Dr Pope V' keeps the whole run # as the title and reads the numeral as the name -- given 'V', - # 'king' being a given-name title and the run's last word, where + # 'pope' being a given-name title and the run's last word, where # 'Dr Smith V' reads family 'V' (a title being no word to spare # for a one-letter numeral, #718). That numeral fork is outside # this floor (decisions/H3). diff --git a/nameparser/config/_compiled.py b/nameparser/config/_compiled.py index 906fb9b00..b3fc0c04c 100644 --- a/nameparser/config/_compiled.py +++ b/nameparser/config/_compiled.py @@ -426,7 +426,6 @@ 'jurist', 'kalbatoni', 'keyboardist', - 'king', "king's", 'kingdom', 'knight', @@ -967,6 +966,7 @@ 'grace', 'gyani', 'justice', + 'king', 'mahdi', 'major', 'marshal', diff --git a/nameparser/vocab/en.toml b/nameparser/vocab/en.toml index 8ffb9cc8e..d9a410b14 100644 --- a/nameparser/vocab/en.toml +++ b/nameparser/vocab/en.toml @@ -391,7 +391,9 @@ nobility = { gender = "f" } [[word]] text = "king" -nobility = { addresses = "given", gender = "m" } +nobility = { addresses = "given", gender = "m", issue = 752, decided = 2026-10-26, note = "a title only inside a title phrase, its given reading the clash (rules/H9): 'His Majesty King Charles' reads the title, 'King Curtis' and 'Mr King Smith' the given name, unreported, since no listed phrase holds it" } +given = { us_ssa = 37890, wikidata = 178, as_of = 2026-10-26, note = "US SSA: male and female births added; Wikidata is a lower bound (United States 92); nam_dict band 1 in the U.S.A. and China" } +family = { us_census_2010 = 465422, wikidata = 4554, as_of = 2026-10-26, note = "US Census rank 34" } [[word]] text = "knight" diff --git a/tests/test_conjunctions.py b/tests/test_conjunctions.py index 9fccc3d9f..c0f7ff93b 100644 --- a/tests/test_conjunctions.py +++ b/tests/test_conjunctions.py @@ -134,8 +134,8 @@ def test_single_char_alpha_conjunction_still_treated_as_initial_when_short(self) self.m(hn.last, "Jane", hn) def test_title_with_three_part_name_last_initial_is_suffix_uppercase_no_period(self) -> None: - hn = HumanName("King John Alexander V") - self.m(hn.title, "King", hn) + hn = HumanName("Pope John Alexander V") + self.m(hn.title, "Pope", hn) self.m(hn.first, "John", hn) self.m(hn.last, "Alexander", hn) self.m(hn.suffix, "V", hn) diff --git a/tests/test_first_name.py b/tests/test_first_name.py index c2dc88b25..cb3cff1dc 100644 --- a/tests/test_first_name.py +++ b/tests/test_first_name.py @@ -33,9 +33,18 @@ def test_sir_exception_to_first_name_rule(self) -> None: self.m(hn.title, "Sir", hn) self.m(hn.first, "Gerald", hn) - def test_king_exception_to_first_name_rule(self) -> None: + def test_pope_exception_to_first_name_rule(self) -> None: + hn = HumanName("Pope Francis") + self.m(hn.title, "Pope", hn) + self.m(hn.first, "Francis", hn) + + def test_king_is_a_first_name_outside_a_title_phrase(self) -> None: + # #752 phase 2j: 'king' is a title only inside a title phrase hn = HumanName("King Henry") - self.m(hn.title, "King", hn) + self.m(hn.first, "King", hn) + self.m(hn.last, "Henry", hn) + hn = HumanName("His Majesty King Henry") + self.m(hn.title, "His Majesty King", hn) self.m(hn.first, "Henry", hn) def test_queen_exception_to_first_name_rule(self) -> None: diff --git a/tests/test_suffixes.py b/tests/test_suffixes.py index 044685f64..18b93dff1 100644 --- a/tests/test_suffixes.py +++ b/tests/test_suffixes.py @@ -149,23 +149,25 @@ def test_king(self) -> None: # suffix 'Jr', and shipped this as an xfail. # Two halves, and this pin means different things about each. # DECIDED 2026-09-01 (v1-xfail triage, decisions/v1-xfail-triage): - # 'king' stays in the titles vocabulary, because removing it breaks - # the addressing forms it is there for ("King Charles"). - # decisions/vocabulary-collisions cuts toward keeping it, so the - # title chain reaches 'King' at all. The comma format reads the - # surname without any of that, and is pinned below as the contrast. + # 'king' stays in the titles vocabulary for the addressing forms. + # SUPERSEDED 2026-10-26 (#752 phase 2j): 'king' is a given name + # outside a title phrase ("His Majesty King Charles" keeps the + # title), so the title chain no longer reaches 'King' here and + # this row reads as 'Dr Smith Jr' does; 'Dr Pope Jr' is the floor's + # row now (tests/v2/cases.py). The comma format is pinned below as + # the contrast. # WHAT BECOMES OF THE LEFTOVER 'Jr': the improvement this pin # anticipated, taken 2026-09-08 (#489, decisions/H3). The title # chain used to eat two words and leave 'Jr' to be the name, against # rules/S2, which reads a trailing suffix-vocabulary word as a # suffix -- and against 'Dr Smith Jr', which reads family 'Smith', - # suffix 'Jr' exactly as S2 states. The leading peel now leaves a - # name word a suffix cannot be: everything behind the run is a - # suffix piece and 'King' is not one, so the run gives it back. - # Every field below is now what 'Dr Smith Jr' reads, so what - # 'king' being title vocabulary still buys this row is the - # 'title-or-name' report on the word left standing -- which is a - # 2.0 surface this v1 facade test does not assert. + # suffix 'Jr' exactly as S2 states. The leading peel then left a + # name word a suffix cannot be: everything behind the run was a + # suffix piece and 'King' was not one, so the run gave it back. + # Every field below is what 'Dr Smith Jr' reads, as it was while + # 'king' was title vocabulary; then the floor's 'title-or-name' + # report on the word left standing was the difference, a 2.0 + # surface this v1 facade test does not assert. hn = HumanName("Dr King Jr") self.m(hn.title, "Dr", hn) self.m(hn.first, "", hn) diff --git a/tests/test_titles.py b/tests/test_titles.py index 28dc59a7c..0cc5f19f9 100644 --- a/tests/test_titles.py +++ b/tests/test_titles.py @@ -36,9 +36,9 @@ def test_leading_period_abbreviation_is_title(self) -> None: self.m(hn.last, "Smith", hn) def test_last_name_is_also_title3(self) -> None: - hn = HumanName("John King") + hn = HumanName("John Pope") self.m(hn.first, "John", hn) - self.m(hn.last, "King", hn) + self.m(hn.last, "Pope", hn) def test_title_with_conjunction(self) -> None: hn = HumanName("Secretary of State Hillary Clinton") @@ -137,8 +137,8 @@ def test_multiple_conjunctions_on_multiple_titles(self) -> None: self.m(hn.last, "Simpson", hn) def test_title_with_last_initial_is_suffix(self) -> None: - hn = HumanName("King John V.") - self.m(hn.title, "King", hn) + hn = HumanName("Pope John V.") + self.m(hn.title, "Pope", hn) self.m(hn.first, "John", hn) self.m(hn.last, "V.", hn) diff --git a/tests/v2/cases.py b/tests/v2/cases.py index afca4ddd6..c7443fc8e 100644 --- a/tests/v2/cases.py +++ b/tests/v2/cases.py @@ -1958,8 +1958,8 @@ def _check_cjk_shape_purity(self) -> None: {"title": "Attorney General", "given": "Eric", "family": "Holder", "suffix": "Jr."}, classification="fix(#602)"), - Case("a_title_word_does_not_start_the_run", "Mary Jane King Smith", - {"given": "Mary", "middle": "Jane King", "family": "Smith"}, + Case("a_title_word_does_not_start_the_run", "Mary Jane Pope Smith", + {"given": "Mary", "middle": "Jane Pope", "family": "Smith"}, notes="746 title words are in no suffix set, many of them " "surnames (measured 2026-10-04), so a title word never " "starts the run: a title is read from the end of a name " @@ -2685,8 +2685,8 @@ def _check_cjk_shape_purity(self) -> None: "The fix classification is #274's marker consumption, " "which is what makes this differ from 1.4.0 (first " "'John', middle 'née', last 'Jones')"), - Case("title_plus_one_word_comma_suffix", "Dr. King, Jr.", - {"title": "Dr.", "family": "King", "suffix": "Jr."}, + Case("title_plus_one_word_comma_suffix", "Dr. Pope, Jr.", + {"title": "Dr.", "family": "Pope", "suffix": "Jr."}, ambiguities=("title-or-name",), classification="fix(#410)", notes="the most ordinary shape H1's widening touches, and " "the one the suite could least afford to leave " @@ -2697,9 +2697,9 @@ def _check_cjk_shape_purity(self) -> None: "(_clause_free_latin_corpus_names), and " "'Smith, Dr.' takes its family from the comma rule " "(C1), not from H1. 1.4.0 had the same empty family " - "here (title 'Dr.', first 'King', last ''), so this " + "here (title 'Dr.', first 'Pope', last ''), so this " "row records a v1 bug fixed, not a v2 divergence. The " - "`title-or-name` flag is H4's and not #410's: `king` is " + "`title-or-name` flag is H4's and not #410's: `pope` is " "title vocabulary and a suffix beside the word is not a " "shape that silences the convention"), Case("title_plus_one_word_multi_word_maiden", @@ -5991,8 +5991,8 @@ def _check_cjk_shape_purity(self) -> None: "from starting the credential's run -- here a family name written in capitals by convention, which counts as the name word behind. " "1.4.0 through 2.6.0 read the same"), Case("capitals_before_a_title_word_surname_stay_a_name", - "Mary Jane MA King", - {"given": "Mary", "middle": "Jane MA", "family": "King"}, + "Mary Jane MA Pope", + {"given": "Mary", "middle": "Jane MA", "family": "Pope"}, notes="S8 (Derek, 2026-10-26, #785): with no family comma a " "name word behind a member its capitals settle keeps it " "from starting the credential's run -- here a surname that is also title vocabulary, which inside the run would read as a title. " @@ -6541,10 +6541,11 @@ def _check_cjk_shape_purity(self) -> None: "a name is a name word (rules/H5), so the chain takes " "it (#623 moves only the period-marked spelling)"), Case("the_first_word_after_the_marker_stays_even_as_a_title", - "Jane Doe nee King.", - {"given": "Jane", "family": "Doe", "maiden": "King."}, + "Jane Doe nee Pope.", + {"given": "Jane", "family": "Doe", "maiden": "Pope."}, + classification="fix(#274)", notes="rules/M2's first-word floor covers the title stop: " - "the marker announced a name, and 'King.' is a borne " + "the marker announced a name, and 'Pope.' is a borne " "surname the title vocabulary also lists. Unchanged " "from 2.3.0"), Case("the_first_word_floor_holds_for_titles_too", @@ -6607,12 +6608,12 @@ def _check_cjk_shape_purity(self) -> None: "the title up. 2.3.0 read maiden 'Smith Prof.' for the " "same reason the bare form did"), Case("the_floor_keeps_the_first_word_out_of_the_chains_count", - "Jane Doe nee King. ba", + "Jane Doe nee Pope. ba", {"given": "Jane", "family": "Doe", "suffix": "ba", - "maiden": "King."}, + "maiden": "Pope."}, classification="fix(#533)", ambiguities=("suffix-or-name",), - notes="2.3.0 read maiden 'King. ba' as it read 'Smith ba' -- " + notes="2.3.0 read maiden 'Pope. ba' as it read 'Smith ba' -- " "no credential stop before #533; the floor keeps the " "first word in the chain-and-peel count, so the " "reading #533 gave stands"), @@ -10380,10 +10381,10 @@ def _check_cjk_shape_purity(self) -> None: ambiguities=("title-or-name",), classification="feat(#491)", notes="decisions/v1-xfail-triage's fourth NOT FIXED entry: " "the reading stands, and the guess stops being silent"), - Case("all_titles_input_a_title_vocabulary_surname", "Dr. King", - {"title": "Dr.", "family": "King"}, + Case("all_titles_input_a_title_vocabulary_surname", "Dr. Pope", + {"title": "Dr.", "family": "Pope"}, ambiguities=("title-or-name",), classification="feat(#491)", - notes="`king` is title vocabulary for the addressing forms, so " + notes="`pope` is title vocabulary for the addressing forms, so " "the peel leaves one title-vocabulary word and the rule " "claims it"), Case("all_titles_input_family_first", "Lord Chancellor", @@ -10397,17 +10398,17 @@ def _check_cjk_shape_purity(self) -> None: "H1's retag until the family-first orders were measured " "silent there"), Case("title_run_then_a_credential_reports_the_name_word", - "Dr. King MD", - {"title": "Dr.", "family": "King", "suffix": "MD"}, + "Dr. Pope MD", + {"title": "Dr.", "family": "Pope", "suffix": "MD"}, ambiguities=("title-or-name",), classification="fix(#489)", notes="rules/H3's floor: everything behind the run is a " - "suffix piece and `King` is not one, so the run gives " - "it back and the credential is a credential. `king` " + "suffix piece and `Pope` is not one, so the run gives " + "it back and the credential is a credential. `pope` " "being title vocabulary, the word left standing is " - "H4's title half -- the same reading `Dr. King, Jr.` " + "H4's title half -- the same reading `Dr. Pope, Jr.` " "has always had"), Case("title_run_then_a_bare_generational_reports_the_name_word", - "Dr King Jr", {"title": "Dr", "family": "King", "suffix": "Jr"}, + "Dr Pope Jr", {"title": "Dr", "family": "Pope", "suffix": "Jr"}, ambiguities=("title-or-name",), classification="fix(#489)", notes="v1 wanted exactly this reading and the 2026-09-01 " "triage pinned the old one as NOT FIXED; the " @@ -10648,13 +10649,13 @@ def _check_cjk_shape_purity(self) -> None: "title. The empty-head comma shape AGENTS.md's sweep " "paragraph asks for; 1.4.0 read first 'Ma', suffix 'Dr.'"), Case("lone_joined_unit_carrying_collision_set_title_vocabulary", - "Smith and King", {"given": "Smith and King"}, + "Smith and Pope", {"given": "Smith and Pope"}, ambiguities=("title-or-name",), classification="feat(#491)", notes="the clause reaches every join whose non-leading member " "is TITLES vocabulary, not just `prince`: `John and " - "King`, `Smith and Bishop` and `John of Judge` report " - "it too. That is the king/judge/bishop collision set " + "Pope`, `Smith and Bishop` and `John of Judge` report " + "it too. That is the pope/judge/bishop collision set " "(decisions/vocabulary-collisions) met inside a " "join, and the report is deliberate -- a second surname " "that is also title vocabulary is the doubt the kind " @@ -12165,8 +12166,8 @@ def _check_cjk_shape_purity(self) -> None: "holds ordinary surnames and a bare trailing title word " "is a name word (#316(b), deliberately out)"), Case("title_word_trailing_ordinary_surname_is_a_name_word", - "Mary Jane King", {"given": "Mary", "middle": "Jane", - "family": "King"}, + "Mary Jane Pope", {"given": "Mary", "middle": "Jane", + "family": "Pope"}, classification="parity", notes="negative control: the decisions' trailing-position " "rule that must NOT be adopted, still not adopted"), @@ -12201,8 +12202,8 @@ def _check_cjk_shape_purity(self) -> None: "what makes it the only one. The single-word half of " "H4 cannot be reached this way -- a lone title-" "vocabulary word in front of a trailing title is taken " - "by the LEADING run first ('King Prof.' reads title " - "'King')"), + "by the LEADING run first ('Pope Prof.' reads title " + "'Pope')"), Case("title_word_trailing_after_a_family_comma", "Smith, John Prof.", {"title": "Prof.", "given": "John", "family": "Smith"}, @@ -12549,6 +12550,35 @@ def _check_cjk_shape_purity(self) -> None: {"title": "Lord", "family": "Buddha"}, notes="1.4.0's fields; H4 had reported title-or-name on an input that was all " "vocabulary; 'Buddha' is a name word now, as 'Mahdi' is"), + Case("given_name_title_king_at_the_head", "King Curtis", + {"given": "King", "family": "Curtis"}, classification="fix(#348)", + notes="H9: 'king' is a title only inside a title phrase; read " + "title 'King', given 'Curtis' 1.4.0 through 2.6.0 " + "(#752 phase 2j)"), + Case("given_name_title_king_after_a_salutation", "Mr King Smith", + {"title": "Mr", "given": "King", "family": "Smith"}, + classification="fix(#853)", + notes="H9: a salutation is no partner; read title 'Mr King' " + "before"), + Case("given_name_title_king_in_the_listing_form", "SMITH, KING MR", + {"title": "MR", "given": "KING", "family": "SMITH"}, + classification="fix(#752)", + notes="H9, FEC's listing form; read title 'KING MR' before"), + Case("king_behind_a_style_keeps_the_title", "His Majesty King Charles", + {"title": "His Majesty King", "given": "Charles"}, + classification="fix(#489)", + notes="H9: a style is a partner, and the title addresses by the " + "given name, as master read it; 1.4.0 read last 'Charles'"), + Case("monarch_with_a_bare_leading_king", "King Henry", + {"given": "King", "family": "Henry"}, + classification="fix(#752)", + notes="H9's Accepted clause: a monarch written with the bare " + "title reads it as the given name (Derek, 2026-10-26); " + "read title 'King', given 'Henry' 1.4.0 through 2.6.0"), + Case("pope_still_addresses_by_the_given_name", "Pope Francis", + {"title": "Pope", "given": "Francis"}, + notes="'pope' has no given reading: still the title that " + "addresses by the given name, H1"), Case("given_name_modifier_after_a_style", "Hon. Wing Lau", {"title": "Hon.", "given": "Wing", "family": "Lau"}, notes="H9: the modifier's test, not a contested word's style " @@ -12630,8 +12660,8 @@ def _check_cjk_shape_purity(self) -> None: "are on en.toml's entry), since a middle name may be a " "surname"), Case("bare_office_word_ending_a_family_comma_given_part", - "Doe, John King", - {"given": "John", "middle": "King", "family": "Doe"}, + "Doe, John Pope", + {"given": "John", "middle": "Pope", "family": "Doe"}, notes="rules/H8's Except: only a salutation qualifies, and an " "office or rank word is borne as a middle name"), Case("bare_salutation_without_a_comma_is_a_name_word", diff --git a/tests/v2/pipeline/test_group.py b/tests/v2/pipeline/test_group.py index ab172ca92..a8ff07f91 100644 --- a/tests/v2/pipeline/test_group.py +++ b/tests/v2/pipeline/test_group.py @@ -1926,7 +1926,7 @@ def test_the_first_word_floor_holds_a_title_out_of_the_chain() -> None: """A title straight after the marker stays the maiden name: the floor is the title chain's own, so the chain never takes that word and stops at it, taking only the titles behind it.""" - assert _maiden_texts(_grouped("Jane Doe nee King.", lexicon=Lexicon.default())) == ["King."] + assert _maiden_texts(_grouped("Jane Doe nee Pope.", lexicon=Lexicon.default())) == ["Pope."] assert _maiden_texts(_grouped("Jane Doe nee Prof. Dr.", lexicon=Lexicon.default())) == ["Prof."] @@ -1936,8 +1936,8 @@ def test_the_floor_keeps_the_first_word_in_the_chains_count() -> None: first word after the marker, so the re-peel's count still holds it and a trailing suffix behind a chained title reads as 'Jane Doe nee Smith ba' reads it.""" - out = _grouped("Jane Doe nee King. ba", lexicon=Lexicon.default()) - assert _maiden_texts(out) == ["King."] + out = _grouped("Jane Doe nee Pope. ba", lexicon=Lexicon.default()) + assert _maiden_texts(out) == ["Pope."] # the control: an unlisted first word gives the same count ok = _grouped("Jane Doe nee Smith ba", lexicon=Lexicon.default()) assert _maiden_texts(ok) == ["Smith"] diff --git a/tests/v2/pipeline/test_pieces.py b/tests/v2/pipeline/test_pieces.py index d08be9068..d762adf03 100644 --- a/tests/v2/pipeline/test_pieces.py +++ b/tests/v2/pipeline/test_pieces.py @@ -208,8 +208,8 @@ def test_the_leading_run_gives_back_the_name_word_a_suffix_cannot_be() -> None: word back -- and only where the rest really is all suffix pieces, which is what separates the first two readings below. """ - assert _leading("Dr King Jr") == 1 # the floor fired: 2 -> 1 - assert _leading("Dr King") == 1 # no all-suffix rest to see + assert _leading("Dr Pope Jr") == 1 # the floor fired: 2 -> 1 + assert _leading("Dr Pope") == 1 # no all-suffix rest to see assert _leading("Lord Chancellor Jr") == 1 assert _leading("Lord Chancellor") == 1 @@ -884,7 +884,7 @@ def test_a_title_word_inside_the_run_reads_as_a_title() -> None: def test_a_title_word_never_starts_the_run() -> None: # 746 title words are in no suffix set, many of them surnames - assert parse("Mary Jane King Smith").family == "Smith" + assert parse("Mary Jane Pope Smith").family == "Smith" def test_the_ambiguous_class_and_initials_do_not_start_the_run() -> None: @@ -914,7 +914,7 @@ def test_a_member_its_capitals_settle_starts_the_run() -> None: for text, family in (("John Smith MA Jones", "Jones"), ("Maria Ana MA Silva", "Silva"), ("Jean Pierre MA DUPONT", "DUPONT"), - ("Mary Jane MA King", "King")): + ("Mary Jane MA Pope", "Pope")): assert parse(text).family == family, text assert parse("John Smith DO Jones").family == "DO Jones" @@ -949,7 +949,7 @@ def test_a_title_inside_the_given_parts_run_is_a_title() -> None: _CANDIDATE_HEADS = ("Jane Doe", "J.", "Jane van der Berg", "Mai Le", "abdul Berg", "John") _CANDIDATE_WORDS = ("Smith", "VI", "V", "III", "MA", "Ma", "PhD", "Jr.", - "Prof.", "Dr.", "King.", "do", "DO", "de", "X.Y.Z.", + "Prof.", "Dr.", "Pope.", "do", "DO", "de", "X.Y.Z.", "Ph. D.", "i", "Jones") diff --git a/tests/v2/rules_budget.json b/tests/v2/rules_budget.json index dace1c0c5..76e8ec8c6 100644 --- a/tests/v2/rules_budget.json +++ b/tests/v2/rules_budget.json @@ -25,7 +25,7 @@ "H6": {"words": 316, "then_words": 79, "because_sentences": 3, "except": 4, "precedence": 0, "accepted": 2, "accepted_words": 100}, "H7": {"words": 343, "then_words": 274, "because_sentences": 2, "except": 0, "precedence": 0, "accepted": 1, "accepted_words": 54}, "H8": {"words": 431, "then_words": 68, "because_sentences": 3, "except": 3, "precedence": 3, "accepted": 3, "accepted_words": 128}, - "H9": {"words": 660, "then_words": 263, "because_sentences": 3, "except": 0, "precedence": 5, "accepted": 8, "accepted_words": 293}, + "H9": {"words": 660, "then_words": 263, "because_sentences": 3, "except": 0, "precedence": 5, "accepted": 9, "accepted_words": 340}, "M1": {"words": 231, "then_words": 120, "because_sentences": 2, "except": 1, "precedence": 2, "accepted": 0, "accepted_words": 0}, "M2": {"words": 714, "then_words": 435, "because_sentences": 1, "except": 4, "precedence": 1, "accepted": 6, "accepted_words": 209}, "M3": {"words": 234, "then_words": 84, "because_sentences": 2, "except": 2, "precedence": 2, "accepted": 1, "accepted_words": 80}, @@ -54,7 +54,7 @@ "R4": {"words": 991, "then_words": 729, "because_sentences": 1, "except": 4, "precedence": 0, "accepted": 4, "accepted_words": 600}, "R5": {"words": 250, "then_words": 154, "because_sentences": 2, "except": 0, "precedence": 0, "accepted": 0, "accepted_words": 0}, "S1": {"words": 306, "then_words": 26, "because_sentences": 1, "except": 2, "precedence": 3, "accepted": 0, "accepted_words": 0}, - "S2": {"words": 657, "then_words": 119, "because_sentences": 1, "except": 0, "precedence": 7, "accepted": 3, "accepted_words": 214}, + "S2": {"words": 657, "then_words": 119, "because_sentences": 1, "except": 0, "precedence": 7, "accepted": 3, "accepted_words": 222}, "S3": {"words": 960, "then_words": 398, "because_sentences": 3, "except": 4, "precedence": 5, "accepted": 6, "accepted_words": 343}, "S4": {"words": 306, "then_words": 164, "because_sentences": 2, "except": 0, "precedence": 3, "accepted": 0, "accepted_words": 0}, "S5": {"words": 731, "then_words": 400, "because_sentences": 1, "except": 2, "precedence": 1, "accepted": 0, "accepted_words": 0}, diff --git a/tests/v2/test_parser.py b/tests/v2/test_parser.py index 0a3f4537e..a8c4af83e 100644 --- a/tests/v2/test_parser.py +++ b/tests/v2/test_parser.py @@ -808,7 +808,7 @@ def test_every_bound_word_spares_the_family_before_every_numeral( @pytest.mark.parametrize("title", [ - "Sir", "Sheikh", "King", "الشيخ", "Dr.", "Mr.", "Mr. Sir", "Sir Dr.", + "Sir", "Sheikh", "Pope", "الشيخ", "Dr.", "Mr.", "Mr. Sir", "Sir Dr.", "Sir and Dame", "Mr. and Mrs.", "Sheik and Mrs"]) def test_the_p5_licence_and_h1_read_a_title_run_the_same_way( title: str) -> None: diff --git a/tests/v2/test_properties.py b/tests/v2/test_properties.py index 46a950936..6b34d02f9 100644 --- a/tests/v2/test_properties.py +++ b/tests/v2/test_properties.py @@ -914,7 +914,7 @@ def test_a_title_the_clause_gives_up_lands_in_title() -> None: heads = ("Jane Doe", "J.", "Jane van der Berg", "abdul Berg") bodies = ("Smith Prof.", "Smith MA Prof.", "Smith Prof. MA", "Smith V Prof.", "Smith Ma Prof.", "Smith Prof. Dr.", - "Prof.", "Prof. Dr.", "Smith King.", "Smith MA do Prof.", + "Prof.", "Prof. Dr.", "Smith Pope.", "Smith MA do Prof.", "Smith i DO Prof.", "Smith i MA Prof.", "Smith St.", "Smith MA St.", "Smith V St.") failures = [] @@ -937,7 +937,7 @@ def test_a_title_the_clause_gives_up_lands_in_title() -> None: def test_a_title_first_word_counts_as_a_word() -> None: """rules/M2's first-word floor, over two INPUTS: the floor is the title chain's own (`trailing_titles` takes it), so whether the - first word after the marker IS title vocabulary ('King.') or not + first word after the marker IS title vocabulary ('Pope.') or not ('Smith') must not change what a trailing credential behind it reads as -- the floor holds either word out of the chain's count, so the credential is read the same way in both. Both sides must @@ -957,7 +957,7 @@ def test_a_title_first_word_counts_as_a_word() -> None: """ forms = ("Jane Doe nee {} {}", "Jane Doe nee {} {}, MD") runs = ("ba", "MA", "V", "PhD", "MA JD") - heads = ("King.", "Smith") + heads = ("Pope.", "Smith") failures = [] for form in forms: for tail in runs: diff --git a/tools/differential/corpus_rules.jsonl b/tools/differential/corpus_rules.jsonl index 767c19817..d0f6acd95 100644 --- a/tools/differential/corpus_rules.jsonl +++ b/tools/differential/corpus_rules.jsonl @@ -128,7 +128,6 @@ "Doe, John Do" "Doe, John Goodman" "Doe, John Jr Mr" -"Doe, John King" "Doe, John MA" "Doe, John MA JD" "Doe, John MA Smith" @@ -138,6 +137,7 @@ "Doe, John Master" "Doe, John Mr Jr" "Doe, John Msc.Ed." +"Doe, John Pope" "Doe, John X.Y.Z." "Doe, John ma Ma" "Doe, John ma do" @@ -149,7 +149,7 @@ "Doe, PhD Jones" "Doe, abdul Mrs" "Dr Jr" -"Dr King Jr" +"Dr Pope Jr" "Dr Smith V" "Dr." "Dr. (MA)" @@ -160,10 +160,10 @@ "Dr. Jr née Jones" "Dr. Jr., John" "Dr. Juan Q. Xavier de la Vega III" -"Dr. King" -"Dr. King MD" -"Dr. King, John" "Dr. Mc Donald, John" +"Dr. Pope" +"Dr. Pope MD" +"Dr. Pope, John" "Dr. Sir John" "Dr. Smith" "Dr. Smith II, Sir" @@ -234,6 +234,7 @@ "Her Royal Highness Princess Anne" "His Excellency Lord Duncan" "His Grace John Smith" +"His Majesty King Charles" "Hon. Wing Lau" "Hudson, Rock" "II Van Johnson" @@ -300,9 +301,9 @@ "Jane Doe Mrs" "Jane Doe PhD nee Smith" "Jane Doe de D Junior" -"Jane Doe nee King." "Jane Doe nee MA" "Jane Doe nee MA Smith" +"Jane Doe nee Pope." "Jane Doe nee Prof. Dr." "Jane Doe nee Puig i" "Jane Doe nee Puig i Soler" @@ -340,7 +341,7 @@ "Jane nee Smith Jr., AD" "Jane née Jones Smith" "Jane née Jr y Jones" -"Jane van der Berg nee Prof. King. MA" +"Jane van der Berg nee Prof. Pope. MA" "Jane van der Berg nee Smith Prof." "Jane van der Berg née" "Jane van der Berg née Jones" @@ -596,7 +597,8 @@ "Kim, AE-RA" "Kim, Ae-Ra" "Kim김민준씨, MA" -"King Smith, John" +"King Curtis" +"King Henry" "Konstantin VII." "LT.GOV. JOHN DOE" "Lau, Wing" @@ -627,10 +629,10 @@ "Marquess of Bath" "Marshal Yanda" "Mary Beth Smith" -"Mary Jane King" -"Mary Jane King Smith" -"Mary Jane King." -"Mary Jane MA King" +"Mary Jane MA Pope" +"Mary Jane Pope" +"Mary Jane Pope Smith" +"Mary Jane Pope." "Mary Smith née Jones Prof." "Mary-​Jane Smith" "Mc Donald" @@ -692,6 +694,7 @@ "Ph. D., John" "Pharm D John Smith" "Pieter Bruegel stariji Jones" +"Pope Smith, John" "President of the United States Barack Obama" "Prince of Wales" "Prince of Wales Jr" @@ -764,7 +767,7 @@ "Smith VI, AD" "Smith VI, John" "Smith Vi, John" -"Smith and King" +"Smith and Pope" "Smith née Jones" "Smith née Jones PhD" "Smith, A.B." diff --git a/tools/differential/snapshot.jsonl b/tools/differential/snapshot.jsonl index eab5ced02..6137c6f03 100644 --- a/tools/differential/snapshot.jsonl +++ b/tools/differential/snapshot.jsonl @@ -698,7 +698,6 @@ {"name": "Doe, John Goodman", "given": "John", "middle": "Goodman", "family": "Doe", "initials": "J. G. D."} {"name": "Doe, John III", "given": "John", "family": "Doe", "suffix": "III", "initials": "J. D."} {"name": "Doe, John Jr Mr", "title": "Mr", "given": "John", "family": "Doe", "suffix": "Jr", "initials": "J. D."} -{"name": "Doe, John King", "given": "John", "middle": "King", "family": "Doe", "initials": "J. K. D."} {"name": "Doe, John MA", "given": "John", "family": "Doe", "suffix": "MA", "initials": "J. D."} {"name": "Doe, John MA JD", "given": "John", "family": "Doe", "suffix": "MA JD", "initials": "J. D."} {"name": "Doe, John MA Jr", "given": "John", "family": "Doe", "suffix": "MA Jr", "initials": "J. D."} @@ -713,6 +712,7 @@ {"name": "Doe, John Mr Jr", "title": "Mr", "given": "John", "family": "Doe", "suffix": "Jr", "initials": "J. D."} {"name": "Doe, John Msc.Ed.", "given": "John", "family": "Doe", "suffix": "Msc.Ed.", "initials": "J. D."} {"name": "Doe, John PhD MA", "given": "John", "family": "Doe", "suffix": "PhD MA", "initials": "J. D."} +{"name": "Doe, John Pope", "given": "John", "middle": "Pope", "family": "Doe", "initials": "J. P. D."} {"name": "Doe, John Q. MA", "given": "John", "middle": "Q.", "family": "Doe", "suffix": "MA", "initials": "J. Q. D."} {"name": "Doe, John X.Y.Z.", "given": "John", "family": "Doe", "suffix": "X.Y.Z.", "ambiguities": ["SUFFIX_OR_NAME"], "initials": "J. D."} {"name": "Doe, John jr., MD", "given": "John", "family": "Doe", "suffix": "jr., MD", "initials": "J. D.", "capitalized_force": "John Doe Jr., MD"} @@ -756,8 +756,9 @@ {"name": "Donovan McNabb-Smith", "given": "Donovan", "family": "McNabb-Smith", "initials": "D. M."} {"name": "Dr John Smith", "title": "Dr", "given": "John", "family": "Smith", "initials": "J. S."} {"name": "Dr Jr", "given": "Dr", "suffix": "Jr", "ambiguities": ["TITLE_OR_NAME"], "initials": "D."} -{"name": "Dr King Jr", "title": "Dr", "family": "King", "suffix": "Jr", "ambiguities": ["TITLE_OR_NAME"], "initials": "K."} +{"name": "Dr King Jr", "title": "Dr", "family": "King", "suffix": "Jr", "initials": "K."} {"name": "Dr Martin Luther King, Jr.", "title": "Dr", "given": "Martin", "middle": "Luther", "family": "King", "suffix": "Jr.", "initials": "M. L. K."} +{"name": "Dr Pope Jr", "title": "Dr", "family": "Pope", "suffix": "Jr", "ambiguities": ["TITLE_OR_NAME"], "initials": "P."} {"name": "Dr Smith V", "title": "Dr", "given": "Smith", "family": "V", "ambiguities": ["SUFFIX_OR_NAME"], "initials": "S. V."} {"name": "Dr 田中さん, V.", "title": "Dr", "family": "田中", "suffix": "さん, V.", "initials": "田."} {"name": "Dr 김민준, Jr.", "title": "Dr", "given": "민준", "family": "김", "suffix": "Jr.", "initials": "민. 김."} @@ -809,13 +810,14 @@ {"name": "Dr. Juan de la Vega", "title": "Dr.", "given": "Juan", "family": "de la Vega", "initials": "J. V."} {"name": "Dr. Juan de la Vega III", "title": "Dr.", "given": "Juan", "family": "de la Vega", "suffix": "III", "initials": "J. V."} {"name": "Dr. Juan de la Vega, Jr.", "title": "Dr.", "given": "Juan", "family": "de la Vega", "suffix": "Jr.", "initials": "J. V."} -{"name": "Dr. King", "title": "Dr.", "family": "King", "ambiguities": ["TITLE_OR_NAME"], "initials": "K."} -{"name": "Dr. King MD", "title": "Dr.", "family": "King", "suffix": "MD", "ambiguities": ["TITLE_OR_NAME"], "initials": "K."} -{"name": "Dr. King, John", "title": "Dr.", "given": "John", "family": "King", "initials": "J. K."} +{"name": "Dr. King", "title": "Dr.", "family": "King", "initials": "K."} {"name": "Dr. Martin Luther King Jr.", "title": "Dr.", "given": "Martin", "middle": "Luther", "family": "King", "suffix": "Jr.", "initials": "M. L. K."} {"name": "Dr. Mazen Elrouqi", "title": "Dr.", "given": "Mazen", "family": "Elrouqi", "initials": "M. E."} {"name": "Dr. Mc Donald, John", "title": "Dr.", "given": "John", "family": "Mc Donald", "initials": "J. D.", "capitalized_force": "Dr. John mc Donald"} {"name": "Dr. Paul Vinzent von Fischer jr. MdB", "title": "Dr.", "given": "Paul", "middle": "Vinzent", "family": "von Fischer", "suffix": "jr. MdB", "initials": "P. V. F.", "capitalized_force": "Dr. Paul Vinzent von Fischer Jr. MDB"} +{"name": "Dr. Pope", "title": "Dr.", "family": "Pope", "ambiguities": ["TITLE_OR_NAME"], "initials": "P."} +{"name": "Dr. Pope MD", "title": "Dr.", "family": "Pope", "suffix": "MD", "ambiguities": ["TITLE_OR_NAME"], "initials": "P."} +{"name": "Dr. Pope, John", "title": "Dr.", "given": "John", "family": "Pope", "initials": "J. P."} {"name": "Dr. Sir John", "title": "Dr. Sir", "given": "John", "initials": "J."} {"name": "Dr. Smith", "title": "Dr.", "family": "Smith", "initials": "S."} {"name": "Dr. Smith II, Sir", "title": "Dr. Sir", "family": "Smith", "suffix": "II", "initials": "S."} @@ -1256,6 +1258,7 @@ {"name": "His Grace John Smith", "title": "His Grace", "given": "John", "family": "Smith", "initials": "J. S."} {"name": "His Holiness", "title": "His", "family": "Holiness", "ambiguities": ["TITLE_OR_NAME"], "initials": "H."} {"name": "His Holiness the Dalai Lama", "title": "His Holiness the Dalai", "family": "Lama", "ambiguities": ["TITLE_OR_NAME"], "initials": "L."} +{"name": "His Majesty King Charles", "title": "His Majesty King", "given": "Charles", "initials": "C."} {"name": "Hisham Ibrahim, CPA, CFA", "given": "Hisham", "family": "Ibrahim", "suffix": "CPA, CFA", "initials": "H. I."} {"name": "Hodan Farah Warsame", "given": "Hodan", "middle": "Farah", "family": "Warsame", "initials": "H. F. W."} {"name": "Hon Solo", "title": "Hon", "family": "Solo", "initials": "S."} @@ -1469,10 +1472,10 @@ {"name": "Jane Doe PhD nee Smith", "given": "Jane", "family": "Doe", "suffix": "PhD nee Smith", "ambiguities": ["SUFFIX_OR_NAME"], "initials": "J. D.", "capitalized_force": "Jane Doe PhD Nee Smith"} {"name": "Jane Doe de D Junior", "given": "Jane", "middle": "Doe", "family": "de D", "suffix": "Junior", "initials": "J. D. D."} {"name": "Jane Doe geb. Smith MA", "given": "Jane", "family": "Doe", "suffix": "MA", "maiden": "Smith", "initials": "J. D."} -{"name": "Jane Doe nee King.", "given": "Jane", "family": "Doe", "maiden": "King.", "initials": "J. D."} {"name": "Jane Doe nee MA", "given": "Jane", "family": "Doe", "maiden": "MA", "ambiguities": ["SUFFIX_OR_NAME"], "initials": "J. D.", "capitalized_force": "Jane Doe (Ma)"} {"name": "Jane Doe nee MA PhD", "given": "Jane", "family": "Doe", "suffix": "PhD", "maiden": "MA", "ambiguities": ["SUFFIX_OR_NAME"], "initials": "J. D.", "capitalized_force": "Jane Doe (Ma) PhD"} {"name": "Jane Doe nee MA Smith", "given": "Jane", "family": "Doe", "maiden": "MA Smith", "initials": "J. D.", "capitalized_force": "Jane Doe (Ma Smith)"} +{"name": "Jane Doe nee Pope.", "given": "Jane", "family": "Doe", "maiden": "Pope.", "initials": "J. D."} {"name": "Jane Doe nee Prof. Dr.", "title": "Dr.", "given": "Jane", "family": "Doe", "maiden": "Prof.", "initials": "J. D."} {"name": "Jane Doe nee Puig i", "given": "Jane", "family": "Doe", "suffix": "i", "maiden": "Puig", "initials": "J. D.", "capitalized_force": "Jane Doe (Puig) I"} {"name": "Jane Doe nee Puig i III", "given": "Jane", "family": "Doe", "suffix": "i III", "maiden": "Puig", "initials": "J. D.", "capitalized_force": "Jane Doe (Puig) I III"} @@ -1530,7 +1533,7 @@ {"name": "Jane née Jones Smith", "family": "Jane", "maiden": "Jones Smith", "initials": "J."} {"name": "Jane née Jr y Jones", "given": "Jane", "middle": "née", "family": "Jr y Jones", "initials": "J. n. J. J.", "capitalized_force": "Jane Née Jr y Jones"} {"name": "Jane née and Jones Smith", "family": "Jane", "maiden": "and Jones Smith", "initials": "J."} -{"name": "Jane van der Berg nee Prof. King. MA", "title": "King.", "given": "Jane", "family": "van der Berg", "suffix": "MA", "maiden": "Prof.", "initials": "J. B."} +{"name": "Jane van der Berg nee Prof. Pope. MA", "title": "Pope.", "given": "Jane", "family": "van der Berg", "suffix": "MA", "maiden": "Prof.", "initials": "J. B."} {"name": "Jane van der Berg nee Smith Prof.", "title": "Prof.", "given": "Jane", "family": "van der Berg", "maiden": "Smith", "initials": "J. B."} {"name": "Jane van der Berg née", "given": "Jane", "family": "van der Berg née", "initials": "J. B. n.", "capitalized_force": "Jane van der Berg Née"} {"name": "Jane van der Berg née Jones", "given": "Jane", "family": "van der Berg", "maiden": "Jones", "initials": "J. B."} @@ -2147,11 +2150,10 @@ {"name": "Kim, Ae-Ra", "given": "Ae-Ra", "family": "Kim", "initials": "A. K."} {"name": "Kim, Jr.", "family": "Kim", "suffix": "Jr.", "initials": "K."} {"name": "Kim김민준씨, MA", "family": "Kim김민준", "suffix": "씨, MA", "initials": "K."} -{"name": "King Curtis", "title": "King", "given": "Curtis", "initials": "C."} -{"name": "King Henry", "title": "King", "given": "Henry", "initials": "H."} -{"name": "King John Alexander V", "title": "King", "given": "John", "family": "Alexander", "suffix": "V", "ambiguities": ["SUFFIX_OR_NAME"], "initials": "J. A."} -{"name": "King John V.", "title": "King", "given": "John", "family": "V.", "initials": "J. V."} -{"name": "King Smith, John", "title": "King", "given": "John", "family": "Smith", "initials": "J. S."} +{"name": "King Curtis", "given": "King", "family": "Curtis", "initials": "K. C."} +{"name": "King Henry", "given": "King", "family": "Henry", "initials": "K. H."} +{"name": "King John Alexander V", "given": "King", "middle": "John", "family": "Alexander", "suffix": "V", "ambiguities": ["SUFFIX_OR_NAME"], "initials": "K. J. A."} +{"name": "King John V.", "given": "King", "middle": "John", "family": "V.", "initials": "K. J. V."} {"name": "Kishi, Kōichi", "given": "Kōichi", "family": "Kishi", "initials": "K. K."} {"name": "Kjetil Bjørn Løseth", "given": "Kjetil", "middle": "Bjørn", "family": "Løseth", "initials": "K. B. L."} {"name": "Klaus Poeck", "given": "Klaus", "family": "Poeck", "initials": "K. P."} @@ -2453,9 +2455,10 @@ {"name": "Mary Ann H,Luther", "given": "Luther", "family": "Mary Ann H", "initials": "L. M. A. H."} {"name": "Mary Beth Smith", "given": "Mary", "middle": "Beth", "family": "Smith", "initials": "M. B. S."} {"name": "Mary Jane King", "given": "Mary", "middle": "Jane", "family": "King", "initials": "M. J. K."} -{"name": "Mary Jane King Smith", "given": "Mary", "middle": "Jane King", "family": "Smith", "initials": "M. J. K. S."} -{"name": "Mary Jane King.", "title": "King.", "given": "Mary", "family": "Jane", "initials": "M. J."} -{"name": "Mary Jane MA King", "given": "Mary", "middle": "Jane MA", "family": "King", "initials": "M. J. M. K.", "capitalized_force": "Mary Jane Ma King"} +{"name": "Mary Jane MA Pope", "given": "Mary", "middle": "Jane MA", "family": "Pope", "initials": "M. J. M. P.", "capitalized_force": "Mary Jane Ma Pope"} +{"name": "Mary Jane Pope", "given": "Mary", "middle": "Jane", "family": "Pope", "initials": "M. J. P."} +{"name": "Mary Jane Pope Smith", "given": "Mary", "middle": "Jane Pope", "family": "Smith", "initials": "M. J. P. S."} +{"name": "Mary Jane Pope.", "title": "Pope.", "given": "Mary", "family": "Jane", "initials": "M. J."} {"name": "Mary Johnson", "given": "Mary", "family": "Johnson", "initials": "M. J."} {"name": "Mary Nicet", "given": "Mary", "family": "Nicet", "initials": "M. N."} {"name": "Mary Smith née Jones Prof.", "title": "Prof.", "given": "Mary", "family": "Smith", "maiden": "Jones", "initials": "M. S."} @@ -2813,6 +2816,7 @@ {"name": "Popa Alexandru Ioan", "order": "FAMILY_FIRST", "given": "Alexandru", "middle": "Ioan", "family": "Popa", "initials": "A. I. P."} {"name": "Popa, Alexandru Ioan", "given": "Alexandru", "middle": "Ioan", "family": "Popa", "initials": "A. I. P."} {"name": "Pope Francis", "title": "Pope", "given": "Francis", "initials": "F."} +{"name": "Pope Smith, John", "title": "Pope", "given": "John", "family": "Smith", "initials": "J. S."} {"name": "Popert, Hermann Martin", "given": "Hermann", "middle": "Martin", "family": "Popert", "initials": "H. M. P."} {"name": "Popescu Maria", "order": "FAMILY_FIRST", "given": "Maria", "family": "Popescu", "initials": "M. P."} {"name": "Popescu, Maria", "given": "Maria", "family": "Popescu", "initials": "M. P."} @@ -3161,7 +3165,7 @@ {"name": "Smith VI, AD", "given": "AD", "family": "Smith", "suffix": "VI", "ambiguities": ["SUFFIX_OR_NAME"], "initials": "A. S.", "capitalized_force": "Ad Smith VI"} {"name": "Smith VI, John", "given": "John", "family": "Smith", "suffix": "VI", "ambiguities": ["SUFFIX_OR_NAME"], "initials": "J. S."} {"name": "Smith Vi, John", "given": "John", "family": "Smith Vi", "initials": "J. S. V."} -{"name": "Smith and King", "given": "Smith and King", "ambiguities": ["TITLE_OR_NAME"], "initials": "S. K."} +{"name": "Smith and Pope", "given": "Smith and Pope", "ambiguities": ["TITLE_OR_NAME"], "initials": "S. P."} {"name": "Smith born", "given": "Smith", "family": "born", "initials": "S. b.", "capitalized_force": "Smith Born"} {"name": "Smith nee Jones, Jane MA", "given": "Jane", "family": "Smith", "suffix": "MA", "maiden": "Jones", "initials": "J. S."} {"name": "Smith née", "given": "Smith", "family": "née", "initials": "S. n.", "capitalized_force": "Smith Née"}