Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/design/decisions/O6-two-family-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- `locales.ES` turns the switch on, carrying the Spanish given-name list beside it, one pack for Spain and Latin America alike, Argentina included; `locales.PT` leaves it off until a Portuguese given-name list exists, decided in chat — 2026-10-30 #753, phase 3g.
- `locales.CS` and `locales.SK` turn the switch on with no given-name list, a net gain in every real population measured (CLDR's fictional renderings lose), two given names the recorded cost; `locales.SL` and `locales.HR` leave it off, decided in chat — 2026-10-30 #753, phase 3f amended.
- Both family names stay in `family` through 2.x; a second-surname field is the RFC's Phase 4 output model (docs/design/vocabulary-model-rfc.md, "The rules a pack can choose"), and a pack may later switch this rule on — 2026-10-24 #754; landed as the `surname2` view, `family` keeping both, 2026-10-29 #754, sub-phase 4d.
- The family's words are counted as P1's fold counts them, a connective join and a hyphen counting as their words, so a family already holding two keeps what it has; the word taken must count as one by the same count and be no initial written alone — 2026-10-24 #754.
- The family's words are counted as P1's fold counts them, a connective join and a hyphen counting as their words, so a family already holding two keeps what it has; the word taken must count as one, a hyphenated word counting as one there unless it writes given names (each part a listed given name or an initial), and be no initial written alone — 2026-10-24 #754; 2026-11-03 #959 (Derek).
- A name its script (W4) reads in an order other than the declared `name_order` is left alone; where the two agree it is read like any other — 2026-10-24 #754.
- Under a family-first order the first two name words are the family, the remainder laid out as the positions after a family — 2026-10-24 #754.
- Under a family-first order a particle chain after the family is cut where P1's family-first fold cuts its own run, its particles and the one name word they attach to taken, so `Pérez de la Vega Juan` reads family 'Pérez de la Vega', given 'Juan'; without the switch, or under the default order, the chain stays whole — 2026-11-03 #1024.
Expand All @@ -17,7 +17,7 @@
- The veto stays a clause of this rule though it reads a second signal, the taken word looked up in a list, and the rule is a split candidate — 2026-10-30 #959, decided.
- The Spanish list, which `locales.ES` carries as its lexicon fragment since sub-phase 3g (a caller may pass a list of its own), is generated, not per-word vocabulary: INE's 2025 census tables, pooled over every name borne in Spain, cut at a measured rank (1,000 words, 90% given use) by `tools/es_given_names.py`; a change to it is a cutoff change — 2026-10-30 #959.

Open: hyphenated surnames block the switch (`Andrés Sánchez-Cid Torres` keeps `Sánchez-Cid` a middle name), of the 466 Spanish records the issue's held-out per-country list still read wrong, 271 are this shape (measured on the issue, 2026-10-30) — #959. No rule example shows both switches on over a given name a particle completes (`María del Carmen de la Vega`, given `María del Carmen` under O7 alone and family `del Carmen de la Vega` with O6 on too) — #959. Why the Spanish list does less in Latin America, and whether a list per region or another selection rule would serve it better than the one list `locales.ES` carries (the 2026-10-30 #959 entry's Latin America bullet; the 2026-10-30 #753 phase 3g entry measures the pack against the default there) — #959. A name written with ñ dropped (`Begona`, `Inigo`) matches no entry, the key keeping the tilde; whether to fold ñ for data that strips it — #959.
Open: why the Spanish list does less in Latin America, and whether a list per region or another selection rule would serve it better than the one list `locales.ES` carries (the 2026-10-30 #959 entry's Latin America bullet; the 2026-10-30 #753 phase 3g entry measures the pack against the default there) — #959. A name written with ñ dropped (`Begona`, `Inigo`) matches no entry, the key keeping the tilde; whether to fold ñ for data that strips it — #959.

## Log

Expand Down Expand Up @@ -165,3 +165,5 @@ Open: hyphenated surnames block the switch (`Andrés Sánchez-Cid Torres` keeps

Every broken record, in all three, has two or more words in the given box, read as a given name and a family name: no population-wide Czech or Slovak given-name list is published to veto the word, the register's frequencies having been withdrawn after 2016's; ČSÚ's top 100 newborn given names a year (CC BY 4.0) is a list, and the open lead. The circular ceiling such a list could reach, and the sources looked for, are in the vocabulary-model entry.
- 2026-11-03 #1024 — UNDER A FAMILY-FIRST ORDER, A PARTICLE CHAIN AFTER THE FAMILY IS CUT WHERE P1'S FAMILY-FIRST FOLD CUTS ITS RUN. rules/O6's Except said a particle chain (P2) is never split, so under FAMILY_FIRST `Pérez de la Vega Juan` reached O6 as one unit, `de la Vega Juan`, which counts two name words, and O6 declined: family 'Pérez', given 'de la Vega Juan', under both family-first orders, the switch on or off. The caller has declared two things the chain contradicts, an order putting the given name after the family (decisions/P1's 2026-08-17 #395 entry reads a declared family-first order as evidence of where the surname ends) and a family of two names; and a chain running on through `Juan` makes the given name part of the surname P2 says a particle is written as part of, which is `Vega`. So where the first unit after the family begins with a particle and runs past the one name word its particles attach to, O6 cuts it as `_fold_reach` cuts P1's run, takes the particles and that word as the second family name, and lays out what is left by the order: `Pérez de la Vega Juan Carlos` gives given 'Juan', middle 'Carlos' under FAMILY_FIRST and middle 'Juan', given 'Carlos' under FAMILY_FIRST_GIVEN_LAST, as `García Márquez Juan Carlos` reads. The rule's own example `Juan de la Vega Rodríguez` (family 'Juan' under FAMILY_FIRST, where it illustrated the decline) is this shape, and now reads family 'Juan de la Vega', given 'Rodríguez'; the decline's example is `Pérez de la Vega`, where taking the chain would leave no given name. Unchanged: the switch off (whether the chain's reach should follow a family-first order by itself, which would move `Nguyen Van Thanh Long`, is #1024's open question 1, not decided here), the default order, a family comma, and a chain whose first unit is a conjunction join (`Pérez de la Vega y Santos Juan`, the unit `de la Vega y Santos` counting two words, so O6 still declines). With the switch on, a Vietnamese name with `Van` after the family now gives up a word to the family as any name of three or more words does under the switch (`Nguyen Van Thanh Long` → family 'Nguyen Van Thanh', given 'Long'), the switch declaring two family names. No ambiguity is reported, as for every reading of the switch. A lone particle a family-first order left as the family takes the cut chain after it as it takes any word (rules/O6's Accepted), so `Van der Merwe Jan` reads family 'Van der Merwe', surname2 'der Merwe', where it read family 'Van', given 'der Merwe Jan': the family field right, one surname read as two (the review; corpus examples `van den Berg Cornelia …`). Under the default order nothing is cut, held by test_cases' `two_family_names_cuts_no_chain_under_the_default_order`, whose recorded negative control without the order guard reads `du Ménil Thi Mai` family 'Thi Mai'; 29 corpus names move under that mutant. Measured 2026-11-03 by the issue's recipe on the cached `orcid-researchers` corpus (ES, MX, CO, PE, CL, VE, AR, at most 20,000 records a country with both boxes, 135,735 records): of the 1,577 whose family box holds a particle after its first word, the family box is read right under `Policy(name_order=FAMILY_FIRST, two_family_names=True)` in 2 on 39839b91 and in 1,273 on the branch, and of the 1,296 in the issue's exact shape (one word, a particle run, one word) in 1 and 1,272; by country, of the 1,577, ES 264/383, MX 164/221, CO 59/63, PE 152/199, CL 113/142, VE 406/433, AR 115/136. Recompute: the issue's recipe, run against each tree with `nameparser.__file__` asserted; the comparator is the base tree, so 2 and 1 are the same parser's reading before the change.
- 2026-11-03 #959 (Derek) — A HYPHENATED WORD COUNTS AS ONE WHEN IT IS THE WORD TAKEN, UNLESS EVERY PART OF IT IS A LISTED GIVEN NAME OR AN INITIAL. SUPERSEDES, in part, the 2026-10-24 #754 entry's count of the word taken, in which a hyphen joined two words without making them one, so `Andrés Sánchez-Cid Torres` kept `Sánchez-Cid` a middle name (the #754 review's reading of `Ana María-José López`, middle 'María-José', which the first draft had read as family 'María-José López'). The issue found this shape behind 271 of the 466 Spanish records the given-name veto still read wrong. Measured 2026-11-03 on the cached `orcid-researchers` corpus, ES, MX, CO, PE, CL, VE and AR at most 20,000 records a country with both boxes (135,735 records), over the 10,794 distinct records holding a hyphen in either box, rendered given first and read right where both the family and the given names match the boxes (`local_agreement.fold`), under `parser_for(locales.ES)`, on 39839b91 against prototypes of three readings: a hyphen counting as one everywhere O6 counts (family and word taken) reads 10,038 right against 10,281, fixing 277 and breaking 520, most of them a family box of two surnames written with a hyphen (`Garcia-Gomez`), which then counts as one and takes a given name; a hyphen counting as one in the word taken alone reads 10,464, fixing 186 (ES 125, MX 24, CL 20, PE 6, CO 5, VE 5, AR 1) and breaking 3 (`Aristide Tanyi-Jong Akem`, `Hilda Ines-Romero Menacho`, `Benjamin Moraga-Arias .`); and the same with a veto on a hyphenated word every part of which is a listed given name, which moves none of these records. Decided: the word-taken count with the veto, the veto keeping the rule's own `Ana María-José López` where the Spanish list is loaded (middle 'María-José'), while without a list the switch takes it (family 'María-José López'), its usual cost (rules/O6's Accepted). Found building it and in its review, and folded into the veto, which reads each part: a part that is an initial counts as a listed given name does, so hyphenated initials (`Ana M.-J. López`) stay as an initial written alone stays, and `M.-José` stays under the list, which moves no ORCID record. A hyphenated bound given-name pair (`Ana Abdul-Rahman López`, middle 'Abdul-Rahman' in 2.8.0) is taken like any hyphenated word, family 'Abdul-Rahman López', where the pair written as two words (P5) stays: a veto on a hyphenated word whose first part is a bound given name was built and backed out the same day, since in this population it cost 2 records whose hyphenated word is a surname (`Paola Valentina Abdul-Hadi Pru`, `Giorgia Anette Abd-El-Kader Espinoza`) and kept none, the hyphen being how those surnames are written; rules/O6's Accepted records the cost. A hyphen in the family still counts its words, so `Javier Olmedo Pérez-Montaut` keeps `Olmedo` a middle name: reading `Pérez-Montaut` as one surname is the 520 above. The built change reads the same 10,464 and moves the same 186 and 3, and with the switch alone (`Policy(two_family_names=True)`, no list) 10,292 to 10,475, the same records. Recompute: for each record of `local_agreement.records(local_corpora.load("orcid-researchers"))` in those countries, both boxes non-empty, at most 20,000 a country, keep those with a hyphen (`_post_rules._HYPHENS`) in either box, distinct by given box, family box and country (two records are duplicates), parse `f"{given} {family}"` with each tree's parser, `nameparser.__file__` asserted, and compare.
- 2026-11-03 #959 — BOTH SWITCHES OVER A GIVEN NAME A PARTICLE COMPLETES GET AN EXAMPLE. The 2026-10-30 entry's Open named the shape no rule example showed: `María del Carmen de la Vega` reads family 'del Carmen de la Vega' with both switches on, O6 taking the chain before O7 can complete the given name with it, and given 'María del Carmen' under O7 alone. rules/O7's precedence bullet against two-family-name handling now says so and carries both rows; no behavior moves.
12 changes: 9 additions & 3 deletions docs/design/rules/O6-two-family-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
"Juan de la Vega Rodríguez" family-first+two_family_names → family="Juan de la Vega"
"Pérez de la Vega Juan" family-first → given="de la Vega Juan" · boundary
```
- **A name word is counted as P1's fold counts one**, so a particle run counts with the word it attaches to: "de la Vega" is one word and takes the word before it.
- **A name word is counted as P1's fold counts one**, so a particle run counts with the word it attaches to: "de la Vega" is one word and takes the word before it. A hyphenated word counts as one when it is the word taken, where a hyphen in the family counts its words (Except).
```
"Juan Pérez de la Vega" two_family_names → family="Pérez de la Vega"
"Andrés Sánchez-Cid Torres" two_family_names → family="Sánchez-Cid Torres"
"Torres Sánchez-Cid Andrés" family-first+two_family_names → family="Torres Sánchez-Cid"
```
- **The family keeps the two as units**, the one written second being the second-surname view (R10) and the one written first the first-surname views (R11), whichever of the two the rule took.
```
Expand Down Expand Up @@ -68,13 +70,15 @@
```
", Ana García López" two_family_names → family=""
```
- **What is taken must be one name word a family name could be**: a part counting as two words (a hyphenated given name, a bound given-name pair, P5) stays where it is, and so do an initial written alone, which writes a given name, and a mark or number with no letter in it. A particle chain (P2) is split only where the family-first bullet cuts it and otherwise moves whole, and where taking it would leave no given name the rule declines. A listed given name stays where it is too, under either order, and a list written without accents matches the word written with them: the caller's vocabulary names it a word only a given name is, so the name holds one family name. A listed word behind a particle is a surname unit, taken as before.
- **What is taken must be one name word a family name could be**: a bound given-name pair (P5) written as two words stays where it is, and so do an initial written alone, which writes a given name, and a mark or number with no letter in it. A particle chain (P2) is split only where the family-first bullet cuts it and otherwise moves whole, and where taking it would leave no given name the rule declines. A listed given name stays where it is too, under either order, and so does a hyphenated word every part of which is one or an initial, and a list written without accents matches the word written with them: the caller's vocabulary names it a word only a given name is, so the name holds one family name. A listed word behind a particle is a surname unit, taken as before.
```
"José Luis Pérez" two_family_names+es_given_names → family="Pérez"
"Jose Luis Perez" two_family_names+es_given_names → middle="Luis"
"Pérez José Luis" family-first+two_family_names+es_given_names → family="Pérez"
"Pérez Luis José" family-first-given-last+two_family_names+es_given_names → family="Pérez"
"Ana María-José López" two_family_names → family="López"
"Ana María-José López" two_family_names+es_given_names → family="López"
"Ana M.-J. López" two_family_names → family="López"
"Ana M.-José López" two_family_names+es_given_names → family="López"
"Ana abdul Rahman López" two_family_names → family="López"
"Ana M. García" two_family_names → family="García"
"Ana María García - López" two_family_names → family="López"
Expand Down Expand Up @@ -109,6 +113,8 @@
- A name with one family name behind two given names loses its second given name to the family, which is the shape the switch cannot tell from the one it is for: most Argentine and English names of three words or more read wrong under it, and so do Portuguese and Brazilian names whose writer gave the last family name alone as the family. That is why it is off by default and a caller turns it on only for data written this way.
```
"Juan Carlos Pérez" two_family_names → family="Carlos Pérez"
"Ana María-José López" two_family_names → family="María-José López"
"Ana Abdul-Rahman López" two_family_names → family="Abdul-Rahman López"
```
- A patronymic is a name word like any other here, a patronymic rule on or off, so where no rotation fired it can join the family.
```
Expand Down
4 changes: 3 additions & 1 deletion docs/design/rules/O7-two-given-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,16 @@

**Precedence:**

- **Against two-family-name handling** ("Gabriel García Márquez" with both switches on): that rule reads first, since the caller who turns both on says the family holds two names, and this rule takes from the middles it leaves. A name of three words then keeps one given name, and a name of four whose third word that rule takes reads two and two. A listed given name that rule leaves where it is (O6) is a middle, which this rule takes where it stands beside the given name, so a name of three words whose middle is listed reads two given names and one family name.
- **Against two-family-name handling** ("Gabriel García Márquez" with both switches on): that rule reads first, since the caller who turns both on says the family holds two names, and this rule takes from the middles it leaves. A name of three words then keeps one given name, and a name of four whose third word that rule takes reads two and two. A listed given name that rule leaves where it is (O6) is a middle, which this rule takes where it stands beside the given name, so a name of three words whose middle is listed reads two given names and one family name. A given name a particle completes is a particle chain that rule takes into the family first, so it is the family's with both on, where this rule alone reads it as the given name.
```
"Gabriel García Márquez" two_family_names+two_given_names → given="Gabriel"
"José Luis Pérez" two_family_names+two_given_names+es_given_names → given="José Luis"
"José Luis Pérez" two_family_names+two_given_names+es_given_names → family="Pérez"
"Ana María Luis Pérez" two_family_names+two_given_names+es_given_names → middle="Luis"
"María José García López" two_family_names+two_given_names → given="María José"
"María José García López" two_family_names+two_given_names → family="García López"
"María del Carmen de la Vega" two_family_names+two_given_names → family="del Carmen de la Vega"
"María del Carmen de la Vega" two_given_names → given="María del Carmen"
```
- **Against compound-family handling** ("Hassan Mohamad Ali" with both switches on): this rule reads first, as a bound given-name pair (P5) joins before the fold, and O3 then folds whatever middles are left.
```
Expand Down
Loading
Loading