Repository navigation
Description
Parser.suggest decides four settings from a list: name_order, patronymic_rules, initials_as_family and capitals_as_family. It has no evidence on two_family_names (rules/O6, two family names), so a caller with a list of Spanish, Portuguese or Croatian names has to know the switch exists. decisions/group-suggestion never weighed it.
What a caller gets today. Measured 2026-11-18 on master c878443, over ORCID holders' own given and family boxes (orcid-researchers, up to 3,000 records a country, records with an empty box left out). Each country's names went to Parser().suggest(), and were scored under the suggested parser with local_agreement.read:
- 140 of 143 countries get no suggestion.
- Three get one, none of them this switch: Benin (
capitals_as_family, 90.9% to 93.8%), Nepal (initials_as_family, 94.1% to 94.2%), Togo (capitals_as_family, 94.5% to 94.1%).
What the switch is worth, and what it costs. config_diff.py score default --switches two_family_names --cap 3000, all boxes agreeing:
| Country | off | on | fixed | broken |
|---|---|---|---|---|
| Peru | 14.6% | 97.2% | 2,439 | 47 |
| Colombia | 26.0% | 95.2% | 2,135 | 126 |
| Mexico | 34.9% | 95.0% | 1,861 | 95 |
| Spain | 49.9% | 94.5% | 1,415 | 105 |
| Croatia | 88.6% | 98.7% | 329 | 32 |
| Slovenia | 90.6% | 97.6% | 272 | 67 |
| DR Congo | 56.3% | 84.3% | 1,180 | 367 |
| Iran | 84.2% | 91.8% | 433 | 208 |
| Brazil | 50.3% | 74.2% | 1,046 | 366 |
| Portugal | 72.1% | 83.0% | 644 | 324 |
| Cameroon | 55.8% | 70.1% | 1,166 | 759 |
| Bangladesh | 90.8% | 47.6% | 90 | 1,100 |
| Kenya | 93.6% | 69.5% | 152 | 796 |
| Ghana | 90.9% | 65.8% | 226 | 937 |
| Angola | 76.4% | 57.0% | 469 | 1,023 |
| Pakistan | 92.9% | 75.7% | 142 | 542 |
| Vietnam | 69.5% | 52.6% | 558 | 1,036 |
| Turkey | 92.0% | 78.8% | 219 | 596 |
So it cannot be suggested broadly. A wrong suggestion costs 17 to 43 points.
The names it breaks. Nearly all are one shape: a given box of two words and a family box of one, where the switch takes the second given name as a first surname (Spain 98 of 106 broken, Peru 45 of 49, Croatia 31 of 32; same records, the breaks counted against the default).
-
Where the switch is right for the list, the taken words are ordinary second given names (Spain:
Teresa,Angel,José,Luis,Carlos,Isabel). The given-name veto the Spanish packs carry removes most of them, at a small cost in fixes:Country bare switch, fixed / broken locales.ESlocales.ES_ARPeru 2,439 / 47 2,413 / 20 2,366 / 12 Colombia 2,135 / 126 2,123 / 34 2,108 / 20 Mexico 1,861 / 95 1,848 / 32 1,821 / 18 Spain 1,415 / 105 1,403 / 42 1,378 / 29 Portugal 644 / 324 632 / 162 608 / 96 Brazil 1,046 / 366 1,016 / 235 979 / 167 -
Where the switch is wrong for the list, the same shape is the convention itself: a second given name (Ghana's day names
Kofi,Kwame,Kwaku,Yaw; Kenya'sOtieno,Wambui) or a name that is given and family both (Bangladesh'sIslam,Rahman,Hasan,Kumar). No list of given names repairs that; the suggestion has to stay off.
A signal a list carries. A double surname leaves no mark on one name. Across a list it does: the same word ends some names and stands second-to-last in others. One crude form, tried on the same records: the share of names whose second-to-last word ends at least two other names of the list, and ends names more than twice as often as it opens them.
- Over 128 countries of 2,000 records or more, it correlates 0.84 with the switch's gain, and 0.95 with the share of family boxes holding two words or more.
- At 22% and above it flags 19 countries, all Spanish- or Portuguese-speaking, and all gain (Brazil +24 points, Peru +83).
- Bangladesh reads 20% and loses 43 points:
Md,KumarandRahmanstand in both places. Pakistan reads 13.5%, Vietnam 13.0%, Ghana 10.9%. - It misses DR Congo, Iran, Cameroon, Croatia and Slovenia, which gain 5 points or more and read under 10%.
This is one afternoon's heuristic, counted on names composed given-first from the boxes, at one group size. It shows that a list carries evidence, not what the rule should be.
Questions.
- Should
suggestdecidetwo_family_namesat all, or should the docs carry a per-country recommendation and leave the switch to the caller? - If it decides: what is the evidence? The repeated-surname share above is evidence of the whole list, where every other setting tallies one vote a name. Does
SettingEvidencetake a list-level figure, or does each name vote by whether its second-to-last word ends other names? - What keeps Bangladesh out? Candidates: a wider margin, the given-name table (
COMMON_GIVEN_NAMES) refusing a word that is also a given name, or the family-share figurestools/vocab/order_names.pyalready computes. - The breaks above say the bare switch is the weaker suggestion. Does
suggestcarry a given-name veto of its own (itsCOMMON_GIVEN_NAMEStable, which is noLexiconlist), name a pack, or suggest the bare switch and report the names it expects to break? - How small a group can decide it? The signal needs repeats, so it is weak on 2 to 20 names, where
suggest's other settings must still hold the 95% same-order bar. - Under a family-first base the surnames open the name. Does the signal mirror, and does
suggestdecide the order first?
Measuring it. tools/differential/suggest_measure.py draws groups of known order; it has no population of known surname span. ORCID's boxes give one, by country. A change here would need that population added, at the default sizes and the long ones, with Bangladesh, Ghana, Kenya and Vietnam as the rows that must not move.
The wider aim. suggest exists so that a caller need not know a setting exists, so each setting a list can give evidence on is a candidate. This issue is the first past the four; two_given_names has the same gap and wants its own measurement. Iran, DR Congo and Cameroon, whose pairs the signal above does not see, are not answered here.
Activity
derek73 commentedon Nov 18, 2026
The candidate settings, decided 2026-11-18:
two_family_names,two_given_namesandmiddle_as_family.lone_name_wordis not to be suggested, andscript_ordersis left out.Why
middle_as_familyis one. Thesurnamesview (middle names and family name together) already gives a two-surname family where a person has one given name, and readinggivenwithsurnamesis the same splitmiddle_as_familymakes. Measured 2026-11-18 on master c878443, ORCID holders' own boxes (orcid-researchers, the first 3,000 records a country with both boxes filled), the share where the given box and the family box both equal the pair read:given_names+familygiven+surnames, which ismiddle_as_familytwo_family_nameslocales.ESThe view pair and a parse under
Policy(middle_as_family=True)agreed to within one record in every row.two_family_names. These are three of the five countries the repeated-surname signal above did not see.two_family_nameswith a given-name veto is what reads them.So the two switches answer one question, where the family begins, two ways: after the first word, or one name word before the last. Which fits is a property of how many given names a list's people write, and a design here could decide between them from the same evidence. What
two_family_namesadds beyond the split is thesurname1andsurname2views.