Skip to content

Should a Portuguese family of three or more surnames be read whole? (Ana Souza Lima Rocha gives middle Souza, family Lima Rocha under locales.PT_BR) #1482

Closed

Description

@derek73

Under two_family_names a family is two name words. A name written with three or more surnames keeps the last two, and the first goes to the middle names (parser_for(locales.PT_BR) as PR #1481 builds it):

Ana Souza Lima                → family 'Souza Lima'
Ana Souza Lima Rocha          → middle 'Souza', family 'Lima Rocha'      (family box: 'Souza Lima Rocha')

The name is invented, of the shape read. rules/O6 (two family names) takes one word; nothing reads a third.

How often (PR #1481, 2026-11-19, config_diff.py score, at most 3,000 records a group, each record's own boxes): a family box of three surnames or more, read as two, under locales.PT_BR:

Group Records Three or more, read as two
ORCID Brazil 2,850 268 (9.4%)
ORCID Portugal 2,923 117 (4.0%)
PatentsView Portugal 3,000 378 (12.6%)
PatentsView Brazil 3,000 78

It is the largest shape left wrong in ORCID's Brazilian and Portuguese records once the switch is on, and the switch broke none of them: they read wrongly with it off too. Spanish-speaking countries were not counted for this shape.

Why it is not a small change. A third surname and a second given name stand in the same place, and the given-name list is the only thing that tells them apart. A reading that takes every word behind the listed given names into the family is a different rule from O6's "one word more", and nothing has measured it: Policy.middle_as_family (the first word, then the rest) reads Brazil at 66.3% against the switch's 72.6% on the same boxes (#1452's comment), so the plain form of it is worse.

To measure before proposing a rule

  1. Under a Portuguese pack, the family taken as every name word after the last listed given name: fixed and broken per group above, and on Angola and Mozambique.
  2. The same with a bound on the family's length (three words, four).
  3. What stands in the way: a given name the list lacks (mateus, tadeu), a surname that is also a given name, particles (da, dos), agnomens (Filho, Neto).
  4. The populations filed the other way, one surname in the family box (PatentsView Brazil, 75.7% under the default and 60.2% under the switch), which a longer family costs more.
  5. The views: surname1 and surname2 name two units, and a family of three has no second-surname reading today (Should García Márquez, Juan fill surname1 and surname2 under two_family_names, as Juan García Márquez does? #1456 leaves a three-word head whole).

Open

  • Is this a reading under the Portuguese packs only, or wherever two_family_names is on? Spanish names of three surnames are rarer; not counted.
  • A new Policy value, or the existing switch reading further where a pack's list allows it?

Related: #1453 (the packs), #1452 (the suggester, which found middle_as_family reads three one-given-name countries nearly as well), #1456 and #1479 (the views).

Activity

  1. self-assigned this
    on Nov 19, 2026
  2. added
    locale-packs
    name-order
    on Nov 19, 2026
  3. derek73 commented on Nov 19, 2026

    @derek73
    OwnerAuthor

    Measured 2026-11-19: what Brazil needs is two things together, and people's own split sets a ceiling near 90%.

    ORCID's boxes, 3,000 Brazilian and 3,000 Portuguese records with both boxes filled, none used to build the Portuguese list. A simulation on name units (a particle with its word, an agnomen with the word before it), scoring only where the boundary between the given names and the family falls, not a parse; its figure for today's pack is within about a point of the parser's (79.8% and 89.6% by config_diff.py score on master d12af9d6).

    Where holders put the boundary, Brazil (share of the names with that many units):

    Units in the name Family of 1 2 3 4 or more
    3 (1,269) 30% 70%
    4 (692) 13% 57% 31%
    5 (109) 17% 9% 50% 23%

    Rules, boundary right:

    Rule Brazil Portugal
    the last unit (the default) 46.8% 70.3%
    two, unless the second-to-last is a listed given name (the pack) 78.7% 87.7%
    a third only in a name of five units or more 80.0% 89.5%
    every unit after the listed given names 82.3% 88.7%
    the same, at most three 82.3% 88.5%
    the pack's two, each word classed by its given share 81.1% 89.6%
    every unit after the given names, each word classed by its given share 86.0% 92.1%

    "Classed by its given share": a word counts as a given name where more than half its uses in the other records (16,013 Brazilian, 16,465 Portuguese) are in the given box, for any word used three times or more; the shipped list falls back for the rest. The shipped list keeps a word used five times with 70% in the given box.

    • The bounded variant does little. What limits the pack is the second given names its list lacks, more than the length of the family.
    • Each change alone gains about 3 points in Brazil; both together about 7.
    • The ceiling. Where every word is plainly a surname (a given share under 20%), holders still differ: of 564 three-unit names ending in two such words, 60 file only the last in the family box; of 90 four-unit names ending in three, 15 file fewer than three. So 10 to 17% choose a shorter family, which no rule recovers.

    Also measured the same day, with the real parser (parser_for(locales.PT_BR), the family taken as every word after the first and the listed given names behind it, scored by local_agreement.agrees): Brazil 79.8% to 82.1% (234 fixed, 164 broken), Portugal 89.6% to 88.6%, Cape Verde 80.5% to 77.6%, Angola 65.3% to 56.7%, Mozambique 67.1% to 60.2%.

    Next: a measurement in the parser, before anything is built to ship. A larger Portuguese word table and a whole-family reading under the Portuguese packs, scored on ORCID, UK companies' filers and US patents' inventors, the last of which file one surname and lose more the longer the family read.

  4. derek73 commented on Nov 19, 2026

    @derek73
    OwnerAuthor

    Measured in the parser, 2026-11-19; decided the same day: not in 3.2, left open.

    A scratch change to rules/O6's take on master 25423c53, nothing committed: after the take, the family keeps taking middle units leftward while each passes the tests the taken word passes (one name word, not a listed given name, not an initial). Scored with config_diff.py score on records the list was not built from (ORCID and PSC 3,000 a group, PatentsView whole), every box agreeing:

    Group PT_BR today whole family, shipped list (721) whole family, 3 uses × 0.6 (1,176)
    ORCID Brazil 79.8% 83.9% 84.6%
    ORCID Portugal 89.7% 91.5% 91.7%
    ORCID Cape Verde 80.5% 79.8% 80.5%
    ORCID Angola 65.3% 61.7% 63.0%
    ORCID Mozambique 67.2% 66.2% 68.5%
    PSC Brazilian 62.9% 66.1% 66.8%
    PSC Portuguese 62.8% 64.7% 65.4%
    PatentsView Brazil 60.2% 60.0% 60.6%
    PatentsView Portugal 66.1% 70.7% 71.1%
    • The whole-family reading is the lever, about 4 points in Brazil. A larger list alone gains 0.1 to 0.6 under today's rule (the simulation above said 2.4; not reconciled), for 455 more words to read by hand. Bounding the family at three units costs a few tenths.
    • The ceiling holds: 83 of 663 Brazilian holders whose words are all plainly surnames file fewer of them in the family box (12.5%); Portugal 10.8%; PSC's Brazilian filers 35.5%; PatentsView Brazil 65.4%.
    • On names with no boxes it is about even. tse-donors, 848,351 names as written: 10,436 move, every one from the middle names into the family. By the word taken, 54.3% take only surname words, 27.0% a word ORCID never holds and 18.7% a word mostly given in ORCID. Of 25 drawn moves read by hand, about 12 take a second given name the list lacks, about 9 a surname, 4 unclear.

    Why not now: it gains where holders filled in boxes and is about even on names as written, which is what a caller's list of Brazilian names is, and it would add a policy value. Brazil stays near 80% under locales.PT_BR for 3.2.

    What would reopen it: a way to know rare second given names, since those are what the longer family takes wrongly. #1189 (compound given names behind a particle) removes one class of them and is taken separately.

  5. derek73 commented on Nov 21, 2026

    @derek73
    OwnerAuthor

    Measured 2026-11-19 on a scratch prototype over master 25423c53, nothing committed. Declined, for now.

    The prototype kept taking middle names into the family after rules/O6's take, leftward. Each one had to pass the tests the taken word passes, and the first that failed stopped it. Readings were scored under locales.PT_BR's policy, against:

    • ORCID: the first 3,000 records of each country, which the list is not built from;
    • PSC: the first 3,000 records of each nationality;
    • PatentsView: every record.
    Group PT_BR today every unit, shipped list every unit, looser list
    ORCID Brazil 79.8% 83.9% 84.6%
    ORCID Portugal 89.7% 91.5% 91.7%
    ORCID Angola 65.3% 61.7% 63.0%
    ORCID Mozambique 67.2% 66.2% 68.5%
    PSC Brazilian 62.9% 66.1% 66.8%
    PatentsView Brazil 60.2% 60.0% 60.6%
    PatentsView Portugal 66.1% 70.7% 71.1%
    • Names as written cost about as much as they gain. Brazilian donors' names in spoken order (tse-donors, one name in 10) moved 12.3%. In a hand-read sample of 25 moves:
      • about 12 took a second given name the list does not know into the family (invented shape: ANA ZZELIANE LIMA DE SOUSA → family ZZELIANE LIMA DE SOUSA);
      • about 9 took a surname, which is right;
      • 4 were unclear.
    • Marian names are hit too. Given names behind a particle (MARIA DE FATIMA) are taken as well.
    • It would reopen with a way to tell a rare second given name from a surname, such as a census of Brazil's or Portugal's given names.

    The full tables, the cuts of the list and the recipe are in decisions/O6's 2026-11-19 #1482 entry (PR #1509).

  6. added this to the 3.2 milestone on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

locale-packsname-orderquestion

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions