Skip to content

Read a job or degree written after a name and a comma as the title (#1457) - #1486

Merged
derek73 merged 1 commit into
masterfrom
claude/issue-1457-job-and-degree-words-0d90e5
Nov 19, 2026
Merged

derek73 merged 1 commit into
masterfrom
claude/issue-1457-job-and-degree-words-0d90e5

Conversation

@derek73

@derek73 derek73 commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Closes #1457

ClinicalTrials.gov's officials and contacts write a job or a degree after the name and a comma, and an unlisted word there took the name over: Nadir Qassoumi, Bachelor read given Bachelor, family Nadir Qassoumi (1.4.0 through 3.1.0). As decided on the issue, this lists the words: 39 jobs and degrees as occupation titles and 19 qualifiers as modifiers, in en.toml, each with its counts on its entry. A modifier chains into the title after it, so Medical Doctor and Clinical Research Coordinator read as one title. No rule or pipeline code changes. principle (principal misspelled) is refused with an excluded entry.

Nadir Qassoumi, Bachelor                 → title 'Bachelor', given 'Nadir', family 'Qassoumi'
Nadir Qassoumi, Medical Doctor           → title 'Medical Doctor'
Lina Farouk Saleh, Clinical Research Coordinator → title 'Clinical Research Coordinator'
Masters, John                            → family 'Masters' (unchanged)
Nadir Qassoumi, Master's degree          → unchanged: given "Master's" (left for its own decision)

Totals (ClinicalTrials.gov, 652,782 distinct names, against master d12af9d)

A name is reversed when its part after the first comma opens with a spelled word (Site left out) and the parse reads the whole text before the comma (two words or more) as the family. Before: 9,000 reversed. After: 4,972 read apart, 3,685 still reversed by an unlisted word (misspellings, fields of study, abbreviations, other languages), 343 still reversed by an unlisted word after a listed one (Clinical Pharmacologist; 74 of them a title run with in behind it, Masters in …). No name newly reversed.

Ten countries with most names read apart (reversed names, before → after; share of the country's names):

Country Before After Share before → after
China 1,599 415 2.6% → 0.7%
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%
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 8.0% → 1.8%

Per word

Word Reading ClinicalTrials.gov names whose part after a comma it opens, read as the title (0 before) Names it costs, where
bachelor occupation 1,309 none measured (8 FEC surname-first names unmoved)
bachelors occupation 26 none measured
doctorate occupation 462 none measured
masters occupation 287 FEC: 4 names opening a double surname before a family comma (H6), 1 in a part past the second comma (C2); unmeasured shapes: Masters John family-first with no comma, John Masters. with a full stop; Mr Masters now reports title-or-name (no corpus writes it)
student occupation 238 none measured (1 PSC filer opening with it typed it in the title box)
specialist occupation 266 none measured
pharmacist occupation 109 none measured
physiotherapist occupation 125 none measured
oncologist occupation 104 none measured
midwife occupation 92 none measured
cardiologist occupation 74 none measured
postgraduate occupation 144 none measured
graduate occupation 105 none measured
undergraduate occupation 27 none measured
fellow occupation 62 none measured
dentist occupation 47 none measured
neurologist occupation 53 none measured
statistician occupation 72 none measured
demonstrator occupation 45 none measured
coordinator occupation 38 none measured
postdoc occupation 43 none measured
postdoctor occupation 18 none measured
physio occupation 37 none measured
academician occupation 22 none measured
anesthesiologist occupation 23 none measured
intern occupation 24 none measured
trainee occupation 19 none measured
nephrologist occupation 24 none measured
dietitian occupation 14 none measured
nutritionist occupation 15 none measured
urologist occupation 18 none measured
physiatrist occupation 14 none measured
optometrist occupation 13 none measured
gastroenterologist occupation 13 none measured
radiologist occupation 13 none measured
therapist occupation 14 none measured
degree occupation 35 ORCID: 2 given boxes opening with it (Nigeria, Papua New Guinea)
diploma occupation 23 none measured
candidate occupation 14 none measured
medical modifier 928 none measured
clinical modifier 371 none measured
research modifier 232 none measured
study modifier 192 none measured
doctoral modifier 238 none measured
full modifier 124 none measured (13 FEC surname-first names unmoved)
attending modifier 51 none measured
associated modifier 45 none measured
registered modifier 42 none measured
project modifier 42 none measured
teaching modifier 19 none measured
adjunct modifier 15 none measured
occupational modifier 19 none measured
physical modifier 84 none measured
postdoctoral modifier 23 none measured
pediatric modifier 22 none measured
child modifier 28 ORCID: 1 junk box (Child.org); 53 FEC surname-first names unmoved
lead modifier 27 none measured
head modifier 84 none measured (186 FEC surname-first names opening with it unmoved)
principle refused (excluded): principal misspelled 0 (26 left) —

Costs, measured in the other corpora (measure.py --base <master>)

  • FEC (1,893,964 names, written surname-first): 6 moves. 4 open a double surname with MASTERS before a family comma and lose it to the title (rules/H6); 1 has MASTERS in a part past the second comma (C2); 1 is a label. No listed word stands after a comma as a given name. HEAD (186), CHILD (53) and MASTERS, X names keep their family.
  • ORCID (1,831,533 records): 43 moves, mostly a job typed into a name box. local_agreement scores 4 regressions: two given boxes opening with Degree (Nigeria, Papua New Guinea), Child.org, and a box opening Specialist in ….
  • PSC: 4 moves, 3 scored as progress (Head Of Marketing … read as the title); the one filer opening with Student typed it in the title box.
  • govuk-people 2 (toward the title, Deputy Head of Mission …), jrc-names 2; cz-candidates, ukec-individuals, patentsview-inventors, tse-donors, the rest: none. CLDR and GND: none.
  • Shapes accepted, with rows: a name the word opens reads it as a title (Student Mary Jones; Masters John under FAMILY_FIRST); a lone word after a surname and a comma leaves no given name (Qassoumi, Student); a modifier opening the given part after a family comma (Qassoumi, Medical Nadir); John Masters. with a full stop; Mr Masters now reports title-or-name (no local corpus writes the shape). Surnames that mostly qualify a head (head, child) are modifiers, so Head Mary Smith, Head Boyd, Mary and Anna Child keep the name.

Master's degree

Not listed. It would take three possessive entries (master's, bachelor's, doctor's) beside degree, which now ships; with them 248 of 277 such registry names would read right (master's 166, bachelor's 73, doctor's 34), measured with a caller's lexicon. Left for its own decision, as the issue asked.

Changes

  • nameparser/vocab/en.toml: 58 readings with notes, one excluded; compiled modules rebuilt.
  • tests/v2/cases.py: 30 rows (every fix(#1457) row fails on master; parity rows checked with parity_check.py: 0 of 652 differ from 1.4.0). tests/test_suffixes.py: the delimiter test moved off Fellow. test_cases.py: field-sweep claim count 2195 → 2198.
  • docs/design/decisions/salutation-titles.md: Standing bullet and the 2026-11-19 Should a spelled-out degree or job after a name and a comma read as one? (Ahmed Ali, Bachelor gives given Bachelor, family Ahmed Ali) #1457 entry (population, recipes, words, refusals, measurement, costs). decisions/H9: pointer. rules/H9: two examples. nameparser/vocab/README.md: occupation and modifier definitions.
  • docs/migrate.rst "Changed in 3.2" entry with doctests; one release-log bullet. Snapshot re-recorded (one committed name moves: Doe, John, MD PhD - FACS Fellow → title 'Fellow').

Checks

uv run pytest (51,425 passed, after rebasing on 25423c5), uv run pytest -n0 -m serial (38 passed), uv run mypy, uv run ruff check, uv run sphinx-build -b doctest docs (0 failures), python -m doctest README.rst, tools/vocab/build.py --check, tools/differential/parity_check.py.

Review

Reviewed with pr-review-toolkit's code-reviewer, comment-analyzer and pr-test-analyzer, and the design-docs-reviewer; each fix commit reviewed again (code-reviewer and design-docs-reviewer on the first fix, design-docs-reviewer on the second, its three findings fixed; the review commits are squashed into one commit here). Not applicable: silent-failure-hunter and type-design-analyzer (no code, no types), code-simplifier (no code).

Example names are invented and appear in no local corpus.

🤖 Generated with Claude Code

…1457)

ClinicalTrials.gov's officials and contacts write a job or a degree
spelled out after the name and a comma (`Nadir Qassoumi, Bachelor`), and
an unlisted word there was read as the given name, the whole name before
the comma as the family. Thirty-nine job and degree words join TITLES as
`occupation` readings and nineteen qualifiers as `modifier` readings,
each vetted on its bearer counts and recorded on its entry, so
`Medical Doctor` and `Clinical Research Coordinator` read as one title;
`principle` (principal misspelled) is refused.

Of the registry's 9,000 names read reversed (the whole text before the
comma as the family), 4,972 now read apart and none newly reversed. The
costs taken, and how each figure is recounted, are in
decisions/salutation-titles' 2026-11-19 #1457 entry; the README's
`occupation` and `modifier` definitions say why degrees are occupations
and surnames that qualify a head are modifiers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 3.2 milestone Nov 19, 2026
@derek73 derek73 added vocabulary Fixed by a word-list entry: per-word vocabulary and language packs titles Titles and honorifics (rules/H) commas Commas and name structure (rules/C) labels Nov 19, 2026
@derek73 derek73 self-assigned this Nov 19, 2026
@derek73
derek73 merged commit 12b568f into master Nov 19, 2026
14 checks passed
@derek73
derek73 deleted the claude/issue-1457-job-and-degree-words-0d90e5 branch November 19, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commas Commas and name structure (rules/C) titles Titles and honorifics (rules/H) vocabulary Fixed by a word-list entry: per-word vocabulary and language packs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should a spelled-out degree or job after a name and a comma read as one? (Ahmed Ali, Bachelor gives given Bachelor, family Ahmed Ali)

1 participant