Repository navigation
Join an elided particle or Arabic article written after the given name to the family (#700) - #711
Merged
Merged
Conversation
Library catalogs file "Paul d'Ivoi" as "Ivoi, Paul d'" and
"Ḥusnī az-Zaʿīm" as "Zaʿīm, Ḥusnī az-": the particle written apart,
behind the given name, with its mark still on it. Neither form was
particle vocabulary, so both read as a middle name. P6 asks only the
particle tag, so the fix is vocabulary alone:
- d', l', dell' and their U+2019 spellings, plus de’ beside de'
- al-, ul-, the article assimilated to each sun letter (ASCII and DMG
spellings) and the Egyptian el- forms, as a closed list
All never-given: written apart, the word is the article and nothing
else. The family renders with a space as every particle joins
("d' Ivoi"); glued forms ("d'Ivoi") are unchanged.
39 corpus names move, every one the same shape (38 GND, 1
conventions); the GND and conventions agreement records gain the
progress and are re-recorded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
capitalized() split "d'" and "az-" at the mark and asked the particle test of the stem, so "IVOI, PAUL D'" repaired to "Paul D' Ivoi". The whole token is asked first now. Measured over every corpus name in three cases against 00dd275: 29 names move, each only lowercasing a token ending in ' or -. From the design-docs review: add esh-, eth-, edh- (the a- series' ASCII digraphs had no e- twins); P6's sentence names the listed spellings and the never-given kind instead of "never a given name"; the "Ivoi, d'" boundary leaves P6, whose statement implies given d' (the case row keeps it); recompute recipe for the attested spellings; R4 examples for the repair; AGENTS.md records the render-path check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Second review of de6c045: the early return sent every whole-token particle down _cap_word's remaining clauses where the particle arm declined, moving "smith, john, ed-" (ED- -> Ed-) and a configured "van-der" (Van-Der -> Van-der). The arm's test is now one shared predicate, _lowers_as_particle, and the early return takes only its lowercase; every decline goes to the per-word walk as before. The shipped 't is reached too: "van 't Hoff" repairs to 'van 't Hoff' where 1.4.0 through 2.4.2 wrote 'van 'T Hoff'. R4's reading; recorded with an R4 example, a release bullet and the decisions entry, whose render measurement is re-taken against 00dd275 and names its corpus. 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 #711 +/- ##
=======================================
Coverage 99.03% 99.03%
=======================================
Files 46 46
Lines 4552 4557 +5
=======================================
+ Hits 4508 4513 +5
Misses 44 44 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- test_render: pin that a marked particle lowercases only where the particle arm would. The all-particle part, the declared given slot, the suffix ed- and a configured van-der keep the walk's reading. Measured: the first broad early return fails it, where it had passed the whole suite. - particles.py: add ’t beside 't, and assert at import that every elided entry has its ASCII and its U+2019 spelling. - cases.py: "Ivoi, d'" was labelled parity by default, but 1.4.0 through 2.4.2 read given d'. Relabel it fix(#700). Add rows for the empty head, a particle-surname head, a glued comma, and ’t. - Prose: AGENTS.md no longer says initials() is invisible to the snapshot. Corrected the d' comment, the sun-letter count (lām's form is al- itself) and the ASCII-only el- series. The decisions entry now explains why the boundary left P6. The release bullet carries one before/after example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) _cap_text's whole-token check ran for every token, costing every capitalized() two frames per token ('john smith' forced: 48 -> 52). A wholly alphabetic token is one word to the walk, which asks _cap_word the same arm, so the check is gated on `not text.isalpha()`; the simplifier's sweep over 147,070 role x tag x spelling combinations found no output difference. 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 #700.
Library catalogs file
Paul d'IvoiasIvoi, Paul d'andḤusnī az-ZaʿīmasZaʿīm, Ḥusnī az-. That is, the particle is written apart, behind the given name, with its mark still on it. Neither written form was particle vocabulary, so 1.4.0 through 2.4.2 all read it as a middle name. Since rules.md#P6 asks only the particle tag, the parse fix is vocabulary alone.Ivoi, Paul d'd', familyIvoid' IvoiRashid, Harun al-al-al- RashidZaʿīm, Ḥusnī az-az-az- ZaʿīmPaul d' Ivoid'd' IvoiIVOI, PAUL D'.capitalized()Paul D' IvoiPaul d' Ivoijacobus henricus van 't hoff.capitalized()van 'T Hoffvan 't HoffDecisions (yours, from the session's options)
d',l',dell', each also with U+2019, andde’added besidede', because nothing folds the typographic apostrophe.al-,ul-, the article assimilated to each sun letter in both ASCII and DMG spellings, and the Egyptianel-series. All are never-given, while the bareal(Al Gore) stays ambiguous.d' Ivoi). Glued forms liked'Ivoiare unchanged.What review changed
esh-,eth-,edh-added. The design-docs review found that theel-series lacked the ASCII digraphs thea-series had. They weren't in the first approved list; you kept them after review, since the trailing hyphen keeps them clear of any name word._render.py).capitalized()split a token at its mark and tested the stem, which gaveD' Ivoi. The whole token is now asked the particle arm's question first. That arm is now one shared predicate,_lowers_as_particle, and the early return takes only its lowercase. The second review caught a first version that also moveded-and configured hyphenated particles.'treached as a side effect. The case-repair fix also reaches the shipped Dutch't. It now lowercases invan 't Hoff, which is R4's reading. This is a change from every release, so it has its own release bullet.Ivoi, d'boundary example came out of P6 because the rule's statement implies otherwise. The case row still pins it.Measured
b4a004c3, 39 corpus names move (38 GND, 1 conventions). Each one has a trailingd'or article that leaves the middle name and joins the family, and no ambiguity kinds change. To recompute:uv run python tools/differential/snapshot.py --since b4a004c3. The GND and conventions agreement records gain that progress.00dd2759, 28 corpus names move. Each move only lowercases a token ending in'or-. A particle × position × order grid adds'T → 't.Docs
capitalizedexamples.PR review round (code, tests, comments, simplifier)
test_a_marked_particle_lowercases_only_where_the_particle_arm_wouldcovers the all-particle part, the declared given slot, the suffixed-and a configuredvan-der. The first broad early return had passed the whole suite; I measured that it fails this test.’tadded beside't.particles.pynow asserts at import that every elided entry has both apostrophe spellings.Ivoi, d'relabelledfix(#700). It had been labelledparityby default, but 1.4.0 through 2.4.2 read givend'. The same move happens to any new entry standing alone after a comma (Smith, al-→ familySmith al-), asJong, dehas read since 2.0. That shape is garbage input, so it has no release bullet.’t.not text.isalpha(), because it had cost every token two frames undercapitalized().initials()invisible to the snapshot.The full suite, ruff, mypy, and the Sphinx doctests all pass, and the suite ran without
namedivider, the way CI runs it.🤖 Generated with Claude Code