Skip to content

Classify the rest of the titles; und.toml holds no title (#750) - #773

Merged
derek73 merged 7 commits into
masterfrom
feat/title-kinds-750-part2
Oct 20, 2026
Merged

derek73 merged 7 commits into
masterfrom
feat/title-kinds-750-part2

Conversation

@derek73

@derek73 derek73 commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Classifies the 644 titles still generic in nameparser/vocab/und.toml into the ten title kinds #769 added, and moves each into the files of the languages whose names it occurs in. und.toml now holds no title (uv run python tools/vocab/query.py --kind title --file und --count prints 0), which is #750's done-when. One word keeps the generic kind, in en.toml: wm, the abbreviation of William, made a title for #68. No title kind describes it, and removing it would move a parse (the bare Wm Smith), so that is left to its own change.

No compiled set moves. tools/vocab/build.py --check reports _compiled.py current, and tools/differential/snapshot.py matches the snapshot. The suite, mypy and ruff are green.

What moved where

  • en.toml takes most of them (530 of the 678 readings written): the bulk import's occupations, the US military ranks and their abbreviations, the offices, and the modifiers (vice, rear, petty, the ordinals, the domain words such as baseball and tax, and the court words from Judge-related titles not parsing #9's list of judges' titles).
  • mul.toml: dr, prof, docent, doctor, professor.
  • Noble ranks, native-script academic and religious titles go to their languages' files. Transliterations go to their source language, as in part 1: the Islamic titles to ar or fa, rabbi to he, rebbe to yi, maharajah/maharani/subedar to hi, tsar/tsarina to ru, effendi to tr.
  • Four new files: bin (edohen, ekegbian), ff (lamido), mi (rangatira), yi (rebbe).
  • Part 1's decisions applied: lord, lady, knight and chief are nobility, and deputy is an office.

Contested assignments (shown to Derek before opening, approved in chat 2026-10-19)

  • In 3 or more files:
    • baron: en, fr, nl, de
    • sultan: ar, ms, tr
    • greve: sv, da, nb
    • д-р, проф, акад: ru, uk, bg
  • Gender:
    • Noble ranks: the man's title of a pair is marked m, as king already is.
    • Descriptive nouns: only the -ess form is marked (actress, heiress).
    • sultan records none, because Ottoman usage gave it to imperial women too.
  • academic as a form of address:
    • English: advocate, attorney, engineer, nurse.
    • German: ra, wp, pd/priv.-doz, dipl.-ing.
    • French: me.
    • Devanagari: पंडित/पं, matching part 1's academic refusal of the Latin pandit.
  • Buddhist, Jain and Zoroastrian titles stay in en.toml as English loanwords.
  • Also given names. Many moved words are given names (US SSA births: marquis 25,041, royal 24,394, deacon 11,570, baron 7,059, ...). This PR only classifies them; whether any should stop being a title is a separate change.

Comments became fields

The record is the new 2026-10-19 entry in docs/design/decisions/vocabulary-model.md. Review: the docs review found three small defects, fixed in the second commit and re-reviewed clean. The PR review (code reviewer and comment analyzer) found note, kind and doc defects, fixed in the third commit with Derek's calls on wm, doctor and पंडित. The review of that fix found three more (the wm parse claim, measured with the word listed rather than removed; two "all titles classified" statements; डा's remark in expands), fixed in the fourth; the fifth corrects part 1's recompute sentence, since --kind title counts the whole category and no query isolates the generic kind. Each fix commit was reviewed. The sixth records the wm lesson as a field note in docs/design/mechanisms.md's Verification shapes: a claim about what a vocabulary entry does is measured on the parse without it (docs review clean).

Closes #750.

🤖 Generated with Claude Code

derek73 and others added 3 commits October 19, 2026 23:05
The 644 titles still generic in und.toml take their kinds and leave for
the files of the languages whose names they occur in: occupations,
military ranks, offices and modifiers mostly to en.toml, dr, prof,
docent and professor to mul.toml, the noble ranks and native-script
academic and religious titles to their languages' files. Four files are
new (bin, ff, mi, yi). The block comments over the native-script titles
become notes on one entry of each group, and duke's keep-out becomes an
exclusion in en.toml with its counts.

No compiled set moves: build --check is current and the snapshot
matches.

Part of #750.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clergyman records no gender, the list holding no clergywoman, so the
data matches the -man rule the entry states; build.py's und.toml
exemption quotes a pointer that still exists; the shared-readings
bullet lists all eleven credentials.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added enhancement vocabulary Per-word vocabulary model and language packs labels Oct 20, 2026
@derek73 derek73 self-assigned this Oct 20, 2026
@derek73 derek73 added the vocabulary Per-word vocabulary model and language packs label Oct 20, 2026
@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.05%. Comparing base (732a271) to head (8051e3c).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #773   +/-   ##
=======================================
  Coverage   99.05%   99.05%           
=======================================
  Files          47       47           
  Lines        4642     4642           
=======================================
  Hits         4598     4598           
  Misses         44       44           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

derek73 and others added 4 commits October 19, 2026 23:41
wm keeps the generic title kind with a note saying it is William's
abbreviation, made a title for #68; doctor joins dr, prof, docent and
professor in mul.toml; पंडित and पं are academic, as part 1's refusal
of the Latin pandit is keyed. The #9 court words carry issue = 9,
expands keeping only their meaning; tsar and giani put their native
spelling in native. Restored: #606's reason for administrator and
commissioner, #344's native-only rule (on न्यायमूर्ति), डा's edge-period
remark. Fixed: duke's example bearer, the д-р note's use of
family-first, the README's refusal-only example (senior gained a
reading), hon's and mpco-cg's notes, edmi's guess. Part 1's entry marks
what part 2 completed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wm's note and entry cite the parse removal moves, measured with the
word removed: only the bare 'Wm Smith' depends on it, the dotted 'Wm.'
being taken by the period-abbreviation shape rule either way. The
README and the decisions entries say wm is the one generic title left.
डा's edge-period remark is a note in hi.toml, not an expands in two
files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--kind title names the whole title category, so the und.toml query
counts the titles left there, not the generic ones; no query isolates
the generic kind, and wm is the one left, in en.toml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A claim about what a vocabulary entry does is measured on the parse
without it; wm's first note read it off the parse with the word
listed, and rules/H2's shape rule shadows the dotted spelling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73
derek73 merged commit 8275e8e into master Oct 20, 2026
12 checks passed
@derek73
derek73 deleted the feat/title-kinds-750-part2 branch October 20, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement vocabulary Per-word vocabulary model and language packs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Classify the titles in und.toml by language and kind

1 participant