diff --git a/docs/design/decisions/salutation-titles.md b/docs/design/decisions/salutation-titles.md index d3886d12b..0f975b23e 100644 --- a/docs/design/decisions/salutation-titles.md +++ b/docs/design/decisions/salutation-titles.md @@ -21,7 +21,7 @@ Closes #606 (#662 later added owura and bapak, its bullet below, and #847 cllr). Elsewhere: `justice` and `marshal`, excluded here as common leading-position names, are titles only inside a title phrase since 2026-10-25 and 2026-10-26 (`Chief Justice John Roberts` reads title 'Chief Justice' and `Field Marshal Bernard Montgomery` title 'Field Marshal', `Justice Smith` and `Marshal Yanda` the given name) — decisions/H9's 2026-10-25 #752, phase 2i entry; decisions/H9's 2026-10-26 #752, phase 2i (Derek) entry. - A Persian title is a plain title that addresses the family name (`دکتر رضایی` reads family), written in fa.toml, and an Arabic title typed with Persian yeh and kaf is a `same_as` spelling of ar.toml's, listed rather than folded; the words that open real Persian family names (`شیخ`, `حاج`, `حاجی`, `آقا`) stay out — 2026-11-10 #1151 -- A job or a degree written out after the name and a comma (`Nadir Qassoumi, Bachelor`) is an `occupation` title, and a word that qualifies one (`Medical Doctor`, `Clinical Research Coordinator`) a `modifier`, in English, word by word on the counts on each entry; as a title the word is claimed in front of a name too, so a surname that mostly qualifies a head is listed as a modifier, which claims none alone (`head`, `child`), and the surnames listed as heads ship on the graf exception with their counts (`masters`, `student`, `bachelor`, `degree`): the 2026-11-19 #1457 entry lists the 58 words, the words refused, and the costs taken — 2026-11-19 #1457. +- A job or a degree written out after the name and a comma (`Nadir Qassoumi, Bachelor`) is an `occupation` title, and a word that qualifies one (`Medical Doctor`, `Clinical Research Coordinator`) a `modifier`, in English, word by word on the counts on each entry; as a title the word is claimed in front of a name too, so a surname that mostly qualifies a head is listed as a modifier, which claims none alone (`head`, `child`), and the surnames listed as heads ship on the graf exception with their counts (`masters`, `student`, `bachelor`, `degree`): the 2026-11-19 #1457 entry lists the 58 words, the words refused, and the costs taken — 2026-11-19 #1457. A degree's possessive (`master's`, `bachelor's`, `doctor's`, each also with the typographic apostrophe) is a `modifier`: after a comma it is the title alone or before its head, and opening a name it is the title only before a head (`Master's degree Nadir Qassoumi`), never alone (`Master's Nadir` keeps given 'Master's' given-first, family 'Master's' under a family-first order, as before) — 2026-11-19 #1487. ## Log @@ -68,4 +68,9 @@ Elsewhere: `justice` and `marshal`, excluded here as common leading-position nam - **Refused:** `principle`, `principal` misspelled (`Principle Investigator`), opening 16 of the 9,450 parts, an `excluded` entry. Left unlisted, outside the decision rather than refused, each counted as the opening word of the 9,450 parts: misspellings (`proffesor` 68, `proffessor` 63, `docter` 44, `assisstant` 21), fields of study written where the job would be (`medicine` 232, `psychology` 53, `cardiology` 46, `nursing` 43, `physiotherapy` 32), abbreviations (`pharm` 47, `cand` 20, `asist` 20), other languages (`docteur` 31), and `post` (73 parts, 20 of them `post doc`), a surname written before an unlisted word. - **MEASURED** against master `d12af9d6` (2026-11-19, py3.11). Of the 9,000 reversed names, 4,972 now read the name before the comma apart, 3,685 still read the opening word as the given name (the unlisted words above), and 343 read a listed word as the title but stay reversed, an unlisted word behind it taken as the given name (`Nadir Qassoumi, Clinical Pharmacologist` → title 'Clinical', given 'Pharmacologist', family 'Nadir Qassoumi'; a title run with `in` behind it, 74 of the 343, `Masters in Physiotherapy`, `Medical Degree in Surgery`); no name of the 9,450 reads reversed that did not. By country, the ten with most names read apart, reversed names before → after and their share of the country's distinct names: China 1,599 → 415 (2.6% → 0.7% of 61,369), Turkey 800 → 304 (3.7% → 1.4%), Egypt 776 → 345 (4.7% → 2.1%), France 521 → 201 (1.0% → 0.4%), Spain 740 → 447 (3.2% → 1.9%), no country stated 563 → 290 (1.0% → 0.5%), Brazil 424 → 203 (4.0% → 1.9%), the United States 371 → 163 (0.2% → 0.1%), Italy 398 → 244 (1.8% → 1.1%), Denmark 222 → 75 (2.1% → 0.7%); Iraq, the issue's highest share, 49 → 11 of 609 (8.0% → 1.8%). A name in several countries' studies counts in each. `tools/differential/snapshot.py --local --base ` moves ctgov-contacts' 4,638 entries and ctgov-officials' 3,704: beside the reversals, a title moving out of the suffix or the nickname with the name fields kept (`Nadir Qassoumi, PhD Student` → title 'Student', suffix 'PhD'; `Nadir Qassoumi (Medical Doctor)` → title 'Medical Doctor'), and labels that name no person read wrong before and after (`Medical Director`, given 'Medical' before and title 'Medical' after). The committed snapshot moves one name (`Doe, John, MD PhD - FACS Fellow` → title 'Fellow', its `comma-structure` report gone), CLDR and GND none. - **THE COSTS, accepted:** a name the word opens reads it as the title under every order, as any title does (`Student Mary Jones` → title 'Student'; `Masters John` under `FAMILY_FIRST` → title 'Masters', family 'John'); local_agreement scores 4 orcid-researchers records as regressions, the 2 given boxes opening with `Degree`, a box typed `Child.org` and one typed with a job and a name, while psc-individuals' one filer opening with `Student` typed it in the title box. A word alone after a surname and a comma leaves no given name (`Qassoumi, Student`), as `Smith, Dr.` does; a modifier opening the given part after a family comma is the title (`Qassoumi, Medical Nadir`, rules/H9's `Hudson, Rock`); a salutation and the word alone now reports `title-or-name` (`Mr Masters`, as `Mr. Bishop` does; no local corpus writes the shape). For `masters`, a surname (US Census 23,533): opening a double surname before a family comma it is the title by rules/H6 (`Masters Boyd, Helen` → title 'Masters', family 'Boyd'), 4 of FEC's 1,893,964 names; in a part past the second comma it is the title by rules/C2 (`Jones, Mary, Masters`), 1 FEC name; written with a full stop ending a name it is the title by rules/H5 (`John Masters.`, as `John Bishop.`). FEC moves 6 names in all, the sixth a label. No listed word stands after a comma as a given name in FEC, and its other names opening with `HEAD` (186), `CHILD` (53) or `MASTERS` written `MASTERS, X` keep their family; a surname ending a name without a full stop keeps it (`Anna Child`, `Mary Head`, `John Masters`). govuk-people moves 2 names toward their title (a deputy head of mission, written with the name behind the title), jrc-names 2 (an academician's title, and a label), psc-individuals 4 (3 scored as progress), orcid-researchers 43: a job or degree typed into a name box, read as the title where it was a given or family name (`X Y, Masters`, `X Y, Physical Therapist`, `PhD Student` leaving the suffix), and junk boxes reshaped (a box opening `Specialist in` now reads given 'in'), its agreement scoring the 4 regressions above and 16 records changed between two wrong readings; cz-candidates, ukec-individuals, patentsview-inventors, tse-donors and the rest none. - - **`Master's degree`, weighed apart and not listed.** The possessive is one word, so it needs readings of its own: `master's`, `bachelor's` and `doctor's` as `occupation` beside `degree` would read 248 of the 277 registry names whose part after a comma opens with one of them written with an apostrophe (`master's` 166, `bachelor's` 73, `doctor's` 34; the rest written with `´`), measured with a caller's lexicon on 2026-11-19. The files hold possessives already, as modifiers (`king's`, `queen's`), so the reading is expressible; whether a degree's possessive is a title is left for its own decision, the issue weighing it apart. + - **`Master's degree`, weighed apart and not listed.** The possessive is one word, so it needs readings of its own: `master's`, `bachelor's` and `doctor's` as `occupation` beside `degree` would read 248 of the 277 registry names whose part after a comma opens with one of them written with an apostrophe (`master's` 166, `bachelor's` 73, `doctor's` 34; the rest written with `´`), measured with a caller's lexicon on 2026-11-19. The files hold possessives already, as modifiers (`king's`, `queen's`), so the reading is expressible; whether a degree's possessive is a title is left for its own decision, the issue weighing it apart (listed since the 2026-11-19 #1487 entry below, as `modifier`). +- **2026-11-19 #1487 — A DEGREE'S POSSESSIVE IS A MODIFIER.** The #1457 entry left `Master's degree` apart: the possessive is one word with readings of its own. `master's`, `bachelor's` and `doctor's` are listed as `modifier` titles, not `occupation` as that entry's caller's-lexicon measure listed them: after a comma a modifier is read as any title is, alone (`Nadir Qassoumi, Bachelor's`) or before its head (`Master's degree`, `Master's student`, `Master's Candidate`), and in front of a name a modifier with no head after it claims nothing, so `Master's Nadir` keeps given 'Master's' as before; after a family comma a possessive opening the given part is the title, as any modifier is (`Qassoumi, Master's Nadir` → title "Master's"), the cost the #1457 entry takes for `Qassoumi, Medical Nadir`. + - **The apostrophe.** `Lexicon` folds no apostrophe into another (`_normalize` keeps `’`), so each word is listed again written with the typographic apostrophe, as fr.toml lists `d’` beside `d'`; `Master’s degree` reads as `Master's degree` does. No registry name writes the typographic one; 4 write `´` (`MASTER´S`), left unlisted as a misspelling. + - **Collisions.** No name reading: US Census folds the apostrophe (`Masters` 23,533, `Bachelors` and `Doctors` under 100), and `masters` keeps its own reading (`Masters, John` family 'Masters'). `Doctor`, a listed title, is a different word and reads as before; a surname with an apostrophe (`O'Master`) and a possessive ending a name (`Nadir Master's`, family) do not move. + - **MEASURED** against master `13cf07cd` (2026-11-19, py3.11), `tools/differential/measure.py --base`: 30 steps, two moving, `ctgov-contacts` 183 entries and `ctgov-officials` 98, 274 distinct names (`master's` 167, `bachelor's` 73, `doctor's` 34; the #1457 entry's 166 for `master's` counts parts after a comma, and the 167th name writes it with no comma before it, `Master's Degree Candidate`); `fec-individuals` and every other local corpus, the committed snapshot and the CLDR and GND records move none. Each moved name was read: 258 now read the name before the comma apart with the possessive in the title (`master's` 160, `bachelor's` 64, `doctor's` 34): 251 the base read reversed, and 7 it read apart already, the possessive moving out of the suffix into the title with the name fields kept (`Nadir Qassoumi, MD, Master's degree`), one of them leaving the field it was written with in the suffix (`…, MD, Master's in epi` → title "Master's", suffix 'MD, in epi'). 16 read wrong as they did before, the name before the comma still the family: a field written after `in` or `of` (10, `Master's Degree in Medicine` → given 'in'), a field written bare (1, `Master's Nursing`), a word cut short or misspelled (4, `Bachelor's deg`, `Master's Stu`, `bachelor's physical thrapy`), and one part holding no name. None reads worse in its name fields. Two shapes that are no person's name, probed rather than found in the corpora, move too: a label with no comma (`Master's degree` → title "Master's", family 'degree', reporting `title-or-name`) and a possessive before `of` (`Master's of Science Nadir` → title "Master's of Science"). + - Recompute: `uv run python tools/differential/measure.py --base `; the moved names are the entries listed in its ctgov steps, each classed by reading it. diff --git a/docs/migrate.rst b/docs/migrate.rst index b0a5fea7b..5df809e84 100644 --- a/docs/migrate.rst +++ b/docs/migrate.rst @@ -2255,21 +2255,26 @@ where 1.4 through 3.1 read it as the given name and the whole name before the comma as the family. A word that qualifies the job joins it (``Medical Doctor``, ``Clinical Research Coordinator``). The words are English, as ClinicalTrials.gov, where the shape was measured, fills its -forms in English, and a misspelling (``Proffesor``) or a possessive -(``Master's degree``) still reads the old way: +forms in English, and a degree's possessive joins it too (``Master's +degree``); a misspelling (``Proffesor``) still reads the old way: .. doctest:: >>> qassoumi = parse("Nadir Qassoumi, Medical Doctor") >>> qassoumi.title, qassoumi.given, qassoumi.family ('Medical Doctor', 'Nadir', 'Qassoumi') + >>> parse("Nadir Qassoumi, Master's degree").title + "Master's degree" >>> parse("Masters, John").family 'Masters' A name the word opens reads it as the title too, as with any title (``Student Mary Jones`` gives title ``Student``), and so does one alone after a surname and a comma (``Qassoumi, Student`` gives no given -name). To read such a word as a name, remove its reading: +name). A word that only qualifies a job, the possessive among them, +does not claim a name it opens alone (``Master's Nadir`` keeps given +``Master's``). To read such a word as a name, remove its reading, a +job's as ``kind="occupation"`` and a qualifier's as ``kind="modifier"``: .. doctest:: diff --git a/docs/release_log.rst b/docs/release_log.rst index 3fec6bcaf..ac6145149 100644 --- a/docs/release_log.rst +++ b/docs/release_log.rst @@ -8,7 +8,7 @@ Release Log - **Fix ud inside a South Asian compound name, which read as a credential and took the rest of the name.** ``parse("NADIR ZIA UD DIN")`` gives middle ``ZIA UD``, family ``DIN``, as 1.4.0 through 2.3.0 did, where 2.4.0 through 3.1.0 gave family ``ZIA``, suffix ``UD DIN``; ``UD`` alone after a name and a comma now reads as initials (``Anke Vissering, UD`` gives given ``UD``, family ``Anke Vissering``, where 1.4.0 through 3.1.0 gave suffix ``UD``). ``bt`` stays a credential: for Malay names remove it, as :doc:`customize` shows. :issue:`1467` - **Fix the surname1 and surname2 views, which left a family of two surnames whole before a family comma, opening with a particle, or behind a given name a particle completes.** Under ``two_family_names``, as ``locales.ES``, ``ES_AR``, ``CS``, ``SK``, ``PT_BR`` and ``PT_PT`` turn it on, ``parser_for(locales.ES).parse("García Márquez, Gabriel")`` gives surname1 ``García``, surname2 ``Márquez``, as ``Gabriel García Márquez`` does, where 3.0.0 through 3.1.0 gave surname1 ``García Márquez``, surname2 ``''``. No field moves; a family joined by ``y`` or written as one hyphenated word stays whole, and so, where 3.0.0 through 3.1.0 divided them, do a lone particle and the word after it under a family-first order (``Van Gogh``) and a Turkic father's name with its marker; with ``capitals_as_family`` on too, the family the capitals name is divided. :issue:`1456`, :issue:`1479` - **Change Parser.suggest() to read common surnames beyond the Chinese, Korean and Vietnamese ones, most of them Spanish.** ``Parser().suggest(["García Zorvan", "Quispe Qelliot"]).patch`` gives ``PolicyPatch(name_order=FAMILY_FIRST)``, where 3.1.0 found no evidence in either name and suggested nothing; a list of two to five Spanish names written family first now moves a given-first parser more often. :issue:`1364` - - **Fix a job or degree written out after a name and a comma, which took the name over.** ``parse("Nadir Qassoumi, Bachelor")`` gives title ``Bachelor``, given ``Nadir``, family ``Qassoumi``, where 1.4.0 through 3.1.0 gave given ``Bachelor``, family ``Nadir Qassoumi``; ``Medical Doctor`` and ``Clinical Research Coordinator`` read as one title. A name the word opens reads it as the title too (``Student Mary Jones`` gives title ``Student``), and the possessive ``Master's degree`` still takes the name over. :issue:`1457` + - **Fix a job or degree written out after a name and a comma, which took the name over.** ``parse("Nadir Qassoumi, Bachelor")`` gives title ``Bachelor``, given ``Nadir``, family ``Qassoumi``, where 1.4.0 through 3.1.0 gave given ``Bachelor``, family ``Nadir Qassoumi``; ``Medical Doctor`` and ``Clinical Research Coordinator`` read as one title. A name the word opens reads it as the title too (``Student Mary Jones`` gives title ``Student``). A degree's possessive after the comma is the title as well (``Master's degree``, ``Bachelor's``), though one opening a name alone stays the given name. :issue:`1457`, :issue:`1487` - **Fix Malaysian a/l, a/p and anak, which read as middle names and cut the father's name.** ``parse("KUMAR A/L RAJAN NAIDU")`` gives family ``A/L RAJAN NAIDU`` and the same ``patronymic``, as ``bin`` reads, where 1.4.0 through 3.1.0 gave middle ``A/L RAJAN``, family ``NAIDU``; ``anak`` opening a name written without a comma (Balinese ``Anak Agung``) is left to position, the given name by default, and reported. :issue:`1468` - **Fix Dutch Oude, which read as a middle name.** ``parse("Piet Oude Luttikhuis")`` gives family ``Oude Luttikhuis``, where 1.4.0 through 3.1.0 gave middle ``Oude``, family ``Luttikhuis``; ``Oude`` opening a name stays the given name, reported, being a rare Dutch given name too. :issue:`1455` - **Add locales.NL, which reads ten as a family-name particle.** ``parser_for(locales.NL).parse("Jan ten Brink")`` gives family ``ten Brink``, where the default, as 1.4.0 through 3.1.0, gives middle ``ten``; a ``Ten`` opening a name stays the given name, reported, save under ``strict=True``. It also takes a Chinese given-name syllable inside a name into the family (``Kheng Ten Choo`` gives family ``Ten Choo``), and choosing Dutch reads ``VD`` as ``van der`` rather than the credential (``John Smith, VD`` gives family ``John Smith VD``). See :ref:`dutch-particles`. :issue:`1455` diff --git a/nameparser/config/_compiled.py b/nameparser/config/_compiled.py index 957af545e..5547e2320 100644 --- a/nameparser/config/_compiled.py +++ b/nameparser/config/_compiled.py @@ -367,7 +367,9 @@ 'ayatollah', 'baba', 'bachelor', + "bachelor's", 'bachelors', + 'bachelor’s', 'bailiff', 'ballet', 'bandleader', @@ -527,9 +529,11 @@ 'docent', 'docket', 'doctor', + "doctor's", 'doctora', 'doctoral', 'doctorate', + 'doctor’s', 'domnișoara', 'domnul', 'dott.ssa', @@ -748,7 +752,9 @@ 'marketing', 'marquess', 'master', + "master's", 'masters', + 'master’s', 'mathematician', 'mathematics', 'matriarch', @@ -1595,6 +1601,8 @@ 'asst', 'attending', 'award-winning', + "bachelor's", + 'bachelor’s', 'ballet', 'banner', 'baseball', @@ -1621,7 +1629,9 @@ 'district', 'division', 'docket', + "doctor's", 'doctoral', + 'doctor’s', 'edmi', 'emerita', 'emeritus', @@ -1658,6 +1668,8 @@ 'literary', 'marcher', 'marketing', + "master's", + 'master’s', 'mathematics', 'medical', 'military', diff --git a/nameparser/config/_index.py b/nameparser/config/_index.py index 9d227bffc..5c865de69 100644 --- a/nameparser/config/_index.py +++ b/nameparser/config/_index.py @@ -269,7 +269,9 @@ ('baba', (('bn', 'religious', (('addresses', 'given'),)), ('hi', 'religious', (('addresses', 'given'),)))), ('babis', (('el', 'familiar', (('short_for', ('charalampos',)),)), ('en', 'familiar', (('short_for', ('charalampos',)),)))), ('bachelor', (('en', 'occupation', ()),)), + ("bachelor's", (('en', 'modifier', ()),)), ('bachelors', (('en', 'occupation', ()),)), + ('bachelor’s', (('en', 'modifier', ()),)), ('bailiff', (('en', 'office', ()),)), ('ballet', (('en', 'modifier', ()),)), ('bandleader', (('en', 'occupation', ()),)), @@ -875,9 +877,11 @@ ('docent', (('mul', 'academic', ()),)), ('docket', (('en', 'modifier', ()),)), ('doctor', (('mul', 'academic', ()),)), + ("doctor's", (('en', 'modifier', ()),)), ('doctora', (('es', 'academic', ()),)), ('doctoral', (('en', 'modifier', ()),)), ('doctorate', (('en', 'occupation', ()),)), + ('doctor’s', (('en', 'modifier', ()),)), ('dom', (('en', 'familiar', (('short_for', ('dominic',)),)),)), ('domnișoara', (('ro', 'salutation', (('after_given', True),)),)), ('domnul', (('ro', 'salutation', (('after_given', True),)),)), @@ -1772,7 +1776,9 @@ ('masoumeh', (('fa', 'spelling', (('spelling_of', ('masoomeh',)),)),)), ('massoud', (('fa', 'spelling', (('spelling_of', ('masoud',)),)),)), ('master', (('en', 'salutation', (('addresses', 'given'),)), ('en', 'family', ()))), + ("master's", (('en', 'modifier', ()),)), ('masters', (('en', 'occupation', ()),)), + ('master’s', (('en', 'modifier', ()),)), ('mat', (('en', 'familiar', (('short_for', ('mathew', 'matthew')),)), ('pl', 'familiar', (('short_for', ('mateusz',)),)))), ('mathematician', (('en', 'occupation', ()),)), ('mathematics', (('en', 'modifier', ()),)), diff --git a/nameparser/vocab/en.toml b/nameparser/vocab/en.toml index 23b5fa299..970391b0f 100644 --- a/nameparser/vocab/en.toml +++ b/nameparser/vocab/en.toml @@ -2073,6 +2073,14 @@ modifier = { issue = 1457, decided = 2026-11-19, note = "written after the name text = "award-winning" modifier = {} +[[word]] +text = "bachelor's" +modifier = { issue = 1487, decided = 2026-11-19, note = "written after the name and a comma by ClinicalTrials.gov officials and contacts, a degree's possessive before `degree`, `student` or `candidate` or alone (Nadir Qassoumi, Bachelor's degree), where it was read as the given name, the name before the comma as the family: 73 distinct names move, 64 to the title and the name read right, the rest left wrong as before (such as a field after `in` or a word cut short); no name bearer: US Census, which folds the apostrophe, counts Bachelors under 100; FEC's surname-first names and every other local corpus move none (2026-11-19)" } + +[[word]] +text = "bachelor’s" +modifier = { issue = 1487, decided = 2026-11-19, note = "bachelor's written with the typographic apostrophe, which the vocabulary does not fold into the straight one, so it is listed beside it as fr.toml lists d’ beside d'; none of the registry names bachelor's moves writes it (2026-11-19)" } + [[word]] text = "ballet" modifier = {} @@ -2177,10 +2185,18 @@ modifier = {} text = "docket" modifier = { issue = 9, expands = "Docket Clerk" } +[[word]] +text = "doctor's" +modifier = { issue = 1487, decided = 2026-11-19, note = "written after the name and a comma by ClinicalTrials.gov officials and contacts, a degree's possessive before `degree`, `student` or `candidate` or alone (Nadir Qassoumi, Doctor's degree), where it was read as the given name, the name before the comma as the family: 34 distinct names move, every one to the title and the name read right; no name bearer: US Census, which folds the apostrophe, counts Doctors under 100; it leaves the title Doctor alone; FEC's surname-first names and every other local corpus move none (2026-11-19)" } + [[word]] text = "doctoral" modifier = { issue = 1457, decided = 2026-11-19, note = "written after the name and a comma by ClinicalTrials.gov officials and contacts, 238 distinct names reading it as the title (Nadir Qassoumi, Doctoral) where it was read as the given name, the name before the comma as the family; no name bearers: under 100 US Census, under 5 US SSA a year, none on Wikidata, not in nam_dict, a miss proving nothing (2026-11-19)" } +[[word]] +text = "doctor’s" +modifier = { issue = 1487, decided = 2026-11-19, note = "doctor's written with the typographic apostrophe, which the vocabulary does not fold into the straight one, so it is listed beside it as fr.toml lists d’ beside d'; none of the registry names doctor's moves writes it (2026-11-19)" } + [[word]] text = "edmi" modifier = { issue = 9, note = "from #9's list of federal judges' titles; its meaning is not recorded there" } @@ -2326,6 +2342,14 @@ modifier = { expands = "Marcher Lord" } text = "marketing" modifier = {} +[[word]] +text = "master's" +modifier = { issue = 1487, decided = 2026-11-19, note = "written after the name and a comma by ClinicalTrials.gov officials and contacts, a degree's possessive before `degree`, `student` or `candidate` or alone (Nadir Qassoumi, Master's degree), where it was mostly read as the given name, the name before the comma as the family: 167 distinct names move, 160 to the title and the name read right, the rest left wrong as before (such as a field after `in` or a word cut short); no name bearer written so: US Census folds the apostrophe and counts Masters (23,533), which keeps its own reading, and a surname-first name keeps it before a comma (Master's, John); FEC's surname-first names and every other local corpus move none (2026-11-19)" } + +[[word]] +text = "master’s" +modifier = { issue = 1487, decided = 2026-11-19, note = "master's written with the typographic apostrophe, which the vocabulary does not fold into the straight one, so it is listed beside it as fr.toml lists d’ beside d'; none of the registry names master's moves writes it (2026-11-19)" } + [[word]] text = "mathematics" modifier = {} diff --git a/tests/v2/cases.py b/tests/v2/cases.py index 2a285d873..41bdcbf2b 100644 --- a/tests/v2/cases.py +++ b/tests/v2/cases.py @@ -21370,6 +21370,58 @@ def _check_cjk_shape_purity(self) -> None: classification="fix(#1457)", notes="H9: a modifier outside the leading run is read as any " "title is"), + # #1487: a degree's possessive, a title modifier. + Case("degree_possessive_and_head_after_a_comma_are_one_title", + "Nadir Qassoumi, Master's degree", + {"title": "Master's degree", "given": "Nadir", "family": "Qassoumi"}, + classification="fix(#1487)", + notes="H9: the possessive is a modifier, chained into 'degree'; " + "read given 'Master's', middle 'degree', family 'Nadir " + "Qassoumi' 1.4.0 through 3.1"), + Case("degree_possessive_with_the_typographic_apostrophe", + "Nadir Qassoumi, Bachelor\u2019s degree", + {"title": "Bachelor\u2019s degree", "given": "Nadir", "family": "Qassoumi"}, + classification="fix(#1487)", + notes="listed again with the apostrophe the vocabulary does not " + "fold (U+2019)"), + Case("degree_possessive_master_with_the_typographic_apostrophe", + "Nadir Qassoumi, Master\u2019s degree", + {"title": "Master\u2019s degree", "given": "Nadir", "family": "Qassoumi"}, + classification="fix(#1487)"), + Case("degree_possessive_in_capitals_before_student", + "NADIR QASSOUMI, BACHELOR'S STUDENT", + {"title": "BACHELOR'S STUDENT", "given": "NADIR", "family": "QASSOUMI"}, + classification="fix(#1487)"), + Case("degree_possessive_typographic_alone_in_lower_case", + "nadir qassoumi, doctor\u2019s", + {"title": "doctor\u2019s", "given": "nadir", "family": "qassoumi"}, + classification="fix(#1487)"), + Case("degree_possessive_opening_the_given_part_after_a_family_comma", + "Qassoumi, Master's Nadir", + {"title": "Master's", "given": "Nadir", "family": "Qassoumi"}, + classification="fix(#1487)", + notes="H9: a modifier opening the given part after a family comma " + "is the title, the cost #1457 took for 'Qassoumi, Medical " + "Nadir'; read given \"Master's\" 1.4.0 through 3.1"), + Case("degree_possessive_before_a_family_comma_stays_the_family", + "Master's, John", + {"given": "John", "family": "Master's"}, + notes="boundary: a modifier before a family comma with no name " + "word behind it stays the family (#1487)"), + Case("degree_possessive_alone_after_a_comma_is_the_title", + "Nadir Qassoumi, Doctor's", + {"title": "Doctor's", "given": "Nadir", "family": "Qassoumi"}, + classification="fix(#1487)", + notes="a modifier outside the leading run is read as any title is"), + Case("degree_possessive_opening_a_name_stays_the_given_name", + "Master's Nadir Qassoumi", + {"given": "Master's", "middle": "Nadir", "family": "Qassoumi"}, + notes="H9: a modifier in front claims nothing with no head after " + "it (#1487)"), + Case("degree_possessive_ending_a_name_stays_the_family", + "Nadir Master's", + {"given": "Nadir", "family": "Master's"}, + notes="a bare modifier ending a name is a name word (#1487)"), Case("head_title_before_of_after_a_comma", "Nadir Qassoumi, Head of Department", {"title": "Head of Department", "given": "Nadir", @@ -21526,12 +21578,20 @@ def _check_cjk_shape_purity(self) -> None: "word behind it before a family comma; 4 of FEC's " "1,893,964 names (decisions/salutation-titles); read " "family 'Masters Boyd' through 3.1"), - Case("possessive_degree_after_a_comma_is_still_read_as_the_name", - "Nadir Qassoumi, Master's degree", - {"given": "Master's", "middle": "degree", + Case("possessive_degree_with_an_acute_accent_is_still_read_as_the_name", + "Nadir Qassoumi, Master\u00b4s degree", + {"given": "Master\u00b4s", "middle": "degree", + "family": "Nadir Qassoumi"}, + notes="boundary: the acute accent written for the apostrophe " + "(4 registry names) is left unlisted as a misspelling " + "(#1487)"), + Case("possessive_degree_with_an_unlisted_apostrophe_is_still_read_as_the_name", + "Nadir Qassoumi, Master\u02bcs degree", + {"given": "Master\u02bcs", "middle": "degree", "family": "Nadir Qassoumi"}, - notes="boundary: the possessive is left unlisted (#1457), so " - "the part still takes the name over"), + notes="boundary: the possessive is listed with the straight and " + "the typographic apostrophe (#1487), not U+02BC, so the " + "part still takes the name over"), # #1467: `ud` loses its credential reading; `bt` keeps its own. Case("ud_inside_a_compound_name_in_capitals_is_a_name_word", "NADIR ZIA UD DIN",