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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/design/decisions/H9-title-phrase.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,14 @@
- THE PHRASES UNDER THE CHOICE. `rt` attaches to `hon` (`Rt Hon John Smith`), and `hon` to `mr`, `mrs`, `lord`, `lady`, `sir` and `justice` (`Hon Mrs I Cawley`, `Hon Justice Smith`, `Hon Lord Smith`), words rather than kinds: attaching to the `nobility` kind made phrases with the gated nobles (`hon sultan`) and so a `title-or-name` report on `Sultan Hassanal Bolkiah` in the default, and a kind expanded into its words passes the six a refusal message shows when the 2.x translation rewrites the list, so `remove(titles={"sir"})` offered code cut short (`... 62 more` over the `nobility` words), which would not run. Six words is the ceiling for that reason: a seventh (`dr`, `ms`) brings the cut back. So under the choice `Hon Dr John Smith` and `Hon Ms Smith` read given 'Hon', a cost no corpus text writes. `hon` takes the written-short mark too (Honorable written short), so FEC's trailing `SMITH, JOHN HON.` keeps its title under the choice; without it about 250 such rows lost it.
- THE ARTICLE. rules/H9 joins an article to a title that may be a given name as an epithet (`The Mahdi Muhammad Ahmad` → given 'The Mahdi'), which read `The Hon John Smith` as given 'The Hon' under the choice. A style that may be a given name, written short, now has its phrase partner in the article before it, as every listed style reads behind `the` (`The Rev John Smith`), so `The Hon John Smith` keeps title 'The Hon' under the choice, at the head and after a comma (`John Smith, the Hon`). The first build read any style that may be a given name so, and the design-docs review found it moving seven in the default: `grace` and the sheikh spellings (`cheikh`, `shaik`, `shaikh`, `sheik`, `sheikh`, `shekh`), `The Sheikh Mohammed bin Rashid` reading title 'The Sheikh' where 2.7.0 through 2.8.1 read the epithet, and every comma shape too (`John Smith, the Sheikh` → title, against the epithet bullet's `William Shakespeare, the Bard`). Written short, the clause reaches `hon` alone, no other gated style carrying the mark, and moves no default reading: the epithet bullet stands for every word it was written for.
- MEASURED under the choice (2026-11-03, against the default on this tree): the 1,093 distinct local-corpus texts holding `hon` as a word: 158 moved, about 125 Cantonese names fixed (orcid-researchers 41, patentsview-inventors 39, psc-individuals about 29, `Mr Hon Cheong Chan`, ctgov-officials about 9, fec-individuals 6, `CHIN, HON WAH`), about 29 styles lost, the choice's cost (ukec-individuals 10, `Hon David Layton`, psc-individuals about 11, `Hon Charles Anthony Pearson`, fec-individuals 8: 5 written bare after a family comma, `DONOVAN, HON CAROL`, and 3 past a second comma, where the choice reads even `HON.` as a suffix, `BROOKS, JD, HON.`), and about 5 honorary-degree prefixes (`Hon FRACP`, `BSc Hon`) that the default does not read either. Hong Kong writes its legislators the same way (`Hon Tommy Cheung` → given 'Hon' under the choice), so the cost reaches Chinese data too. After one comma the bare style reverses the name, unreported (`John Smith, Hon` → given 'Hon', family 'John Smith', where the default reads title 'Hon'), as a gated word alone after a full name and a comma does (`John Smith, Dean`); no corpus text in the 158 writes it. And a style before `Hon` makes it its partner (`The Hon Hon Wah Chan` → title 'The Hon Hon', given 'Wah', in the default too), the one shape where a styled Cantonese bearer still loses the name. Recompute: parse each text with `parse()` and with `parser_for(Locale(code="zh", lexicon=Lexicon.empty(), languages=frozenset({"zh"})))`, over the texts matching `(?i)(?<![\w])hon(?![\w])`.
- **2026-11-03 #913, `saint`, `pharaoh`, `sailor` and `majesty` (Derek) — A #913 TITLE BATCH: FOUR TITLES BORNE AS GIVEN NAMES, CHOSEN FROM A MEASUREMENT OF ALL FOURTEEN LEFT.** Asked whether #913's remaining words could move at once, all fourteen (`saint`, `bishop`, `baron`, `sailor`, `general`, `majesty`, `canon`, `author`, `sir`, `lady`, `pharaoh`, `empress`, `colonel`, `lawyer`) were given a `given` reading in a throwaway tree and measured together against master `df7b1821` (`uv run python tools/differential/measure.py --base <checkout>`), the moved names of its snapshot steps (the committed corpora and the local ones) counted by the word they hold; 27 of `sir`'s are committed fixture strings. Most of six words' moves lost a real title: `sir` 721 (`Admiral Sir Ben Key` → given 'Sir'), `lady` 557, `general` 74 (`Lieutenant General Ian Cave`, `General De Gaulle`) and 20 more holding both `general` and `sir`, `bishop` 43, `colonel` 28 and `canon` 27. `baron` split, its 129 about half given names (fec-individuals 31, `SMITH, BARON P`; psc-individuals 21, `Mr Baron Phillips`; orcid-researchers 7) and about half peers, most of jrc-names' 60 (`Baron Pierre de Coubertin`). Derek chose the four words whose moves were mostly fixes on 2026-11-03. The other ten stay titles for now, and #913 holds them.
- **2026-11-03 #913, `saint`, `pharaoh`, `sailor` and `majesty` (Derek) — A #913 TITLE BATCH: FOUR TITLES BORNE AS GIVEN NAMES, CHOSEN FROM A MEASUREMENT OF ALL FOURTEEN LEFT.** Asked whether #913's remaining words could move at once, all fourteen (`saint`, `bishop`, `baron`, `sailor`, `general`, `majesty`, `canon`, `author`, `sir`, `lady`, `pharaoh`, `empress`, `colonel`, `lawyer`) were given a `given` reading in a throwaway tree and measured together against master `df7b1821` (`uv run python tools/differential/measure.py --base <checkout>`), the moved names of its snapshot steps (the committed corpora and the local ones) counted by the word they hold; 27 of `sir`'s are committed fixture strings. Most of six words' moves lost a real title: `sir` 721 (`Admiral Sir Ben Key` → given 'Sir'), `lady` 557, `general` 74 (`Lieutenant General Ian Cave`, `General De Gaulle`) and 20 more holding both `general` and `sir`, `bishop` 43, `colonel` 28 and `canon` 27. `baron` split, its 129 about half given names (fec-individuals 31, `SMITH, BARON P`; orcid-researchers 7) and about half titles, most of jrc-names' 60 peers (`Baron Pierre de Coubertin`) and 15 of psc-individuals' 21, whose filers typed it in the title box (`Mr Baron Phillips` is one of its 6 forenames; this count first read all 21 as given names, corrected by decisions/H9's 2026-11-03 `baron` entry). Derek chose the four words whose moves were mostly fixes on 2026-11-03. The other ten stay titles for now, and #913 holds them.
- Each of the four gains a dated `given` reading and is a title only inside a title phrase. `pope` and `saint` attach to each other, so `Pope Saint John Paul II` and `Saint Pope John Paul II` keep the title, as 1.4.0 through 2.8.1 read the first; since a listed phrase holds `saint`, a bare `Saint` opening a name reports `title-or-name`, as `Burgess Meredith` does. No listed phrase holds the other three, so they report nothing. `Saint Clair Soares`, `Mr Saint Martin Sterling`, `Pharaoh Mwale`, `Mr Sailor Vinod` and `CAMPBELL, MAJESTY BARRETT` read the given name, where 1.4.0 through 2.8.1 read the title. Before a family comma H6 no longer peels `saint` outside a listed phrase (`Pope Saint Smith, John` still peels title 'Pope Saint', as 2.5.0 through 2.8.1 did), so `SAINT CLAIR, ELAINE` reads family 'SAINT CLAIR' as 1.4.0 through 2.4.2 did, where 2.5.0 through 2.8.1 read title 'SAINT'. `of` keeps the title (`Saint of Assisi`, `Pharaoh of Egypt`), and so does a style before the word (`His Majesty King Charles`, `Her Majesty Queen Elizabeth`); the other sites read as for `king`: ending the name with its period the word is a name word (`John Smith Saint.` → family 'Saint.', 1.4.0's reading, where 2.3.0 through 2.8.1 read the title), past a second comma a suffix (`Smith, John, Saint`, reported `comma-structure`), alone after a full name and a comma the given name (`John Smith, Saint` reverses), and under either family-first order the family (`Pharaoh Ramesses II` → family 'Pharaoh'). fr.toml's `saint` holds a religious reading and no name one, so a strict French choice ungates it, as it does `marquis` (tests/v2/test_reading_index.py's `STRICT_UNGATED`), and the 2.5.0 reading of a surname opening with it survives there: `SAINT CLAIR, ELAINE` reads title 'SAINT', family 'CLAIR' under the strict choice, the plain choice and every shipped pack reading family 'SAINT CLAIR'. A `family` reading does not gate a title, and no French `given` count was found, so the cost is recorded rather than fixed.
- THE COUNTS, recorded on the words (`uv run python tools/name_usage.py Saint Pharaoh Sailor Majesty`, 2026-11-03): `saint` given US SSA 7,476 (7,288 male), Wikidata 11; family Census 1,897 (rank 15,442), Wikidata 65. `pharaoh` given US SSA 1,997, Wikidata none; family Census 173. `sailor` given US SSA 4,290 (3,603 female), Wikidata 8; family Census 2,412. `majesty` given US SSA 3,299 (2,568 female), Wikidata none; family under 100 in the Census, so no family reading.
- THE COST, accepted by Derek on 2026-11-03 in choosing the words: a saint written with the bare word reads it as the given name (`Saint Thomas More` → given 'Saint', middle 'Thomas'), rules/H9's Accepted bullet for a religious title written bare; a pharaoh likewise (`Pharaoh Ramesses II` → given 'Pharaoh'), its bullet for a ruler written with the bare title; `Sailor Moon` reads given 'Sailor', an occupation neither bullet names; and a title beside a bare `Saint` that does not attach to it leaves it a name word (`Archbishop Saint Smith`, `Saint Sir John Smith` → middle 'Sir John').
- MEASURED (2026-11-03, against master `df7b1821`, py3.11, `uv run python tools/differential/measure.py --base <checkout>`, 22 steps): 69 local-corpus entries move, `saint` 62, `pharaoh` 4, `sailor` 2, `majesty` 1. fec-individuals 31: 26 surnames before the comma kept whole (`SAINT CLAIR, ELAINE`, `SAINT JEAN, GILBERT`), `HUNG, SAINT`, `JESTINE, SAINT J.`, `CAMPBELL, MAJESTY BARRETT`, 1 `LORD PHARAOH` after a comma, and 1 loss, `VINCENT DE PAUL, SAINT`; tse-donors 17, 13 the Brazilian given name `SAINT CLAIR …` and the rest `SAINT CLAR`, two `SAINT C` with initials and `SAINT HUNTER`; orcid-researchers 9 (`Pharaoh Mwale`, `Saint Kizito Omala`); jrc-names 5, `Saint West` fixed and 4 lost (`Saint Thomas More`, `Saint Pantaleon`, `SAINT JAMES`, `Sailor Moon`); psc-individuals 5 (`Mr Saint Martin Sterling`, `Mr Sailor Vinod`); ctgov-officials 1 and patentsview-inventors 1; cz-candidates, dof-signatures, govuk-people, nepal-candidates, tw-donors and ukec-individuals none. 32 of the moved names report `title-or-name`, each a bare `Saint` opening the name after any titles, once `pope` and `saint` attach to each other (the review's fix; re-measured the same day, every other figure unchanged). Agreement: orcid-researchers 8 records progress and 1 changed, psc-individuals 5 progress, patentsview-inventors 1 progress, none regressed; spelling pairs and CLDR and GND agreement do not move.
Recompute: `uv run python tools/differential/measure.py --base <checkout of this commit's parent>`; for the fourteen, the same with a `given = { note = "spike" }` line under each word's title reading in en.toml.
- **2026-11-03 #913, `baron` KEPT A TITLE (Derek) — MEASURED ALONE, ITS GIVEN NAMES AND ITS TITLES ROUGHLY EVEN, AND THE UK'S REGISTER FILES IT AS A TITLE.** Proposed as the next batch on the fourteen-word count above, which had read psc-individuals' 21 moved names as given names, `baron` was given a dated `given` reading alone and measured. Read by what each moved name is, about 58 were given names and about 63 titles, so it stays a title, its evidence recorded in the note on its title reading in en.toml so a later batch meets it.
- MEASURED (2026-11-03, against master `a1b3e186`, py3.11, `uv run python tools/differential/measure.py --base <checkout>`, 22 steps): 129 entries moved, every one from title 'Baron' to a name word. Given names: fec-individuals 30 of 31 (`SMITH, BARON P`, `BUSE, BARON MR.`), orcid-researchers 7 (agreement 5 progress, 2 changed), patentsview-inventors 4 (4 progress), ctgov-officials 2 (`Baron Lonner, MD`), the committed snapshot 1 (`Baron Davis`), psc-individuals 6 and jrc-names about 8 (`Baron Waqa`, `Baron Hill`, `Baron Corbin`). Titles: psc-individuals 15, jrc-names about 45 peers and fictional nobles (`Baron Falconer of Thoroton`, `Baron Pierre de Coubertin`, `Baron Munchausen`), tse-donors 2 (`BARON CAMILO AGASIM PEREIRA OF FULWOOD`) and ukec-individuals 1 (`Baron David De Rothschild`). Neither, about 8: in jrc-names the surnames `Baron Cohen` in three spellings and `Baron Crespo` (Enrique Barón Crespo) in two, `Baron Diana` and `Baron Kibamba`, and in fec-individuals the surname `BARON GHORAB, NEILDA`.
- PSC's filers type the title in a box of its own, and 15 of the 21 typed `Baron` there (`uv run python tools/differential/local_agreement.py psc-individuals --base <checkout> --list 30`: 14 regressions, 6 progress, 1 changed): peers (`Baron James Rudolph Palumbo`) and six Turkish or Turkmen filers (`Baron Ahmet Bayin`), against 6 who typed it as the forename (`Mr Baron Phillips`). rules/H9's Accepted bullet for a noble written with the bare title rests on the record data writing the word there almost only as a given name, which holds for `baron` in the US records and not in the UK's, where barons exist and file as one.
- Two shapes the grid found, for a later attempt: a life peer's style (`Baron Smith of Kensington`) would have read given 'Baron', `of` partnering only directly after the word; and a leading `The`, a conjunction, joins a title read only in a phrase into the given name, `The Baron de Coubertin` → given 'The Baron', as master reads `The Marquis de Sade` → given 'The Marquis'.
Recompute: on a tree giving en.toml's `baron` a `given = { us_ssa = 7059, as_of = 2026-11-03, note = "spike" }` reading, `uv run python tools/differential/measure.py --base <checkout of a1b3e186>`, then the `local_agreement.py` line above.
2 changes: 1 addition & 1 deletion nameparser/vocab/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The user docs use real words as examples of an UNLISTED one, and listing the wor

A word whose reading moves may be the worked example of the class it is leaving: `king` was the rules' and tests' title-that-is-also-a-surname across 35 files when #901 gave it a given reading, and five tests went vacuous before the review found them. Grep rules, decisions Standing lines, the RFCs, AGENTS.md, docs/*.rst, code comments and tests for the word before measuring, and replace it with a stand-in checked to read exactly as the word read on master in every example (`pope` there). A new derivation reads readings other work recorded for another purpose, so list what it would mark before shipping it: phase 2i's first build found thirteen salutations whose given readings #835 had kept as H8's evidence (`mr` among them, so `Mr Smith` would have read given 'Mr'), and moved their counts into notes.

A title that gains a `given` reading is a title only in a phrase from then on, so list the phrases it stood in as a TITLE: those its own `attaches` makes and those other words' `attaches` make by naming it, and for a short spelling, those that name its full form. #999 gated `maj` and gave it `attaches = ["gen", "general"]` after `major`'s, but `sgt` and `sergeant` attach to the word `major`, not to `maj`, so `Sgt Maj John Smith` read title 'Sgt', given 'Maj' until the design-docs review found it; no local corpus writes the shape before a name, so no measurement could. Grep the TOML for `attaches` lists naming the word or its `same_as` and `expands` forms, and parse each phrase before and after. Then put each title that commonly stands before or after the word in front of it in the grid, not only the word's own kind: #913's `saint` batch was measured over every local corpus, and still lost `Pope Saint John Paul II` (title 'Pope', given 'Saint') until the code review ran it, because no corpus holds a canonized pope; `pope` and `saint` now attach to each other.
A title that gains a `given` reading is a title only in a phrase from then on, so list the phrases it stood in as a TITLE: those its own `attaches` makes and those other words' `attaches` make by naming it, and for a short spelling, those that name its full form. #999 gated `maj` and gave it `attaches = ["gen", "general"]` after `major`'s, but `sgt` and `sergeant` attach to the word `major`, not to `maj`, so `Sgt Maj John Smith` read title 'Sgt', given 'Maj' until the design-docs review found it; no local corpus writes the shape before a name, so no measurement could. Grep the TOML for `attaches` lists naming the word or its `same_as` and `expands` forms, and parse each phrase before and after. Then put each title that commonly stands before or after the word in front of it in the grid, not only the word's own kind: #913's `saint` batch was measured over every local corpus, and still lost `Pope Saint John Paul II` (title 'Pope', given 'Saint') until the code review ran it, because no corpus holds a canonized pope; `pope` and `saint` now attach to each other. And count a fielded corpus's moves by its filed boxes, not by reading the names: the fourteen-word spike of #913 read psc-individuals' 21 `baron` moves as given names, and `local_agreement.py psc-individuals --base <checkout> --list N` showed 15 of their filers had typed `Baron` in the title box, which turned the word's count from mostly given names into mostly titles.

## A word that moves into mul.toml

Expand Down
2 changes: 1 addition & 1 deletion nameparser/vocab/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ nobility = { gender = "m" }

[[word]]
text = "baron"
nobility = { gender = "m" }
nobility = { gender = "m", issue = 913, note = "kept a title, decided 2026-11-03 (decisions/H9): US SSA 7,059 births (all male), Wikidata 49 given; Census 16,308 (rank 2,234), Wikidata 568 family (France 117). Given a given reading alone it moved 129 names, about 58 given names (FEC 30 of 31, SMITH, BARON P) against about 63 titles: jrc-names' peers (Baron Falconer of Thoroton), and in PSC 15 filers put it in the title box against 6 in the forename box. The given count stands here rather than as a given reading, which would make it a title only inside a title phrase (rules/H9)" }

[[word]]
text = "baroness"
Expand Down
Loading