Skip to content

Read a one-case bare letter as the initial its capital is (#723) - #726

Merged
derek73 merged 5 commits into
masterfrom
claude/issue-723-2c3c78
Oct 19, 2026
Merged

derek73 merged 5 commits into
masterfrom
claude/issue-723-2c3c78

Conversation

@derek73

@derek73 derek73 commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Closes #723.

In a name written wholly in one case, a bare capital was tagged an initial and a bare lowercase letter was not (except the roman-numeral letters, #721). So every rule that reads an initial read the two spellings of one name differently:

input before after (= its capitals)
j nee smith family j given j (M4)
j reports given-or-family no report (O5)
jose j y lopez family j y lopez middle j y, family lopez (P3's count)
smith, j y lopez given j y lopez given j, middle y lopez

Change. classify tags a bare letter an initial where its capital matches the bare-capital shape (A to Z), in a name whose own words are written in one case. This replaces #721's numeral-only test. A letter outside the own words (a maiden clause, a nickname, words past a declined marker) asks the whole name's case instead, so a lowercase y in MARIA GARCIA NEE LOPEZ y FERNANDEZ stays a connective. é and ж are unchanged; P3's fork still answers first for a connective letter among the own words.

What moved. Lowercase letters in names whose own words are one case, each onto its capital twin's reading. No capital spelling moved, no corpus name moved (the snapshot gains only the new rules examples), and no corpus name's capitalized() moved. A one-case clause connective now repairs as its capital does (jose lopez nee y garcia → Jose Lopez (Y Garcia)). The clause fix also returns MARY SMITH NEE v JONES to the reading 1.4.0, 2.4.2 and its mixed-case spelling give (no maiden), which only the unreleased #721 had moved. Details and measurements: docs/design/decisions/T4-bare-letter-as-an-initial.md.

Measured. A scratch grid of letters a–z, é and ж in 35 one-case shapes, three heads and three orders (recipe in decisions/T4): 504 of 7,794 lowercase/capital pairs disagreed on 16ee285, none now. The committed invariant test_a_one_case_name_reads_as_its_capitals gains the issue's shapes and the letters j, y and e (3,168 pairs, 0.48s; 16ee285 disagrees on 30; recorded controls 306 and 117).

Docs. New rules/T4 (the bare letter as an initial) and decisions/T4. P3's Accepted paragraph on a declined marker loses the shape where the own words read differently in the two spellings. M4 and O5 gain examples. P2's sentence about a lowercase v behind a particle had been stale since #721 and is corrected. decisions/S10's Open question is answered. Plus a release-log bullet, the initial tag's docs in _types.py and modules.rst, and AGENTS.md's spelling-sweep sentence.

Reviews. A code review found the clause gap fixed in cf84641. A design-docs review (all eleven axes) found T4's own-words scope unstated, the É wording, the missing grid recipe, the ı twin claim, the unrecorded case-repair move, P2's stale sentence and the maiden-clause numeral move. All are fixed in 52d127e and a1b0b04.

Known gap, not fixed here. It predates this PR: under Policy(lenient_comma_suffixes=False), the strict comma test asks a numeral's shape as written, so john smith, v reads suffix v where JOHN SMITH, V reads given V. It is recorded in decisions/T4 and filed as #727.

🤖 Generated with Claude Code

derek73 and others added 4 commits October 18, 2026 18:43
In a name written wholly in one case a bare capital was tagged an
initial and a bare lowercase letter was not (except the roman-numeral
letters, #721), so every rule that reads an initial read the two
spellings of one name differently: 'j nee smith' gave family 'j' where
'J NEE SMITH' gives given 'J' (M4), a lone 'j' reported
given-or-family where 'J' does not (O5), and 'jose j y lopez' read
family 'j y lopez' where 'JOSE J Y LOPEZ' reads middle 'J Y' (P3's
count passes over an initial).

classify now tags a one-case bare letter an initial wherever its
capital matches the bare-capital shape, which subsumes #721's numeral
test. Only lowercase spellings move, each onto its capital twin's
reading; no corpus name moved. A letter whose capital is no initial
('é', 'ж') is unchanged, and P3's fork still answers first for a
connective letter among the name's own words.

Measured over every Latin letter, 'é' and 'ж' in 35 one-case shapes
under all three orders (scratch grid): 504 of 7,794 lower/upper pairs
disagreed before (fields, report kinds, initials()), none after, and
no capital spelling moved. The committed invariant's grid gains the
issue's shapes and the letters j, y and e (16ee285 disagrees on 30 of
its 3,168 pairs; control 306).

Docs: new rules/T4 (the bare letter as an initial) and decisions/T4;
P3's Accepted paragraph on a declined marker loses its one shape where
the own words read differently in the two spellings ('dr. née juan y
lopez' now reads middle 'juan y' as its capitals do); M4 and O5 gain
examples; decisions/S10's Open question is answered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new tag was gated on the own-words one-case fact, so a lower-case
letter in a clause beside capitals passed it: 'MARIA GARCIA NEE LOPEZ
y FERNANDEZ' tagged its 'y' an initial and 'DR. NÉE JUAN y LOPEZ'
moved its family. That is mixed-case writing, no initial under T4. A
word outside the own words now asks the whole name's case; own words
keep the own-words fact (P3). The numeral letters had the same gap
since #721 and move with it. Pinned by a classify test, a case row
and a T4 boundary example; decisions/T4 records it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
T4 says the case question is asked of the name's own words (j nee
Smith reads given 'j'), names its capital as A to Z rather than 'Latin
capital', and adds P2 and R4 to interacts. P2's lowercase example had
read as its capitals since #721; it now says so. decisions/T4 gains
the scratch grid's full recipe, corrects the 'ı' twin claim, records
the case-repair move, and the strict comma knob's pre-existing gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.04%. Comparing base (16ee285) to head (d6bebd8).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #726   +/-   ##
=======================================
  Coverage   99.04%   99.04%           
=======================================
  Files          46       46           
  Lines        4585     4586    +1     
=======================================
+ Hits         4541     4542    +1     
  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 derek73 added this to the 2.5 milestone Oct 19, 2026
@derek73
derek73 merged commit 2444f84 into master Oct 19, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should j nee smith read like J NEE SMITH? A lowercase single letter isn't an initial in a one-case name

1 participant