Skip to content

Report the conventions: given-or-family (#449) and title-or-name (#491) - #518

Merged
derek73 merged 5 commits into
masterfrom
claude/449-report-conventions
Sep 8, 2026
Merged

Report the conventions: given-or-family (#449) and title-or-name (#491)#518
derek73 merged 5 commits into
masterfrom
claude/449-report-conventions

Conversation

@derek73

@derek73 derek73 commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Two new AmbiguityKind members, no parse change: where the parser fixed a reading by convention rather than evidence, it now says so on ambiguities. Both are minor-release additions by the enum's own contract, the way SEGMENTATION arrived in 2.1.0.

given-or-family (#449). A name of one name word that nothing else decided is read by rules.md#O5's convention — given under the default order, family under a declared family-first one — and now reports it, with detail naming the field the convention chose. Emitted at the one site in assign that places the word. Measured population: 27 corpus names (12 contract, 15 radar) — plain words (Andrew, Smith), conjunction joins read as one unit (Duke of Edinburgh), a lone word beside a suffix (Smith Jr., Donald mc), glued-honorific peels leaving a Latin word the script cannot order (Andersonさん), three names where a script rule declined (マイケル), and سلمان،. Silent where something decided the field: a title before or after the comma (Dr. Smith, John V, Dr.), a family comma that names a family (Smith, Andrew), a maiden marker, a nickname alone (N3), bound-given, particle and initial-shape claims (abdul, de, J.), and every name a script rule ordered (W4); a nickname or a suffix standing beside the lone word decides nothing, and the word reports ('Smitty' Jones Jr., Smith Jr.) — the guard tests whether a script_orders entry RESOLVED the order, not whether it agreed with the declaration, so 毛泽东 is silent under FAMILY_FIRST too.

title-or-name (#491, new rule H4). An input the title peel eats down to one last title-vocabulary word reads that word as the name by convention and reports it: Lord Chancellor → family Chancellor, the Queen's Bench string → family Division, Dr. King (deliberate: king is title vocabulary). One emitter at the assign site, order-independent; a lone title (Dr., Sir, Prince of Wales) reports nothing. Per Derek's refinement, a lone JOINED unit that carries title vocabulary reports this kind rather than given-or-family (John of Prince, Smith and King — the collision set inside a join, pinned), and that doubt is not silenced by a maiden marker or a claimed word, which decide the field rather than whether the word is a title (Lord Chancellor née Jones). Two corpus names take that reach: Attorney General of Minnesota and Deputy Secretary of State, a peeled title in front of a joined unit standing last. The all-suffix twin reports the existing suffix-or-name (Rinpoche, QC MP); Jr. alone is a title by H2 and stays silent.

Measurement. Zero role diffs against master across all corpus names under all three orders. Ambiguity-only diffs at 2.0.0/2.1.0/2.2.0 (_ambiguities cannot enter a diff below 2.0): gate 368 / 298 / 212 / 74 intentional, 0 unexplained, 0 radar unclassified; nine ledger rules (six for #449 — one 22-name alternation plus five literal CJK-bearing rules the honorific guard forces — and three for #491), byte-identical across the three ledgers except the two glued-honorific rules at 2.0.0, where #308's diff co-occurs. Four drafted guard clauses were mutation-checked: two inert and dropped, two dropped deliberately because a suffix or nickname beside the lone word decides nothing (nine and one names), all recorded in decisions.md#O5.

Out of scope, by choice. #348 (a title that is also a given name) — Derek has further ideas; title-or-name is scoped away from that collision.

Closes #449
Closes #491

🤖 Generated with Claude Code

@derek73 derek73 self-assigned this Sep 8, 2026
@derek73 derek73 added this to the v2.3 milestone Sep 8, 2026
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.68%. Comparing base (be1c32b) to head (495a9bd).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #518      +/-   ##
==========================================
+ Coverage   98.67%   98.68%   +0.01%     
==========================================
  Files          45       45              
  Lines        3234     3262      +28     
==========================================
+ Hits         3191     3219      +28     
  Misses         43       43              

☔ 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 September 8, 2026 02:23
…ntion picked the field

rules.md#O5 fixes a reading it does not determine: at one name word
the positional rule has nothing to compare, so the library picks one
of two equally consistent readings and picks it the same way every
time. Until now it picked silently. It now reports `given-or-family`,
with `detail` naming the field the convention chose -- the field
follows the read order, which is why the kind cannot name it, the
PARTICLE_OR_GIVEN precedent.

The report is as narrow as the convention, which the naive condition
is not: the one-name-piece branch in assign runs for 141 of the 1119
corpus names, because a title peel, a nickname, a maiden clause, a
trailing credential or a script order can each leave one piece
standing. Guarded on O5's own carve-out list plus two the rule states
without naming -- a script whose convention settles the order (W4),
and a piece with no letter or digit in it (A2) -- the population is 27
corpus names. `abdul` reports nothing, bound-given vocabulary having
claimed it; `de` reports nothing, a lone particle's reading being
P4's.

W4 silences the report by AUTHORSHIP, not by agreement. Comparing the
order used against the order declared would have called `毛泽东` and
`高橋一郎` undecided under `Policy(name_order=FAMILY_FIRST)`, where
the Han entry and the declaration happen to agree -- 26 of the 31
W4-decided CJK corpus names, measured. `_effective_order` now returns
an `Order` saying whether a `script_orders` entry RESOLVED the order,
and the emitter reads that instead; all 31 stay silent under both
policies, while `マイケル`, `王·Smith` and `田中、太郎` -- three
different script rules DECLINING -- still report.

A suffix beside the lone word decides nothing, so it does not silence
the report either: `"Smith Jr."` and O5's own `"'Smitty' Jones Jr."`
are S2's peel taking the suffix and the convention placing the one
name word left. Nine of the 27 are that shape. The bare-suffix
carve-out is the opposite case and stays out, the count being read off
the peel rather than off the name pieces: reporting `PhD` and `QC MP`
is H4's, and arrives with it.

No parse changes: every role of every corpus name is identical before
and after, measured against the parent tree, and the three 2.x
ledgers classify the 27 on `_ambiguities` alone -- except at 2.0.0,
where the two glued-honorific names carry #308's peel in the same
diff and their two rules must admit it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…el leaves one title word as the name

Handed a string the title peel eats down to one last word that is
itself title vocabulary, the parser reads that word as the name --
'Lord Chancellor' gives family 'Chancellor', and the Queen's Bench
string family 'Division'. The reading stands: this is a name parser,
not a title parser, and a title with no name at all is worse output.
What was wrong is that the guess was silent, which is what #491 asked
for.

ONE site reports it: the assignment that places the lone name word,
which is where that reading is actually chosen. Reporting at H1's
retag instead was measured wrong -- H1 only moves the word between
fields, and under `Policy(name_order=FAMILY_FIRST)` (or
FAMILY_FIRST_GIVEN_LAST) assign places it in the family directly and
the retag never runs, so an all-titles input was silent under a
declared family-first order while giving byte-identical roles. At the
assignment the report is order-independent, and all three orders are
now measured to report 'Lord Chancellor', 'Dr. King', 'His Holiness
the Dalai Lama', the Queen's Bench string, 'The Rt Hon', 'Mr. Mrs.'
and 'Xyz. King', and to stay silent on 'Dr. Smith', 'Dr. Prof.
Smith', 'Sir', 'Dr.', 'King', 'King Charles', 'Coach' and 'Prince of
Wales'. The detail names no FIELD for the same reason: H1 would leave
one named at emit time stale, and the fork the kind reports is
title-versus-name, which no field answers.

Six corpus names carry it, three contract-tier and three radar, and
'Dr. King' is one of them: `king` is title vocabulary for the addressing forms, so the
peel leaves one title word and the rule claims it. A LONE title word
reports nothing -- the peel takes 'Dr.' and 'Prince of Wales' whole
and leaves no word to be read as a name -- and so do 'Dr. King MD'
and 'Dr King Jr', where the peel also leaves nothing and the
post-nominal becomes the name through the bare-suffix carve-out,
which is scoped to a run no title preceded. The title-vs-given-name
collision on a word like 'Baron' is a question about the vocabulary,
left to #348. One case row moves off the corpus: 'Dr. King, Jr.'
reports now, a suffix beside the word not being a shape that silences
the convention, and its row records that.

The new rules.md#H4 states both halves. The suffix half is the
existing SUFFIX_OR_NAME at assign's bare-suffix carve-out: 'Rinpoche'
and 'QC MP' read a post-nominal as the name because nothing else was
left to be one. 'Jr.' alone is not one of them -- H2's
opening-abbreviation shape reads it as a title before the vocabulary
is asked -- and the emitter is scoped away from a lone CJK honorific
('さん', '씨', '선생님'), the same shape read through the glued-honorific
rules and the script's own order, whose report is left to the arc that
revisits those readings rather than settled here. A maiden name beside
the credential says the input is not post-nominal vocabulary and
nothing else, so 'abd née Jones' is out for M4's reason.

The same site's O5 branch gains the third emitter, promised with
reports title-or-name rather than given-or-family, the fork there
being whether the title word inside the unit is a title at all.
'John of Prince' and 'Smith and Prince' are the measured inputs that
reach it -- `prince` is in TITLES -- and no corpus name does, a join
led by a title word being a title run ('Prince of Wales', silent like
a lone 'Dr.'). The test is the `vocab:title` TAG rather than a
lexicon lookup, which is what the module header promises: assign
reads the lexicon only through what classify tagged.

No parse changes: every role of every corpus name, under every order
the corpora declare, is identical to the parent tree's (1123 names,
measured), and the eight names that move do so on `_ambiguities`
alone at all three 2.x baselines. The gate is 368 / 296 / 210 / 72
intentional diffs at 1.4.0 / 2.0.0 / 2.1.0 / 2.2.0, unexplained 0 at
each.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…corded

decisions.md gains two sections. #O5 records what #449's measurement
actually settled -- the population, not the principle: the naive
one-name-piece condition reaches 143 of 1123 corpus names, and O5's
own population is 27, 12 contract and 15 radar. It names the two
guard conditions the rule had not stated (a script order decides,
which needed _effective_order to return an Order carrying by_script,
and a piece with no letter or digit is no name word), the four
conditions dropped as inert with why each was inert, the five
CJK-bearing names that report because a script rule DECLINED or a
glued honorific left a Latin stem, and the deliberate gap between the
rule's scope and the report's. #H4 records #491: the reading the
v1-xfail triage accepted as convention is unchanged, and the silence
it called the real defect is what ends. Six corpus names, one emitter
at assign's lone-name-word site rather than at H1's retag so the
report is order-independent, Dr. King in scope on purpose, a lone
title word demoting nothing and reporting nothing, the joined-title
refinement, the suffix half's two guard exclusions, and the
MA-versus-PhD asymmetry noted rather than fixed.

Three existing passages are repointed: the 2026-09-07 #471 keystone
note now says two thirds of the ambiguity bundle shipped and #348 was
left out by choice; the v1-xfail-triage entry's Queen's Bench bullet
points at H4; the 2026-08-27 #445 entry's promised re-measurement is
taken. No `Open:` pointer is removed -- neither issue ever had one.

rules.md#O5 and #H4 gain their history: pointers now the anchors
exist. concepts.rst gains one sentence; release_log.rst two Additions
bullets.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Four review agents on the whole PR. Code: a title after a family
comma decided the lone word's field and the convention still reported
-- "John V, Dr." named given where H1 then wrote family -- so the
comma path's title now silences it; H4's join half is hoisted beside
its lone-word half, out from under O5's field-deciding clauses, so a
maiden marker or a claimed word no longer silences a title-or-name
doubt; Order becomes EffectiveOrder. Two corpus names move, both
reached by that hoist -- "Attorney General of Minnesota" and "Deputy
Secretary of State", a title peeled in front of a joined unit that
stands last, so H3 cannot chain it -- and they take a third #491
ledger rule. No role moves anywhere.

Docs: the decider list in GIVEN_OR_FAMILY's docstring, the assign
comment and the O5 entry no longer claim a nickname or a bare comma
silences the report (the PR's own examples report on both); the
segments-clause reason is stated as inert over the corpus, not by
construction; TITLE_OR_NAME's docstring says which shape names a
field. Tests: the three detail strings are pinned across all three
orders; the initial-shape silencer, the family-comma title path, the
hoisted join reach and the script_orders positive controls gain rows;
the feat(#491) probes wall an anchor drop.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@derek73
derek73 force-pushed the claude/449-report-conventions branch from 7fdbe82 to ed06654 Compare September 8, 2026 09:24
… branch

Cleanup after review, behavior identical -- every corpus name reads
the same roles and reports the same kinds, details and tokens under
all three orders (measured against the previous tree). The
bare-suffix flag is the peel count; the two field-deciding emitters
share one predicate instead of repeating its clauses; the two
title-vocabulary branches are one branch choosing its detail on the
unit's length; head and token are computed once; _WORD_ALREADY_CLAIMED
derives from M4's _NEVER_FLIPPED, now in a shared home, so the pair
cannot drift; the test order list is shared; the emitter comments are
the rule quotes plus what is true only of this code.
The hoist is KEPT: segment 1 is assigned before segment 0's positional
read, so a title standing after the family comma carries a Role.TITLE
by the time the emitters run, and a token-role scan replaces both the
`titled` keyword and the `n == 0` clause beside it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@derek73
derek73 merged commit a0b93f0 into master Sep 8, 2026
11 checks passed
@derek73
derek73 deleted the claude/449-report-conventions branch September 8, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant