Skip to content

Read a given name written short as that given name, over rules/H2's shape (#752, phase 2k) - #897

Merged
derek73 merged 2 commits into
masterfrom
claude/phase2k-abbreviated-given-names-02bc17
Oct 26, 2026
Merged

derek73 merged 2 commits into
masterfrom
claude/phase2k-abbreviated-given-names-02bc17

Conversation

@derek73

@derek73 derek73 commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Phase 2k of #752: a given name written short outranks rules/H2's shape (H2 is the leading-abbreviation title). This settles the dotted half of #789. The bare half, wm out of the titles, was #873.

What changes

The dotted abbreviations below opened the given-name part as titles, from 1.4.0 through 2.6.0. H2's shape reads any unlisted word of two or more letters that ends in a period as a title there. Now each one is the given name it abbreviates:

input before (1.4.0–2.6.0) now
Chas. Smith title Chas. given Chas.
Mrs Ma. Liza Cruz title Mrs Ma., given Liza title Mrs, given Ma.
Smith, Ma. John (H2's own example) title Ma. given Ma.
SMITH, WM. DAVID title WM. given WM.
Chas. Smith, Ed given Ed, family Chas. Smith given Chas., suffix Ed (as John Smith, Ed)
  • Vocabulary. Each word gets a given reading whose same_as is the full name, with its vetting counts:
    • en.toml: chas, thos, jas, geo, robt, benj, jno, saml, edw, richd, wm
    • a new fil.toml: ma (María) and jo (José)
  • Build. same_as on a given reading names the full name. That name is not a vocabulary entry, so check 7 asks only that it be normalized and not the word itself. A family reading may not take one. The reading compiles into a new set, GIVEN_NAME_ABBREVIATIONS (Lexicon.given_name_abbreviations, re-exported from nameparser.config.given_names).
  • Parser. Classify tags the word vocab:given-abbreviation. H2's shape test declines a tagged word, in both of its spellings: _pieces.is_leading_title reads the tag, and _vocab.is_title_shaped reads the lexicon. The second is also what C4's comma count and the title-phrase head run ask, which is why Chas. Smith, Ed moves. H2 itself has no special case.
  • What stays put. A listed title still wins. The reading acts nowhere but the head of the given-name part, so these keep their readings:
    • the bare word: Ma Smith, Smith, John Ma, John Smith, JAS
    • the dotted word anywhere else: John Smith Ma. → family, John Ma. Smith → middle
    • ma's surname and credential readings
  • Shim. The set is passed whole. A v1 caller who lists the word as a title gets 1.4's reading back.

Measured

All with --base against master 12384fa, 2026-10-26, and re-taken after the review fix with the same counts:

corpus moved shape
committed snapshot 2 Ma. opening the name, and H2's example
CLDR / GND / Wikidata agreement 0 the conventions view gains one Ma. title
ctgov-officials 15 of 536,981 each Ma. opening the name, mixed case
fec-individuals 24 of 1,893,964 all capitals, after a family comma: WM. 20, MA. 2, GEO. 1, EDW. 1
tse-donors 2 of 854,531 MA. opening the name
tse-donors spelling pairs 0
psc-individuals 86 fixed, 0 broken, 2 changed all Ma.: 81 behind a salutation filed in the title box, 7 opening the name

These match the spike of 2026-10-24.

After merging master 32049ad (#896, phase 2j's wing), I re-measured against that master with --base and got the same counts in every row. Names that use both changes read as a plain given name would in their place (Mrs Ma. Wing Lau → title Mrs, given Ma., middle Wing).

Under a family-first order the word is now a name word placed by the order: Chas. Smith → family Chas., as Jack Smith reads.

test_a_given_name_written_short_reads_as_a_given_name checks this over 13 words × 6 spellings × 21 slots × 3 orders (4,914 texts):

  • wherever the shape fired, the dotted spellings read as the name does with Jack in the word's place;
  • everywhere, the bare spellings read as they do with the set emptied.

Each predicate half is mutation-checked:

switched off pairs that fail
the peel (is_leading_title) 2,103
the comma count (is_title_shaped) 234
the title-phrase calls alone 117
the set put back in the wordlist rosters (pre-fix code) 66

Review

  • Code review. It found that the new field had joined the two wordlist rosters in _vocab.py that only words claimed as non-names belong in: in_any_wordlist and claimed_as_non_name. That reversed John Smith, JAS and Jas SMITH, XYZ. The field now stays out of both, as bound_given_names does. AGENTS.md records the lesson.
  • Second review of the fix commits. It found no regression: 0 bare moves against master over a 4,056-text grid. It did find one reading the H2 bullet had overclaimed. rules/C6's case contrast skips a period-marked word, so Chas. SMITH, XYZ reverses (given XYZ), just as J. SMITH, XYZ does today, while Charles SMITH, XYZ reads suffix XYZ. This is not new. I narrowed the sentence and left C6 alone; widening C6 would be its own decision.
  • Design-docs review. It found stale "the shape outranks vocabulary" sentences in H2's Then, H4, H9, the H Background, decisions/A1 and mechanisms.md, and two README contradictions about same_as. All are fixed.

Axis 12, for your call. The H2 bullet reads no new signal in the name: the same shape, at the same position. Its one new input is the word's given reading, which outranks the shape. That is why it is H2's Precedence rather than a rule of its own. The Signal line says so.

Checks

  • uv run pytest (also on 3.15), and -n0 -m serial
  • mypy, ruff, build.py --check, sphinx doctest
  • code review, design-docs review, and a second review of the two fix commits

Closes #789. Refs #752.

🤖 Generated with Claude Code

…hape (#752, phase 2k)

#789's dotted half. The traditional English abbreviations (Chas., Thos.,
Jas., Geo., Robt., Benj., Jno., Saml., Edw., Richd., Wm.) and the Filipino
Ma. (María) and Jo. (José) opened the given-name part as titles by
H2's shape from 1.4.0 through 2.6.0; each now reads as the given name
it abbreviates, as the full name would read in its place.

- A `given` reading may carry `same_as`, the full name, which compiles
  the word into GIVEN_NAME_ABBREVIATIONS (Lexicon.given_name_abbreviations,
  nameparser.config.given_names); en.toml gains the eleven, fil.toml
  `ma` and `jo`.
- Classify tags the word; H2's shape test declines it in both spellings
  (_pieces.is_leading_title, _vocab.is_title_shaped), so C4's comma count
  reads it as a name word too (`Chas. Smith, Ed` -> suffix 'Ed'). The set
  stays out of the wordlist rosters, so a bare spelling reads as before.
- rules/H2 gains the Precedence bullet; decisions/H2 and
  vocabulary-model record the measurement: snapshot 2, ctgov 15, FEC 24,
  tse 2, PSC 86 fixed / 0 broken / 2 changed against master 12384fa.

Closes #789. Refs #752.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added enhancement vocabulary Per-word vocabulary model and language packs labels Oct 26, 2026
@derek73 derek73 self-assigned this Oct 26, 2026
…eviated-given-names-02bc17

# Conflicts:
#	docs/design/rules/H9-title-phrase.md
#	docs/release_log.rst
#	tests/v2/rules_budget.json
@derek73 derek73 added this to the 2.7 milestone Oct 26, 2026
@derek73
derek73 merged commit 1353913 into master Oct 26, 2026
12 checks passed
@derek73
derek73 deleted the claude/phase2k-abbreviated-given-names-02bc17 branch October 26, 2026 23:00
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.

Should Chas. Smith read given Chas.? Abbreviated given names read as titles today

1 participant