Repository navigation
Read a one-case bare letter as the initial its capital is (#723) - #726
Merged
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
j nee smithjj(M4)jgiven-or-familyjose j y lopezj y lopezj y, familylopez(P3's count)smith, j y lopezj y lopezj, middley lopezChange.
classifytags 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 lowercaseyinMARIA GARCIA NEE LOPEZ y FERNANDEZstays 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 returnsMARY SMITH NEE v JONESto 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 invarianttest_a_one_case_name_reads_as_its_capitalsgains the issue's shapes and the lettersj,yande(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
vbehind a particle had been stale since #721 and is corrected. decisions/S10's Open question is answered. Plus a release-log bullet, theinitialtag's docs in_types.pyand 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, sojohn smith, vreads suffixvwhereJOHN SMITH, Vreads givenV. It is recorded in decisions/T4 and filed as #727.🤖 Generated with Claude Code