Repository navigation
Read the Maghrebi, Amazigh and Hebrew family-name particles; add locales.AR and locales.HE (#1257) - #1373
Merged
Conversation
A given reading alone compiles into nothing: the default's sets and every corpus reading are unchanged (snapshot byte-identical). It is the reading a particle written default = false needs on its word (#1257). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1248) ar.toml and he.toml each carry ben as a clan particle written default = false, with its case mask: the default's sets and every corpus reading are unchanged (snapshot byte-identical), and a choice of ar or he reads Karim Ben Salah with family 'Ben Salah'. ar.toml's patronymic exclusion keeps refusing that kind, its reason now pointing at the clan reading. he.toml records the Israeli given name Ben too, so a strict Hebrew choice keeps Ben Affleck a given name; a strict Arabic one does not, added to the reviewed table of words strict ungates (#1257). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1248) Each turns on ben's clan reading (Karim Ben Salah gives family 'Ben Salah'); AR's choice also drops en's credential ABD for abd's bound given name, which its docstring states with the example. Registered, with rotators, a contents and pickling test, and the CLDR locale view's ar and he files, where neither pack moves a rendering (20/24 and 18/24). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1249) A new ber.toml holds the Amazigh clan particles ait, aït and nait; ar.toml holds ould, a patronymic (Mauritanian names still form the father's name with it, so it fills the patronymic view) and ouled, a clan particle. Each is never a given name and carries its case mask, so Youssef Ait Taleb gives family 'Ait Taleb' and Ahmed Ould Salem family 'Ould Salem', patronymic 'Ould Salem'. config_diff's country table lists ber under Morocco and Algeria; familiar.py's line order for ben (#1257). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…as Arabic particles (#1209, #1210, #1211) בן gains a given reading and becomes a clan particle, as Latin ben is: opening a name it is the given name and reports the fork (בן כספית), inside one it starts the family name, which no longer fills the patronymic view, every Knesset family name written with it being a family name. אבו takes abu's readings and אל al's, so the Knesset's Abu and al- family names read whole (סמי אבו שחאדה). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…costs (#1257) decisions/vocabulary-collisions records the three-part rule with each word's measurement and recompute; rules/P1 and R9 gain the costs as examples; docs/languages.rst and docs/locales.rst describe locales.AR and locales.HE, migrate.rst the readings moved from 1.4, and the release log the four changes. Case rows, a capitalization, patronymic-view and matching test for each word, and the rules corpus and snapshot gain the three new examples; no existing corpus name moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) suggest_measure.py against master 161ebd2 moves five cells, none of the order table's: orcid-famcaps decides capitals_as_family at 2 names in 77.0% of groups (77.3%), and reads 89.2% of its families right without the switch (88.9%); the user-facing claims stand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ar.toml writes el as al is read, an article that may be a given name, with its case mask; the article reading is default = false beside a given reading on by default, so the default leaves El to position and locales.AR reads Sara El Haddou with family 'El Haddou'. Whether it is read by default instead is held for review; that is this one line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hrebi-hebrew-particles # Conflicts: # nameparser/vocab/en.toml # nameparser/vocab/he.toml
Decided for #1257 as an exception to its rule 2, on the measured trade: the gains in Morocco, Egypt and Lebanon outweigh Algeria's cost, where compound given names hold the article (Nour El Houda Haddou gives family 'El Houda Haddou'), recorded under rules/P2's Accepted and in decisions/vocabulary-collisions beside the al comparison. El opening a name stays the given name, reported. The committed snapshot moves three names built on Zein El Dine; the suggester's order table is unmoved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…osts (#1257) The review's findings, records and docs only: no reading moves, the snapshot gaining the four new rule examples alone. - decisions/vocabulary-collisions: every figure re-taken at head with el, each recipe written in full with its comparator first; the expression rebuilding master checked against 161ebd2 and 73718fd; the kind criterion stated so it gives one answer for ould, ben and בן; rule 2's reach and its place beside C-i; the costs Accepted. - rules/P1: בן under a family-first order; rules/P2: a bound given name before El; rules/R9: the kind criterion. - The packs' docstrings and docs: register-style chains, strict=True, and choosing ber and en, with a doctest. - decisions/group-suggestion names all five moved cells; decisions/name-matching records match_diff's moves; stale lines in the vocab README, he.toml, vocabulary-exclusions and the notes fixed. - Private names from cache-only corpora replaced with made-up ones; follow-ups point at #1378. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Decided 2026-11-12: under a family-first order a family name written with בן first and no comma gives בן alone to the family, reported, a cost of its given reading. rules/P1 and decisions/vocabulary-collisions say it is accepted; docs/languages.rst and the release log tell a family-first caller to write the comma. No reading moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…imits (#1257) The second review's findings, docs and records only; the snapshot and the rules corpus are byte-identical to 7ec9945. - The kind test is stated once, in rule 3, its Standing line, the entry head and rules/R9, scoped to words a change adds or reopens; by it ould reads clan (family boxes DZ 29, MA 8, FR 9 against MR 20), and it is a patronymic by a choice decided for the Mauritanian use. - The release log's Abd El Kader Haddou claim corrected against the wheels (2.2.0 through 3.0.1 gave given 'Abd El'; 1.4.0 through 2.1.0 given 'Abd'); the strict limit scoped to locales.AR; eight rule examples, not four; ait's 349 to 16 at head, the sixteenth read. - rules/P1 gains the FAMILY_FIRST_GIVEN_LAST row; he.py and docs/locales.rst gain the register-chain limit; the gate, the בת and בר notes, Ouled's countries and #1378's comment named. 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.
Implements the decision on #1257 (its decision comment, 2026-11-12): where a particle reading ships turns on its script, its bearers and the mid-name test, and its kind on what the phrase it opens is in the names its reading serves.
What changes
ait,aït,naitclan, never given,casedber.tomlYoussef Ait Haddou→ familyAit Haddou(was middleAit)ouldpatronymic, never given,casedar.tomlAhmed Ould Haddou→ family and patronymicOuld Haddououledclan, never given,casedar.tomlKarim Ouled Haddou→ familyOuled Haddouelarticle+given(asal),casedar.tomlSara El Haddou→ familyEl Haddou;El Mehdi Haddou→ givenEl, reportedben(Latin)clan,cased+ agivenreading on (en.toml, he.toml)ar.toml,he.tomllocales.AR/locales.HEKarim Ben Haddadunchanged; AR → familyBen Haddad;Ben Haddad→ given, reportedבןclan(waspatronymic, never given) +givenhe.tomlבן כהן→ givenבן, reported (1.4.0's reading; 2.0–3.0.1 gave familyבן כהן);יעל בן חיים→ familyבן חיים, patronymic now emptyאבוabu: given, teknonymic, bound givenhe.tomlסאמי אבו חליל→ familyאבו חלילאלal: given, articlehe.tomlנאדר אל חלבי→ familyאל חלבי;אל כהן→ given, reportedבתclanis the kind the decision's rule 3 asks for. The README defines it as "a lineage prefix, where the word after it is a family name shared by the lineage rather than a parent's name", and no view reads it. Latinbenand Hebrewבןtake it alike. One test decides the kind: a reading ispatronymicwhere, among the bearers measured, the phrase it opens names the bearer's own father more often than it is a family name passed down unchanged, andclanotherwise. It binds words a change adds or reopens;bar,bin,binti,ibn,بنandבתare not re-judged. By itbenandבןareclan(ORCID's Tunisian family boxes 993, the Knesset'sבן15 of 15, against the 148 register chains #1248 counted). The test readsouldasclantoo (family boxes DZ 29, MA 8, FR 9 against MR 20); it ispatronymicby a choice decided on 2026-11-12 for the Mauritanian use, with the Algerian and Moroccan family names filling the view as its accepted cost. R9, the patronymic view, and decisions/vocabulary-collisions state it.locales.ARandlocales.HEare each a choice of their one language and nothing else. Each is registered, with rotators, a contents and pickling test, and CLDR'sarandhefiles in the locale view (20/24 and 18/24, unchanged by either pack). Three costs of the packs, each stated in the docstring and the docs:ardrops en's credential ABD for ar's bound given nameabd(Jane Smith, ABD→ givenABD).Karim ben Ali ben Salah Haddad→ familyben Salah Haddad).parser_for(locales.AR, strict=True)reads a leadingBenas the family, and drops ber.toml'sait/naitunlessberis chosen too;locales.HEkeepsBengiven understrict=True.Each Latin word carries a
casedmask. Family boxes write them with a capital (Ben1,294 toben1,El2,849 to 13,Ait203 to 1,Ould36 to 0), and without a mask case repair lowered them as particles (Karim ben Salah).el: on by default, a decided exception to rule 2elfails rule 2 (Algerian compound given names) and is read by default anyway, on the measured trade decided after the gate. Rule 2 stands. Fixed/broken at this PR's head, the word removed as the comparator (config_diff.py score "expr:Parser(lexicon=Lexicon.default().remove('el', kind='article'))" default), againstal's article measured the same way; each group is capped at 20,000 records unless marked:elalAlgeria's breaks are the article inside a compound given name (
Nour El Houda Haddou→ familyEl Houda Haddou), and a bound given name before it is the same shape (Abd El Kader Haddou→ givenAbd, familyEl Kader Haddou, where 2.2.0 through 3.0.1 read givenAbd El, middleKader, and 1.4.0 through 2.1.0 givenAbd, middleEl Kader). Both are Accepted under rules/P2 (particles join forward) and in decisions/vocabulary-collisions. #1378 asks for the vocabulary that lifts them.Canaries, run against master:
El GrecoandEl Mehdi Haddoukeep givenEl, reported.Haddou, Sara El→ familyEl Haddou.Sara El-Haddou,Juan de el Valle,Juan del ValleandMaria do Carmo Souzado not move.Maria El Salvador→ familyEl Salvador.Sara el Haddou→ familyel Haddou.What moved
Measured at this PR's head against master's readings, rebuilt in the tree as an
expr:lexicon. Its compiled sets equal those of master161ebd28and of the merge base73718fd9(36 sets compared). The shared tools cache was only read;match_diff.pywrote its kept base to a cache folder of its own.git diff 73718fd9 HEAD -- tools/differential/corpus_rules.jsonl). Three names built onZein El Dinemoved withel(familyDine→El Dine; neither is the whole name, so unclear), and no other. Thebengiven reading and the off-by-default particle were each byte-identical in their own commits.config_diff.py diff): JRC-Names 3,483 of 1,315,051 spellings and opensanctions-parliaments 16 of 24,192, nearly all the particle joining the family. Beforeel(commit 08629c8 and earlier) the figures were 287 and 15.config_diff.py score; ORCID and PatentsView by country, PSC by nationality, each group capped at 20,000 records; ORCID's extract holds at most 20,000 a country), fixed/broken:locales.AR/locales.HE(head)Benin the given box)Agreement in every box, ORCID Tunisia: 87.6% by default, 96.1% under either pack. Uncapped,
benread as a particle breaks 148 PSC British, French and Tunisian filers against 120 it fixes (--cap 5000000), British middle names Ben, which is why it is off by default.match_diff.py --base <73718fd9>): 49 pairs move under each of the 21 settings, every one holdingel. 22 become consistent: spellings of one person writingElandal, or the article with and without its hyphen. One becomes inconsistent only in the setting that removesparticles-aside. No consistent pair shares no key. Recorded in decisions/name-matching.suggest_measure.py --base): five cells moved. Four are in the capitals table (orcid-famcaps decidingcapitals_as_familyat 2 names 77.3% → 77.0% on either base; families read right without the switch 88.9% → 90.0%; orcid-givcaps' families 4,256 → 4,260). One is in the order table: orcid-givcaps' given-first anti-goal row at 3 names, 8.3% → 8.7%. All are listed in decisions/group-suggestion; the user-facing claims stand.Ben Affleck,Van Johnson,Al Gore,Park In Hwan,Nguyen To Nga,John V. Smith.Accepted
Recorded in rules/P1 (the lone particle fold), rules/P2 (particles join forward), rules/R9 (the patronymic view) and decisions/vocabulary-collisions:
aitorouldopens it (Ait Haddou Karim), the fold's existing cost.בןfirst and no comma, under a family-first order, givesבןalone to the family (בן חיים יעל→ familyבן), where master readבן חיים. Should Hebrewבןopening a name be the given name Ben? (בן כספיתgives family 'בן כספית' and no given name) #1209 counted 8 Knesset family names written so; a comma keeps them whole. Accepted (decided 2026-11-12) as a cost of the given reading.ouldfills the patronymic view in an Algerian fixed family name (Karim Ould Haddou).בןfor the father leaves the patronymic view empty, as a Tunisian register's chain does withben.בןreads givenבן(Should Hebrewבןopening a name be the given name Ben? (בן כספיתgives family 'בן כספית' and no given name) #1209).אלinside a given name, andElinside an Algerian compound given name or after a bound given name, give the article and the rest to the family.benas never given (withcheikhin the reviewed table of words strict ungates; strict Hebrew keeps it given through he.toml's own given reading).Not changed: moved to #1378
abd,abdul,abuand Hebrewעבדwith rules/P12's (bound phrases)completed_byfor the names after the article.el/alas rules/P10 (a given name a particle completes) words.ايت/ولد, which ShouldAit,NaitandOuldbe family-name particles? (Youssef Ait Talebgives middle 'Ait', family 'Taleb') #1249 asked about.Also left out:
N'Ait, which ShouldAit,NaitandOuldbe family-name particles? (Youssef Ait Talebgives middle 'Ait', family 'Taleb') #1249 lists. It reads as one word: givenN'Aitopening a name, middleN'Aitinside one.בתand the excludedבר, unchanged.Parser.revisenever fills the patronymic view,binincluded; this PR leaves that as it is.Checks and reviews
uv run pytest,-n0 -m serial,mypy,ruff check,sphinx-build -b doctestand-b html,python -m doctest README.rstandbuild.py --check.namedivider, plus the locale, CLDR, Wikidata-native and snapshot tests with thejaextra.capitals_as_family,initials(),capitalized()both ways,Parser.reviseandParser.matching().checkboth sides;Abd El Kader Haddouclaim wrong for 1.4.0 through 2.1.0 (fixed).#1210's parent issue is #1253 (decisions/family-without-an-inherited-name), which deferred it to #1257.
Closes #1209
Closes #1210
Closes #1211 (the Hebrew
עבדwithcompleted_byis in #1378)Closes #1240
Closes #1248
Closes #1249 (
N'Aitand the Arabic-scriptايت/ولدare in #1378 or left out above)Closes #1257
🤖 Generated with Claude Code