Add the Irish particles Ó, Ní, Ua and the Malay binti/binte - #607
Merged
Merged
Conversation
ó and ní join the never-given particles; ua, binti and binte the
ambiguous half (decisions.md#vocabulary-collisions), so the particle
opens the surname behind it where every release read it as a middle
name ("Liam Ó Murchú" -> family "Ó Murchú").
New rule P7: a one-letter word written with an ASCII period is an
initial, never a particle, so "Juan Ó. Pérez" keeps middle "Ó.".
One helper, _lexicon._spells_an_initial, asked after the membership
hit at every site that reads the particle vocabulary directly
(classify, _vocab.surname_unit_tags, _render._cap_word, the facade's
_is_particle). Guarded by a two-input invariant (Ó. reads as Q.) with
a per-site negative control.
Case repair: a capitalization_exceptions mask now outranks the
particle lowercase (rules.md#R4), and ó/ní/ua ship masks, so
"SEÁN Ó MURCHÚ" repairs to "Seán Ó Murchú". Deliberate for caller
maps too: a 'van' -> 'Van' entry now wins where 1.4.0-2.3.0 kept
"van" (release log says so; the gate cannot see capitalized()).
Ledger rule fix(#604) in all five ledgers; gate exits 0 at every
baseline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- decisions.md#P7: the connective period line is stated in R4's hyphen clause, so 'stated in no rule' was self-contradictory - decisions.md#P7: the segment null's recipe patched a call that no longer exists; say how it was measured and how to re-check it - decisions.md#R4 and capitalization.py: the dotted reach is n.í. as well as u.a. 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 #607 +/- ##
=======================================
Coverage 98.98% 98.98%
=======================================
Files 45 45
Lines 4238 4241 +3
=======================================
+ Hits 4195 4198 +3
Misses 43 43 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- the P7 invariant's 'Q.' side is walked once per lexicon and shared, and the site control no longer re-walks the default-lexicon baseline the invariant already holds: about 7.1s -> 3.3s for the five tests - the no-mask lexicon drops every particle mask, derived rather than listed - the caller-mask test merges with Lexicon | rather than a hand-built tuple - the surname-unit agreement sweep (test_classify) now holds the period-written one-letter particle, with a negative control: it was blind to the _vocab veto, held only by the P7 grid 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 #604.
What changes
óandníjoin the never-given particles;ua,bintiandbintejoin the ambiguous half.HumanName("Liam Ó Murchú")gives lastÓ Murchú, where 1.4.0 through 2.3.0 gave middleÓ.Sinéad Ní Mhurchú,Seán Ua BuachallaandIna binti Navalamarmove the same way.Ó Murchúalone is all surname; every release gave firstÓ.Ua Buachallakeeps givenUaand reportsparticle-or-given.uais ambiguous because the search for given-name use was thin, and C-i defaults to ambiguous under uncertainty. The marking differs from never-given in three places, all recorded: the opening, after a family comma, and P6's trailing report.Juan Ó. Pérezkeeps middleÓ., as doJ. Ó. PérezandPérez, Juan Ó..Juan Ó Pérezgives lastÓ Pérez(the accepted cost)._lexicon._spells_an_initial, is asked after the membership hit at every site that reads the particle vocabulary directly: classify,_vocab.surname_unit_tags,_render._cap_wordand the facade's_is_particle. Segment's credential-run walk is not a site: an initial ends that walk before the question comes up, so a veto there was measured to change nothing.capitalization_exceptionsmask now outranks the particle lowercase, andó/ní/uaship masks.SEÁN Ó MURCHÚrepairs toSeán Ó Murchú. Without the masks it would regress toSeán ó Murchú.'van': 'Van'in the map,ludwig van beethovenrepairs toLudwig Van Beethoven, where 1.4.0 through 2.3.0 keptvan. The differential gate cannot seecapitalized(), so the release log says this explicitly.bintirepairs to lowercase, where 2.3.0 gaveBinti.Accepted, recorded in decisions.md#P7
A caller-configured one-character particle in Han, Hangul or kana, written with a period, is vetoed even though
is_initialsays those scripts have no initials. Doing this properly needs_policy's script table, which_lexicon,_renderand the facade may not import. No shipped particle is affected.Guards
tests/v2/test_properties.py: a name holdingÓ.reads exactly as the same name holdingQ., in the parse fields, reports,initials(),capitalized()and the facade's views. The grid is 537 texts. The invariant and its per-site control (next item) together take about 3.3s, theQ.side being walked once per lexicon._P7_SITE_EFFECTrecords, per site, how many grid texts break with that site's veto removed.test_surname_unit_tags_agree_with_classify's sweep now holds the period-written one-letter particle, with a negative control for the_vocabveto.tests/v2/cases.pyfor the P7 contrast and the leadingUa.tests/v2/test_render.py: the shipped particle masks with adecontrol, and a caller particle mask.Docs
nic, bareo,bt/bte), and an R4 entry.Verification
fix(#604)ledger rule covers the three movers. The radar entries are identical to master's./simplifypass tightened the tests in a third commit (shared grid walk,Lexicon |merge, the agreement-sweep gap above). Its one skipped suggestion: swapping the P7 views for the broader_signaturehelper, which would make the comparison stricter rather than tidier.🤖 Generated with Claude Code