Repository navigation
Read a nickname, one name word and a suffix as the family name (#815) - #1107
Merged
Merged
Conversation
N3 (the lone-word nickname rule) now sets a suffix aside, as H1 (a
title and one name word) and M4 (a maiden marker makes the lone name
word the family) already did: "'Smitty' Jones Jr." reads family
'Jones' and no longer reports given-or-family. The early count is
unchanged; the suffixed shape is decided at O5's site, after the
trailing peel, so a word the vocabulary or its shape claimed keeps its
claim ("'Smitty' J. Jr." stays given 'J.').
Rules N3, O5 and M4 amended; decisions/N3 records the measurement
(one committed-corpus name, three nepal-candidates names taken as the
cost) and closes the question decisions/H1's #410 entry left open.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Gate the nickname scan on state.extracted, so a lone word with no delimited clause pays no frame (Madonna and Smith Jr. back to master's call counts). - rules/N3: the Except cites the rules whose reading a word keeps (T5, T4, P5, P4) and no longer claims M4 agrees on particles; a Precedence bullet gives a title word to H4; Accepted covers the dotted Nepal shape and the comma reach (a nickname in any part, an S1 clause, a nickname alone before a comma). - decisions/N3: capitalized headline, the 660-row grid, the reach the reviews found, and the population bounding each local-corpus zero; decisions/H1's #410 head marked. - Tests: the grid walks 660 rows in one test (quoted nicknames after the word, VI, Ph. D.), the claimed-word test adds bare and one-case initials and a particle, and case rows pin the comma, S1, acronym, gated-word, title-word, period-shape and given-abbreviation shapes. - shapes.py: a nickname-and-suffix arrangement under each order. - Release log: 2.0.0 through 2.8.2, the report since 2.3.0, and the full Except. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The suffix grid parses each bare name once and drops FAMILY_FIRST_GIVEN_LAST, which reads every row as FAMILY_FIRST does (440 rows, all failing on master 90a9a86); it compares as_dict() whole, so a title or maiden name moving fails it too. - The claimed-word control stays as data in its comment; the test that only asserted a length is gone. - _assign.py: the N3 handoff is stated once, at the decision site. - test_cases.py: one dated step for #815's claim count. snapshot.jsonl unchanged; frame counts unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- rules/N3: the Except lists exactly the three readings it keeps and says a given name written short is none of them; the Nepal Accepted bullet is the vocabulary reading again (D.C and जी.सी. are listed credentials, not dotted-shape reads), and decisions/N3 says so. - rules/O5: M4's exception names the given-name and initial claims only, since M4 flips a particle (de née Jones -> family 'de'). - cases.py: an empty-head boundary row; the Xyz. note states the mechanism the parser shows (bare it is taken whole as a title, beside a suffix the peel leaves it as the name word); three rows labelled parity get the change that moved them from 1.4.0 (suffix-routing, #296, #491). - test_parser.py: the grid's parse count is 480. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- decisions/N3: जी.सी. is listed nowhere; it reads as a suffix because its chunk जी is a hi/mr honorific that period_joined_vocab takes as a suffix chunk (removing that honorific leaves it family). - rules/N3: the Nepal Accepted bullet covers a suffix read whole or by a period-joined chunk. - rules/O5: M4 keeps a bound given name and an initial; a given name written short (Chas. née Jones) is flipped like any other. - cases.py: 'Smitty' Pope Jr. moved from 1.4.0 with #489's title-peel floor, as its sibling Dr Jr is labelled; #491 added only the report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
derek73
added a commit
that referenced
this pull request
Nov 6, 2026
* rules/M4: name the bound-given carve-out for what it reads M4's Except said "a word the vocabulary has claimed as a given name keeps that reading", but the guard reads only the vocab:bound-given and initial tags. Words with a plain `given` reading, which arrived after #445 (#752's phase 2i, #789), are flipped: `Chas. née Jones` -> family 'Chas.'. The words now say a bound given name, with that name as a boundary example; the two code comments quoting or paraphrasing the old words follow, and decisions/M4 records it. No reading moves. Found by the third review round of #815 (PR #1107). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * rules/M4: state the flip of a plain given reading as a cost Following the design-docs review of the narrowing: M4's Except gives its reason as not overruling what a word already IS, so the flip of a word the vocabulary reads only as possibly a given name is now an Accepted bullet (Chas. née Jones, Van née Jones -> family) with its ground, the marker naming the surname, as a title does under H1. The Except drops "which is nobody's family name", false under both family-first orders. decisions/M4's entry corrects its history: the flip dates from #445's own commit (ambiguous particles), not from 2026-10-26, and records widening the carve-out as declined. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Address the fix-commit review of rules/M4's narrowing - decisions/M4: name every PR that added given readings, #883 among them (the conversion that gave van its reading); the declined widening now carries its measurement (one corpus name moves, the entry's own example), and the H1 analogy is stated as support only, since H1 also flips an initial (Dr. J. -> family 'J.'). - rules/M4: the Accepted bullet rests on the marker alone, without the H1 analogy. - mechanisms.md#TWO-LAYER-ASSIGN: a claim is a word's role; a given reading is a lean the field rules read past. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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 #815
N3 (the lone-word nickname rule) now sets a suffix aside, as H1 (a title and one name word) and M4 (a maiden marker makes the lone name word the family) already do. A nickname, one name word and a suffix read the word as the family name and no longer report
given-or-family:This is option A from the issue, chosen with the Nepal cost below accepted.
How
N3's early count in
_assign_main(one piece in the segment) is unchanged. The suffixed shape is decided at O5'sgiven-or-familysite, after the trailing peel has set the suffix aside and after O5's own clauses (no title, maiden name or script order; the word not an initial, bound given name or particle) have said nothing else decided it. A nickname there takes the family and the report goes. The scan is gated onstate.extracted, so a name with no delimited clause pays no frame:Madonna,Smith Jr.and the reference name keep master's call counts, and the moved names get cheaper ('Smitty' Jones Jr.233 → 217).Reach, each pinned by a case row:
Jones Jr., 'Smitty'→ family. The early count reads the nickname this way too.Jones (PhD) Jr.→ family. The clause still carries the nickname role at assign, and the bareJones (PhD)already read family.'Smitty' Chas. Jr.) and a period-shaped word ('Smitty' Xyz. Jr.) → family.'Smitty' Jones ING→ family, because S4 reads it as the suffix.Not reached, by design:
V, S10), the gated wordsfils,JuniorandKC(S11), and a Title case acronym (Ing, S4).'Smitty' Pope Jr.keeps H4'stitle-or-name(new N3 Precedence bullet).'Smitty', Jones Jr.and, 'Smitty' Jones Jr.stay given.'Smitty' J. Jr.stays given (N3's Except), while bare'Smitty' J.reads family. That inconsistency predates this PR and is recorded in Accepted rather than widened.Under the family-first orders the field was the family already; only the report goes.
Measured moves (2026-11-05, comparator: master 90a9a86)
test_snapshot.py)'Smitty' Jones Jr.cldr_agreement.py, every view--base)--base)* Names that parse with a nickname, a suffix, no middle name and exactly one of given and family.
The Nepal three each have a surname the suffix vocabulary also lists (
Od,D.C,जी.सी.) beside a clan name in brackets that was read as a nickname:Rewati Od (Mahar),Sumnime D.C(Oli),गोपाल जी.सी.(घर्ती क्षेत्री). The given name went from given with a report to family with none.The
snapshot.jsonldiff holds the one move plus new rule-example and shape-inventory entries.Docs (same-PR amendment)
rules_budget.jsonre-recorded; N3 grew.'Smitty' Jones Jr.read family 'Jones', as'Smitty' Jonesdoes? (N3 counts a suffix; H1 and M4 set it aside) #815 entry, with the counts, the populations and the comparator.Dr. Smith née Jonesreports no family name — a maiden name suppresses the title-plus-one-word rule #410 head marked. The heads of decisions/O5's parse("Andrew") reports no ambiguity, but given-or-family is a guess #449 and decisions/M4's parse("Smith née Jones") reports no family name — a maiden clause empties a one-word name, where 1.4.0 kept it #445 entries are marked superseded in part.Tests and negative controls
test_parser.pysuffix grid: 440 rows (5 nickname spellings × 4 word spellings × 11 suffixes × the default and FAMILY_FIRST orders). FAMILY_FIRST_GIVEN_LAST reads every row as FAMILY_FIRST does, by roles, tags and reports. It comparesas_dict()whole and takes 0.05s.uv run pytest,-n0 -m serial(the frame band holds),mypy,ruff, and Python 3.15 in its own environment all pass.Reviews
Round 1, on fc83ff2:
state.extracted, which removes the frames it found on lone words with no nickname.Ph. D., a quoted nickname after the word, the comma reach, the period shape and the given abbreviation.Dr. Smith née Jonesreports no family name — a maiden name suppresses the title-plus-one-word rule #410 head; the population for each zero; the uncited Except legs.as_dict()whole; remove the tautological control test; state the N3 handoff once; collapse the count history.'Smitty' Jones.Round 2, on the fix commits 430e59d and 50b1736:
parity:'Smitty' J. Jr.→ fix(suffix-routing),'Smitty' Jones, Jr.→ fix(Should parse("Smith, Jr.") put "Jr." in title rather than suffix? #296),'Smitty' Pope Jr.→ feat(An input composed entirely of titles should report an ambiguity — "The Right Hon. the President of the Queen's Bench Division" #491).Xyz.mechanism (case note and decisions entry), the grid parse count (480) and the missing empty-head row.Round 3, on the round-2 fix commit 1991581:
जी.सी.is listed nowhere. It reads as a suffix through its chunkजी, a hi/mr honorific thatperiod_joined_vocabtakes as a suffix chunk; removing that honorific leaves it family. Corrected in decisions/N3 and in the Accepted bullet.Chas. née Jones→ family.'Smitty' Pope Jr.relabelledfix(#489), the title-peel floor that moved it; An input composed entirely of titles should report an ambiguity — "The Right Hon. the President of the Queen's Bench Division" #491 added only the report.🤖 Generated with Claude Code