From 80f7edd305007c66cf4511a30a965ea0852e1280 Mon Sep 17 00:00:00 2001 From: Derek Gulbranson Date: Mon, 26 Oct 2026 16:51:51 -0700 Subject: [PATCH] Read the Nepali given names Buddha, Siddha and Gyani as names outside a title phrase (#869, #752 phase 2j) The third title batch of phase 2j. `buddha`, `siddha` and `gyani` gain declared given readings (siddha's and gyani's count-free, their notes citing nepal-candidates), so each is a title only inside a title phrase, unreported. `Buddha Bahadur Tamang` reads given 'Buddha', middle 'Bahadur', where 1.4.0 through 2.6.0 read title 'Buddha', given 'Bahadur'. `guru` stays a title for a `ne` pack. Accepted in rules/H9, none written by a corpus name: the Sikh title spelled `Gyani` before a name (`giani` keeps the title), `Lord Buddha Tamang`, and the epithet with its article after a comma. Measured against master 021028b2: nepal-candidates 121 names moved and 128 romanized/Devanagari pairs now alike, 0 apart; ctgov 4, all fixes; PSC, FEC, tse, jrc and the committed corpora unchanged. Co-Authored-By: Claude Opus 5.5 --- docs/design/decisions/H9-title-phrase.md | 5 +++ docs/design/decisions/vocabulary-model.md | 1 + .../rules/H2-leading-abbreviation-title.md | 4 ++ docs/design/rules/H9-title-phrase.md | 12 +++++- docs/release_log.rst | 1 + nameparser/config/_compiled.py | 6 +-- nameparser/vocab/en.toml | 6 ++- nameparser/vocab/pa.toml | 3 +- tests/v2/cases.py | 43 +++++++++++++++++++ tests/v2/rules_budget.json | 4 +- tools/differential/corpus_rules.jsonl | 6 +++ tools/differential/snapshot.jsonl | 6 +++ 12 files changed, 87 insertions(+), 10 deletions(-) diff --git a/docs/design/decisions/H9-title-phrase.md b/docs/design/decisions/H9-title-phrase.md index 5a2647f3..97f0386d 100644 --- a/docs/design/decisions/H9-title-phrase.md +++ b/docs/design/decisions/H9-title-phrase.md @@ -45,3 +45,8 @@ - THE COUNTS, recorded on the words (`uv run python tools/name_usage.py Mahdi Bard Bård`, 2026-10-26): `mahdi` given US SSA 2,398 births, Wikidata 141 (a lower bound; Iran 43, Iraq 9), nam_dict band 5 in Arabia/Persia, family Census 1,241, Wikidata 13; `bard` given US SSA 218 (SSA folds `Bård`), Wikidata 10 and 107 more spelled `Bård`, nam_dict band 5 in Norway as `Bård`, family Census 5,953, Wikidata 100. PSC's filers put `Mahdi` in the forename box 84 times as its first word and never in the title box (#853, #867). - MEASURED (2026-10-26, against master `32049ade`, py3.11, every local check with `--base`). PSC (1,039,174 scored, the fetch dated 2026-10-22): 79 records fixed, none broken, 6 changed, the 6 still disagreeing only because the filer typed two words in the surname box, which the default order reads as middle and family (`Mr MAHDI Aa Aa`, `Aa MAHDI Aa Aa`). ctgov-officials 6 moved, each a `Mahdi Aa, CRED` shape now read with given 'Mahdi'; fec-individuals 20, all fixes: `AA, MAHDI` 10, `AA, BARD` 6, and one each of `AA AA, MAHDI`, `AA, BARD AA`, `AA, BARD A. T` and `BARD AA, AA`, whose family part keeps `BARD` as a surname where H6 had peeled it as a title. The committed corpora, CLDR and GND agreement, and tse-donors do not move: no committed corpus held either word before this change, whose rules examples add two. Spelling consistency (mechanisms.md#PAIRED-SPELLINGS-PER-CHANGE, per person, against master): jrc-names 44 persons now alike and none apart, of 218,822 with two or more spellings, the spellings that read the word as a title and those that did not; nepal-candidates 0 and 0. Recompute: `uv run python tools/differential/local_agreement.py psc-individuals --base `, and `uv run python tools/differential/snapshot.py --local ctgov-officials --base ` (and `fec-individuals`, `tse-donors`). +- **2026-10-26 #752, phase 2j, `buddha`, `siddha` and `gyani` (#869) — THE THIRD TITLE BATCH: THE FIRST HALVES OF NEPALI COMPOUND GIVEN NAMES.** The batch decisions/vocabulary-model's 2026-10-24 #752 (Derek) entry put third, Derek having agreed there that the three go in the default gate and `guru` to a `ne` pack (its Devanagari twin `गुरु` must move with it; none of the three has a listed twin). Each gains a declared `given` reading and is a title only inside a title phrase; no listed phrase holds any of them, so nothing is reported. `Buddha Bahadur Tamang`, `Gyani Maya Gurung`, `Siddha Raj Joshi` and `Tamang, Buddha Bahadur` read given 'Buddha', 'Gyani', 'Siddha', where 1.4.0 through 2.6.0 read the word as the title and the compound's second half as the given name. A title phrase keeps the title (`His Holiness Buddha Ram`, `Buddha of Kapilavastu Ram`), and the other sites read as for `mahdi` (the entry above): ending the name, alone after a full name and a comma, past a second comma, and before a family comma, where H6 no longer peels the word from the family part (`Buddha Tamang, Ram` → family 'Buddha Tamang', `Dr. Buddha Tamang, Ram` → title 'Dr.', family 'Buddha Tamang'). Under either family-first order the word before a name is the family name (`Lord Buddha Tamang` → family 'Buddha'). Written with its period before `and` it joins the next word as a name (`Buddha. and Maya Gurung` → given 'Buddha. and Maya'), as an unlisted word does: master and 2.6.0 already read `Dean. and Mary Smith` so, and rules/H9's connective precedence bullet and a new P3 bullet in rules/H2 now say it, H9's H2 bullet naming the exception (the review of this batch found both rules claiming the shape always won; the reading is 1.4.0's, and `Xyz. and Mary Smith` reads the same). Behind another title the period-marked spelling stays a title by H2's shape (`Mr Buddha. Tamang` → title 'Mr Buddha.', as master read `Mr Dean. Smith`), which H9's H2 bullet now states for the leading run, not only the front. + - THE COUNTS. Outside Nepal the sources barely see the words (`uv run python tools/name_usage.py Buddha Siddha Gyani`, 2026-10-26): `buddha` given US SSA 6 births and Wikidata 4, recorded as counts; `siddha` and `gyani` reach neither source's floor, so their readings stand without a count and their notes give nepal-candidates' figures, 12 and 38 of 126,981 pairs (Buddha 83), every one the first half of a compound given name, none after a comma. + - 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. diff --git a/docs/design/decisions/vocabulary-model.md b/docs/design/decisions/vocabulary-model.md index 0a40b3bc..44778243 100644 --- a/docs/design/decisions/vocabulary-model.md +++ b/docs/design/decisions/vocabulary-model.md @@ -217,6 +217,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, `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. - **2026-10-26 (Derek), #785 — PHASE 2g NARROWED: a capitals member with a name word behind it, and no family comma, does not start the credential's run**, the name word being evidence of initials; `Maria Ana MA Silva`, `Jean Pierre MA DUPONT` and `Mary Jane MA King` keep the readings 1.4.0 through 2.6.0 gave, and `John Smith MA Jones` keeping family 'Jones' is the cost. The record is decisions/S6's entry of this date. diff --git a/docs/design/rules/H2-leading-abbreviation-title.md b/docs/design/rules/H2-leading-abbreviation-title.md index c1c8aade..1ce111b3 100644 --- a/docs/design/rules/H2-leading-abbreviation-title.md +++ b/docs/design/rules/H2-leading-abbreviation-title.md @@ -49,6 +49,10 @@ "John Smith Ma." → family="Ma." "Smith, John Ma" → middle="Ma" ``` +- **A connective after the abbreviation** (P3): the join takes it with the word after the connective before the shape is asked of it, so the two read as two names joined. + ``` + "Xyz. and Mary Smith" → given="Xyz. and Mary" + ``` **Accepted:** diff --git a/docs/design/rules/H9-title-phrase.md b/docs/design/rules/H9-title-phrase.md index c39c8454..adaef4ce 100644 --- a/docs/design/rules/H9-title-phrase.md +++ b/docs/design/rules/H9-title-phrase.md @@ -20,6 +20,7 @@ "Grace Dean Smith" → given="Grace" "Sgt Marshal Smith" → given="Marshal" "Mr Mahdi Karimi" → given="Mahdi" + "Buddha Bahadur Tamang" → given="Buddha" ``` - **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. ``` @@ -65,19 +66,21 @@ ``` "Hon. Wing Lau" → given="Wing" ``` -- **A period-marked word at the front of the name** (H2): the abbreviation shape makes it a title whatever the vocabulary says, save a given name written short, so the phrase test never reaches it and nothing is reported. +- **A period-marked word in the leading run of titles** (H2): the abbreviation shape makes it a title whatever the vocabulary says, save a given name written short or a word a connective joins (below), so the phrase test never reaches it and nothing is reported, at the front of the name or behind another title. ``` "Dean. Smith" → title="Dean." "Wing. Lau" → title="Wing." + "Mr Buddha. Tamang" → title="Mr Buddha." ``` - **A title run** (H3, H4): a word this rule reads as a name word is no title word to the run, so the run stops before it and does not count it. ``` "Mr Dean Smith" → title="Mr" "Dean" → given="Dean" ``` -- **A connective after the word** (P3): only `of` makes a phrase of the join, so a word read as a name word before `and` joins the next word as two names join. +- **A connective after the word** (P3): only `of` makes a phrase of the join, so a word read as a name word before `and` joins the next word as two names join, and so does one written with its period, the join taking it before H2's shape is asked. ``` "Dean and Mary Smith" → given="Dean and Mary" + "Dean. and Mary Smith" → given="Dean. and Mary" ``` - **A title that may be a given name which a caller lists in `titles`** is a title wherever it stands, since that is what listing it asks; a modifier is read by this rule however it is listed, and leaving its word out of the modifiers turns the rule off for it. @@ -110,6 +113,11 @@ "The Mahdi Muhammad Ahmad" → given="The Mahdi" "William Shakespeare, the Bard" → given="the Bard" ``` +- A religious title that opens given names in another tradition, written bare, reads as a name word before a name in every tradition, behind any title but a style, a modifier or one that attaches to it; no name data at hand writes the title there. + ``` + "Gyani Zail Singh" → given="Gyani" + "Lord Buddha Tamang" → given="Buddha" + ``` - 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/release_log.rst b/docs/release_log.rst index 562c8e36..8eb6e9e9 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 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` - **Read Chas., Wm. and the other given names written short as given names rather than titles.** ``Chas. Smith`` and ``Ma. Cristina Reyes`` give first ``Chas.`` and ``Ma.``, where 1.4.0 through 2.6.0 gave title ``Chas.`` and ``Ma.``; ``Thos.``, ``Jas.``, ``Geo.``, ``Robt.``, ``Benj.``, ``Jno.``, ``Saml.``, ``Edw.``, ``Richd.``, ``Wm.`` and the Filipino ``Jo.`` read the same way, behind a title too (``Mrs Ma. Liza Cruz`` gives title ``Mrs``, first ``Ma.``). An unlisted abbreviation in front is still a title (``Insp. Jane Morse``), and ``Lexicon.given_name_abbreviations`` lists the words. :issue:`789`, :issue:`752` diff --git a/nameparser/config/_compiled.py b/nameparser/config/_compiled.py index 5d3674c2..906fb9b0 100644 --- a/nameparser/config/_compiled.py +++ b/nameparser/config/_compiled.py @@ -167,7 +167,6 @@ 'british', 'broadcaster', 'brother', - 'buddha', 'burgess', 'burlesque', 'business', @@ -380,7 +379,6 @@ 'gräfin', 'guitarist', 'guru', - 'gyani', 'gysgt', 'hajji', 'headman', @@ -683,7 +681,6 @@ 'sheikh', 'shekh', 'sheriff', - 'siddha', 'sig.na', 'sig.ra', 'signor', @@ -965,12 +962,15 @@ TITLES_AMBIGUOUS: frozenset[str] = frozenset({ 'bard', + 'buddha', 'dean', 'grace', + 'gyani', 'justice', 'mahdi', 'major', 'marshal', + 'siddha', 'wing', }) diff --git a/nameparser/vocab/en.toml b/nameparser/vocab/en.toml index 9f97d37f..8ffb9cc8 100644 --- a/nameparser/vocab/en.toml +++ b/nameparser/vocab/en.toml @@ -175,7 +175,8 @@ religious = { addresses = "given", gender = "m", expands = "a member of a religi [[word]] text = "buddha" -religious = {} +religious = { issue = 869, decided = 2026-10-26, note = "a title only inside a title phrase, its given reading the clash (rules/H9): 'Buddha Bahadur Tamang' reads the given name, unreported, since no listed phrase holds it" } +given = { us_ssa = 6, wikidata = 4, as_of = 2026-10-26, note = "US SSA: male births; Wikidata is a lower bound; the first half of Nepali compound given names (Buddha Bahadur, Buddha Maya): 83 of nepal-candidates' 126,981 pairs write it, opening the name in 79" } [[word]] text = "canon" @@ -299,7 +300,8 @@ religious = {} [[word]] text = "siddha" -religious = {} +religious = { issue = 869, decided = 2026-10-26, note = "a title only inside a title phrase, its given reading the clash (rules/H9): 'Siddha Raj Joshi' reads the given name, unreported, since no listed phrase holds it" } +given = { note = "no US SSA year reaches 5 births and Wikidata counts no one; declared as the first half of Nepali compound given names (Siddha Raj): 12 of nepal-candidates' 126,981 pairs write it, each opening the name (2026-10-26)" } [[word]] text = "sister" diff --git a/nameparser/vocab/pa.toml b/nameparser/vocab/pa.toml index 398ce135..277f80e6 100644 --- a/nameparser/vocab/pa.toml +++ b/nameparser/vocab/pa.toml @@ -6,7 +6,8 @@ religious = { expands = "a learned Sikh", native = "ਗਿਆਨੀ" } [[word]] text = "gyani" -religious = { same_as = "giani" } +religious = { same_as = "giani", issue = 869, decided = 2026-10-26, note = "a title only inside a title phrase, its given reading the clash (rules/H9): 'Gyani Maya Gurung' reads the given name, unreported, since no listed phrase holds it; the Sikh title keeps its usual spelling giani" } +given = { note = "no US SSA year reaches 5 births and Wikidata counts no one; declared as the first half of Nepali compound given names (Gyani Maya): 38 of nepal-candidates' 126,981 pairs write it, opening the name in 37 (2026-10-26)" } [[word]] text = "guru" diff --git a/tests/v2/cases.py b/tests/v2/cases.py index 5a17157e..00186914 100644 --- a/tests/v2/cases.py +++ b/tests/v2/cases.py @@ -12330,6 +12330,49 @@ def _check_cjk_shape_purity(self) -> None: Case("given_name_title_bard_as_a_surname", "Ola Bard", {"given": "Ola", "family": "Bard"}, notes="a trailing bare title word was already a name word"), + Case("given_name_title_buddha_opening_a_compound", "Buddha Bahadur Tamang", + {"given": "Buddha", "middle": "Bahadur", "family": "Tamang"}, + classification="fix(#869)", + notes="H9: the first half of a Nepali compound given name; read " + "title 'Buddha', given 'Bahadur' 1.4.0 through 2.6.0 " + "(#752 phase 2j)"), + Case("given_name_title_gyani_opening_a_compound", "Gyani Maya Gurung", + {"given": "Gyani", "middle": "Maya", "family": "Gurung"}, + classification="fix(#869)", + notes="H9; read title 'Gyani', given 'Maya' before"), + Case("given_name_title_siddha_after_a_family_comma", "Joshi, Siddha Raj", + {"given": "Siddha", "middle": "Raj", "family": "Joshi"}, + classification="fix(#869)", + notes="H9; read title 'Siddha', given 'Raj' before"), + Case("given_name_title_buddha_after_a_salutation", "Mr Buddha Tamang", + {"title": "Mr", "given": "Buddha", "family": "Tamang"}, + classification="fix(#869)", + notes="H9: a salutation is no partner (#853); read title " + "'Mr Buddha' before"), + Case("given_name_title_buddha_behind_a_style", "His Holiness Buddha Ram", + {"title": "His Holiness Buddha", "family": "Ram"}, + notes="H9: a style before it is its partner, as master read it"), + Case("given_name_title_gyani_as_the_sikh_title", "Gyani Zail Singh", + {"given": "Gyani", "middle": "Zail", "family": "Singh"}, + classification="fix(#869)", + notes="H9's Accepted clause: the Sikh title spelled 'Gyani' reads " + "as the given name; 'Giani' is still the title"), + Case("sikh_title_in_its_usual_spelling", "Giani Zail Singh", + {"title": "Giani", "given": "Zail", "family": "Singh"}, + notes="'giani' has no given reading; the title phrase's boundary"), + Case("given_name_title_buddha_before_a_family_comma", "Buddha Tamang, Ram", + {"given": "Ram", "family": "Buddha Tamang"}, + notes="H6 no longer peels a contested word from the family part; " + "1.4.0's reading, which 2.5.0 through 2.6.0 read as title " + "'Buddha', family 'Tamang'"), + Case("period_marked_word_before_and", "Dean. and Mary Smith", + {"given": "Dean. and Mary", "family": "Smith"}, + notes="H9's connective precedence: the join takes a period-marked " + "word before H2's shape is asked, as 2.6.0 read it"), + Case("buddha_alone_after_a_title", "Lord Buddha", + {"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_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 " diff --git a/tests/v2/rules_budget.json b/tests/v2/rules_budget.json index d8073a3a..9aaffb8b 100644 --- a/tests/v2/rules_budget.json +++ b/tests/v2/rules_budget.json @@ -18,14 +18,14 @@ "D1": {"words": 73, "then_words": 26, "because_sentences": 1, "except": 0, "precedence": 0, "accepted": 0, "accepted_words": 0}, "D2": {"words": 65, "then_words": 37, "because_sentences": 2, "except": 0, "precedence": 0, "accepted": 0, "accepted_words": 0}, "H1": {"words": 427, "then_words": 270, "because_sentences": 3, "except": 1, "precedence": 0, "accepted": 4, "accepted_words": 370}, - "H2": {"words": 477, "then_words": 172, "because_sentences": 1, "except": 1, "precedence": 2, "accepted": 3, "accepted_words": 203}, + "H2": {"words": 508, "then_words": 172, "because_sentences": 1, "except": 1, "precedence": 3, "accepted": 3, "accepted_words": 203}, "H3": {"words": 142, "then_words": 72, "because_sentences": 2, "except": 0, "precedence": 0, "accepted": 3, "accepted_words": 113}, "H4": {"words": 410, "then_words": 183, "because_sentences": 3, "except": 1, "precedence": 1, "accepted": 1, "accepted_words": 127}, "H5": {"words": 757, "then_words": 289, "because_sentences": 2, "except": 0, "precedence": 5, "accepted": 1, "accepted_words": 117}, "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": 626, "then_words": 263, "because_sentences": 3, "except": 0, "precedence": 5, "accepted": 7, "accepted_words": 247}, + "H9": {"words": 660, "then_words": 263, "because_sentences": 3, "except": 0, "precedence": 5, "accepted": 8, "accepted_words": 293}, "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}, diff --git a/tools/differential/corpus_rules.jsonl b/tools/differential/corpus_rules.jsonl index ad760ca8..b2cd2075 100644 --- a/tools/differential/corpus_rules.jsonl +++ b/tools/differential/corpus_rules.jsonl @@ -78,6 +78,7 @@ "Berg, abdul van" "Berg, abdul vd" "Berg, de; Smith" +"Buddha Bahadur Tamang" "Carod i" "Carod i Rovira, Josep" "Carod y de Rovira i" @@ -103,6 +104,7 @@ "Dean and Mary Smith" "Dean of Students Jane Smith" "Dean. Smith" +"Dean. and Mary Smith" "Del Toro" "Doe Jane Mrs" "Doe nee Smith Jr. Prof., Jane" @@ -221,6 +223,7 @@ "Greve Anna" "Greve Smith, Anna" "Greve, Anna" +"Gyani Zail Singh" "Hans „Erster“ und “Zweiter” Müller" "Hassan Mohamad Ali" "Hassan, Mohamad Ahmad Ali" @@ -577,6 +580,7 @@ "Lau, Wing Commander" "Lloret Palol II, JA" "Lloret Palol II, Josep Antoni" +"Lord Buddha Tamang" "Lord Chancellor" "López, Ana García" "MSc Dr. med. univ." @@ -612,6 +616,7 @@ "Mohamed Ali Abd Allah" "Morse, Det. Insp. Jane" "Mother Superior of the Convent Mary Smith" +"Mr Buddha. Tamang" "Mr Dean Smith" "Mr Justice Smith" "Mr Mahdi Karimi" @@ -842,6 +847,7 @@ "Wm. H. Smith III" "Xyz. John Smith" "Xyz. Smith, John" +"Xyz. and Mary Smith" "Xyz. van Johnson" "Zaʿīm, Ḥusnī az-" "abd Allah" diff --git a/tools/differential/snapshot.jsonl b/tools/differential/snapshot.jsonl index 813b262b..f79b8523 100644 --- a/tools/differential/snapshot.jsonl +++ b/tools/differential/snapshot.jsonl @@ -431,6 +431,7 @@ {"name": "Brül Cabral de Melo, Erika Cornelia Anna Isabelle von", "given": "Erika", "middle": "Cornelia Anna Isabelle", "family": "von Brül Cabral de Melo", "ambiguities": ["PARTICLE_OR_GIVEN"], "initials": "E. C. A. I. B. C. M."} {"name": "Brül, Ada Kornelia Sezar Martin fon", "given": "Ada", "middle": "Kornelia Sezar Martin fon", "family": "Brül", "initials": "A. K. S. M. f. B.", "capitalized_force": "Ada Kornelia Sezar Martin Fon Brül"} {"name": "Buca di Beppo", "given": "Buca", "family": "di Beppo", "initials": "B. B."} +{"name": "Buddha Bahadur Tamang", "given": "Buddha", "middle": "Bahadur", "family": "Tamang", "initials": "B. B. T."} {"name": "Budi", "given": "Budi", "ambiguities": ["GIVEN_OR_FAMILY"], "initials": "B."} {"name": "Budi", "order": "FAMILY_FIRST", "family": "Budi", "ambiguities": ["GIVEN_OR_FAMILY"], "initials": "B."} {"name": "Bukenya Zamara Imani", "order": "FAMILY_FIRST", "given": "Zamara", "middle": "Imani", "family": "Bukenya", "initials": "Z. I. B."} @@ -604,6 +605,7 @@ {"name": "Dean of Students Jane Smith", "title": "Dean of Students", "given": "Jane", "family": "Smith", "initials": "J. S."} {"name": "Dean. Robert Johns", "title": "Dean.", "given": "Robert", "family": "Johns", "initials": "R. J."} {"name": "Dean. Smith", "title": "Dean.", "family": "Smith", "initials": "S."} +{"name": "Dean. and Mary Smith", "given": "Dean. and Mary", "family": "Smith", "initials": "D. M. S."} {"name": "Del Toro", "given": "Del", "family": "Toro", "ambiguities": ["PARTICLE_OR_GIVEN"], "initials": "D. T."} {"name": "Del toro", "given": "Del", "family": "toro", "ambiguities": ["PARTICLE_OR_GIVEN"], "initials": "D. t.", "capitalized_force": "Del Toro"} {"name": "Della Reese", "given": "Della", "family": "Reese", "ambiguities": ["PARTICLE_OR_GIVEN"], "initials": "D. R."} @@ -1168,6 +1170,7 @@ {"name": "Guðrún Eva Mínervudóttir", "given": "Guðrún", "middle": "Eva", "family": "Mínervudóttir", "initials": "G. E. M."} {"name": "Guðrún Helgadóttir", "given": "Guðrún", "family": "Helgadóttir", "initials": "G. H."} {"name": "Guðrún Lárusdóttir", "given": "Guðrún", "family": "Lárusdóttir", "initials": "G. L."} +{"name": "Gyani Zail Singh", "given": "Gyani", "middle": "Zail", "family": "Singh", "initials": "G. Z. S."} {"name": "Gylfi Sigurðsson", "given": "Gylfi", "family": "Sigurðsson", "initials": "G. S."} {"name": "Gábor, Andor", "given": "Andor", "family": "Gábor", "initials": "A. G."} {"name": "Gössmann, Elisabeth", "given": "Elisabeth", "family": "Gössmann", "initials": "E. G."} @@ -2236,6 +2239,7 @@ {"name": "Lombardi, Amarildo", "given": "Amarildo", "family": "Lombardi", "initials": "A. L."} {"name": "Lombardi, Amarildo A.", "order": "FAMILY_FIRST", "given": "Amarildo", "middle": "A.", "family": "Lombardi", "initials": "A. A. L."} {"name": "Lon (Jr.) Williams", "given": "Lon", "middle": "Jr.", "family": "Williams", "initials": "L. J. W."} +{"name": "Lord Buddha Tamang", "title": "Lord", "given": "Buddha", "family": "Tamang", "initials": "B. T."} {"name": "Lord Chancellor", "title": "Lord", "family": "Chancellor", "ambiguities": ["TITLE_OR_NAME"], "initials": "C."} {"name": "Lord God Almighty", "title": "Lord", "given": "God", "family": "Almighty", "initials": "G. A."} {"name": "Lord and of the Universe", "title": "Lord and of the Universe"} @@ -2544,6 +2548,7 @@ {"name": "Mother Superior of the Convent Mary Smith", "title": "Mother Superior of the Convent", "given": "Mary", "family": "Smith", "initials": "M. S."} {"name": "Mozart Wolfgang Amadeus", "order": "FAMILY_FIRST", "given": "Wolfgang", "middle": "Amadeus", "family": "Mozart", "initials": "W. A. M."} {"name": "Mozart, Wolfgang Amadeus", "given": "Wolfgang", "middle": "Amadeus", "family": "Mozart", "initials": "W. A. M."} +{"name": "Mr Buddha. Tamang", "title": "Mr Buddha.", "family": "Tamang", "initials": "T."} {"name": "Mr Dean Smith", "title": "Mr", "given": "Dean", "family": "Smith", "ambiguities": ["TITLE_OR_NAME"], "initials": "D. S."} {"name": "Mr Justice Smith", "title": "Mr", "given": "Justice", "family": "Smith", "ambiguities": ["TITLE_OR_NAME"], "initials": "J. S."} {"name": "Mr MA", "title": "Mr", "family": "MA", "initials": "M.", "capitalized_force": "Mr Ma"} @@ -3571,6 +3576,7 @@ {"name": "Xyz. (Bud) Smith", "title": "Xyz.", "family": "Smith", "nickname": "Bud", "initials": "S."} {"name": "Xyz. John Smith", "title": "Xyz.", "given": "John", "family": "Smith", "initials": "J. S."} {"name": "Xyz. Smith, John", "given": "John", "family": "Xyz. Smith", "initials": "J. X. S."} +{"name": "Xyz. and Mary Smith", "given": "Xyz. and Mary", "family": "Smith", "initials": "X. M. S."} {"name": "Xyz. van Johnson", "title": "Xyz.", "given": "van", "family": "Johnson", "ambiguities": ["PARTICLE_OR_GIVEN"], "initials": "v. J.", "capitalized_force": "Xyz. Van Johnson"} {"name": "Y. L.", "given": "Y.", "family": "L.", "initials": "Y. L."} {"name": "Yamamoto, Baiitsu", "given": "Baiitsu", "family": "Yamamoto", "initials": "B. Y."}