From 5585ada7943fd389e6b900d8a4d8ba7d081fbffd Mon Sep 17 00:00:00 2001 From: Derek Gulbranson Date: Fri, 20 Nov 2026 15:50:09 -0800 Subject: [PATCH 1/5] Give initials for no word in the Lao script (#1380) The script-property table gains a Lao row writing no initials and writing period abbreviations, as the Thai row does: CLDR's lo block uses an initial in none of its 37 authored patterns, writing the name in full in each of the 6 where en's has one. Co-Authored-By: Claude Opus 5.5 --- nameparser/_policy.py | 8 ++++++++ tests/v2/pipeline/test_pieces.py | 2 +- tests/v2/test_script_properties.py | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/nameparser/_policy.py b/nameparser/_policy.py index b48004db2..0cf951553 100644 --- a/nameparser/_policy.py +++ b/nameparser/_policy.py @@ -440,6 +440,14 @@ class _ScriptRow: "CLDR th uses an initial in 0 of 20 authored patterns, a block of " "its own (12 of 20 equal to en's by the copy test; 2026-08-02 " "#320, re-run 2026-11-12, #1256)"), + "lao": _ScriptRow( + ((0x0E80, 0x0EFF),), None, False, True, False, + "no Lao name is abbreviated to a letter and a period, but a title " + "is written short with a period (ດຣ.), so it writes period " + "abbreviations, as Thai does", + "CLDR lo uses an initial in 0 of 37 authored patterns, writing the " + "name in full in each of the 6 where en's has an initial (cldr " + "main c0b65ae3, 2026-11-20; #1380)"), "arabic": _ScriptRow( ((0x0600, 0x06FF), (0x0750, 0x077F), (0x0870, 0x089F), (0x08A0, 0x08FF), (0xFB50, 0xFDFF), (0xFE70, 0xFEFC), diff --git a/tests/v2/pipeline/test_pieces.py b/tests/v2/pipeline/test_pieces.py index e4739f768..606971409 100644 --- a/tests/v2/pipeline/test_pieces.py +++ b/tests/v2/pipeline/test_pieces.py @@ -657,7 +657,7 @@ def test_a_by_shape_token_takes_the_count_and_never_a_lean() -> None: ("એમ.", False), # Gujarati ("ଏମ.", False), # Odia ("එම.", False), # Sinhala, the range's far end - ("ດຣ.", True), # Lao, outside the range, as Thai is + ("ດຣ.", True), # Lao writes no initials, but abbreviations (#1380) ("กข.", True), # Thai writes no initials, but abbreviations (#1256) ("Mएम.", False), # contains-any, as Kim김. is # #1136: nor a transliteration digraph in the set, in any case, diff --git a/tests/v2/test_script_properties.py b/tests/v2/test_script_properties.py index f2fc62e2b..f04e8abb9 100644 --- a/tests/v2/test_script_properties.py +++ b/tests/v2/test_script_properties.py @@ -351,6 +351,10 @@ def test_a_georgian_run_ending_the_name_gives_an_initial_per_letter() -> None: # thai and myanmar write no initials (#1256's amendment) ("สมชาย ใจดี", "initials", ""), ("ကြည် ကြည် ဌေး", "initials", ""), + # lao writes no initials (#1380), and writes period abbreviations: + # a listed-or-not title written short with a period keeps the shape + ("ສົມຊາຍ ໃຈດີ", "initials", ""), + ("ດຣ. ສົມຊາຍ ໃຈດີ", "title", "ດຣ."), # the arabic script writes no initials, and a listed letter with a # full stop is its title (#1149) ("أحمد علي حسن", "initials", ""), @@ -433,6 +437,7 @@ def test_every_script_member_has_a_row_or_a_stated_default() -> None: "arabic": ("ARABIC LETTER",), "myanmar": ("MYANMAR LETTER",), "thai": ("THAI CHARACTER",), + "lao": ("LAO LETTER",), "georgian": ("GEORGIAN LETTER", "GEORGIAN MTAVRULI CAPITAL LETTER"), "brahmic": tuple(f"{s} LETTER" for s in ( "DEVANAGARI", "BENGALI", "GURMUKHI", "GUJARATI", "ORIYA", "TAMIL", From 10dff40d26d13877996f7ffc503d9f8eb4a83137 Mon Sep 17 00:00:00 2001 From: Derek Gulbranson Date: Fri, 20 Nov 2026 15:50:09 -0800 Subject: [PATCH 2/5] Read the Ukrainian Cyrillic patronymic endings under the East Slavic rule (#1212) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -івна, -ївна, -євич and Ілліч join the endings rules/O1 and R9 read, in _vocab's pattern and the RU pack's declared copy, with a rotator each. Co-Authored-By: Claude Opus 5.5 --- nameparser/_pipeline/_vocab.py | 8 +++++--- nameparser/locales/ru.py | 4 +++- tests/v2/test_locales.py | 4 ++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/nameparser/_pipeline/_vocab.py b/nameparser/_pipeline/_vocab.py index e4c8255c5..8cc549342 100644 --- a/nameparser/_pipeline/_vocab.py +++ b/nameparser/_pipeline/_vocab.py @@ -385,17 +385,19 @@ def is_initial_shaped(text: str) -> bool: ROMAN = _ROMAN -# Ported verbatim from v1's patterns (the 1.x and 2.x +# Ported from v1's patterns (the 1.x and 2.x # nameparser.config.regexes, removed in 3.0, #1008), the RU and TR_AZ # packs' copies pinned to these by tests/v2/test_locales.py: the East # Slavic patronymic endings and the standalone Turkic patronymic # markers, which rules/O1's and O2's rotations and rules/R9's reading -# ask through the two predicates below. +# ask through the two predicates below. The Ukrainian Cyrillic endings +# (`івна`, `ївна`, `євич`, `ілліч`) joined v1's in 3.2 (#1212). _EAST_SLAVIC = re.compile( r"(ovich|ovna|evich|evna|ichna|ilyich|kuzmich|lukich|fomich|fokich|nikitich|savvich)$", re.I) _EAST_SLAVIC_CYR = re.compile( - r"(ович|овна|евич|евна|ична|ильич|кузьмич|лукич|фомич|фокич|никитич|саввич)$", + r"(ович|овна|евич|евна|ична|ильич|івна|ївна|євич|ілліч" + r"|кузьмич|лукич|фомич|фокич|никитич|саввич)$", re.I) _TURKIC = re.compile( r"^(oglu|oğlu|ogly|ogli|o['’ʻ‘ʼ`]g['’ʻ‘ʼ`]li" diff --git a/nameparser/locales/ru.py b/nameparser/locales/ru.py index 7f97e2b7b..fdeee6d22 100644 --- a/nameparser/locales/ru.py +++ b/nameparser/locales/ru.py @@ -46,7 +46,9 @@ r"(ovich|ovna|evich|evna|ichna|ilyich|kuzmich|lukich|fomich|fokich|nikitich|savvich)$", re.I) _EAST_SLAVIC_CYR = re.compile( - r"(ович|овна|евич|евна|ична|ильич|кузьмич|лукич|фомич|фокич|никитич|саввич)$", re.I) + r"(ович|овна|евич|евна|ична|ильич|івна|ївна|євич|ілліч" + r"|кузьмич|лукич|фомич|фокич|никитич|саввич)$", + re.I) def DEVIATES(name: str) -> bool: diff --git a/tests/v2/test_locales.py b/tests/v2/test_locales.py index c7ebca3e8..facb50d82 100644 --- a/tests/v2/test_locales.py +++ b/tests/v2/test_locales.py @@ -2215,6 +2215,10 @@ def _default_corpus() -> list[str]: "Карпова Ольга Сергеевна", # евна "Петрова Мария Никитична", # ична "Ульянов Владимир Ильич", # ильич + "Коваленко Олена Петрівна", # івна (Ukrainian, #1212) + "Ткачук Ганна Сергіївна", # ївна + "Бондар Василь Леонтієвич", # євич + "Мельник Тарас Ілліч", # ілліч "Булгаков Иван Кузьмич", # кузьмич "Титов Пётр Лукич", # лукич "Орлов Семён Фомич", # фомич From bf12eb97bc58370defdd25f3b3bbf581b156eece Mon Sep 17 00:00:00 2001 From: Derek Gulbranson Date: Fri, 20 Nov 2026 15:50:09 -0800 Subject: [PATCH 3/5] Amend the rules, decisions and docs for Lao initials and Ukrainian patronymics (#1380, #1212) rules/R7, O1, R9, O6 and O8; decisions/R7, O1, R9 and script-properties with dated entries and the measurements; migrate.rst, locales.rst and the release log; AGENTS.md's initial-veto list; case rows; the rules corpus and snapshot regenerated (23 Lao initials views move). Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 2 +- .../decisions/O1-east-slavic-rotation.md | 5 ++ ...o-initials-in-a-script-that-writes-none.md | 2 + docs/design/decisions/R9-patronymic-view.md | 2 +- docs/design/decisions/script-properties.md | 14 +++- docs/design/rules/O1-east-slavic-rotation.md | 16 ++++ docs/design/rules/O6-two-family-names.md | 2 +- .../O8-letters-ending-a-name-as-its-family.md | 2 +- ...o-initials-in-a-script-that-writes-none.md | 5 +- docs/design/rules/R9-patronymic-view.md | 7 +- docs/locales.rst | 5 +- docs/migrate.rst | 32 ++++++++ docs/release_log.rst | 2 + tests/v2/cases.py | 82 +++++++++++++++++++ tools/differential/corpus_rules.jsonl | 11 +++ tools/differential/snapshot.jsonl | 57 +++++++------ 16 files changed, 213 insertions(+), 33 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index f9296d456..ae628b732 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -349,7 +349,7 @@ The 2.0 rewrite landed as underscore-private modules beside the v1 code, which 2 **Cyrillic suffix regexes need `re.I` even when the pattern is suffix-only** — a Latin title-cased word (`Ivanovich`) keeps its suffix lowercase, so `re.I` seemed skippable; but an irregular Cyrillic suffix can be nearly the whole word (`ильич`), so title-casing capitalizes into the suffix itself (`Ильич`). `east_slavic_patronymic_cyrillic` (v1's name for what is `_vocab._EAST_SLAVIC_CYR` since 3.0 removed `config/regexes.py`, #1008) shipped without `re.I` on the Latin reasoning and silently failed on capitalized irregular forms — don't assume Latin's title-case safety transfers to Cyrillic. (#185) -**Suffix words vs the initial veto** — single-letter roman numeral suffixes (`i`, `v`) are suffix words but also initial-shaped, so `_vocab.is_suffix_strict` (v1's `is_suffix`) vetoes them through `_vocab.is_initial`. `_vocab.is_suffix_lenient` accepts suffix words without the veto and is only safe in unambiguous positions, after a comma (#136, #144). **The veto is Latin-only since #320**: `is_initial` ANDs the bare shape test (`is_initial_shaped`) with "not in a script that writes no initials", the rows of `_policy._SCRIPT_PROPERTIES` whose `writes_initials` is false (Han, Hangul, Hiragana, Katakana, since #1256 the Myanmar and Thai scripts, and since #1149 the Arabic script, whose `د.` and `م.` are titles; decisions/script-properties), so the single-character CJK suffix words (씨, 様, 氏, 군, 양, 님, 殿) written with a period read as suffixes: `"김민준 씨."` gives suffix `씨.`. `V.`/`I.` still lose to the veto and still need the lenient test. +**Suffix words vs the initial veto** — single-letter roman numeral suffixes (`i`, `v`) are suffix words but also initial-shaped, so `_vocab.is_suffix_strict` (v1's `is_suffix`) vetoes them through `_vocab.is_initial`. `_vocab.is_suffix_lenient` accepts suffix words without the veto and is only safe in unambiguous positions, after a comma (#136, #144). **The veto is Latin-only since #320**: `is_initial` ANDs the bare shape test (`is_initial_shaped`) with "not in a script that writes no initials", the rows of `_policy._SCRIPT_PROPERTIES` whose `writes_initials` is false (Han, Hangul, Hiragana, Katakana, since #1256 the Myanmar and Thai scripts, since #1149 the Arabic script, whose `د.` and `م.` are titles, and since #1380 the Lao script; decisions/script-properties), so the single-character CJK suffix words (씨, 様, 氏, 군, 양, 님, 殿) written with a period read as suffixes: `"김민준 씨."` gives suffix `씨.`. `V.`/`I.` still lose to the veto and still need the lenient test. **Comparing against v1 needs `PYTHONSAFEPATH=1` AND a directory outside the worktree** — `uv run --isolated --no-project --with 'nameparser==1.4.0'` still puts the checkout's `nameparser/` ahead of the pinned wheel on `sys.path`, so the "v1" side silently imports the branch and every comparison reports parity. Run it as `cd && PYTHONSAFEPATH=1 uv run --isolated --no-project --with 'nameparser==1.4.0' python -c "..."`. This produces false confidence rather than an error, so it invalidates results without ever looking wrong. **A `tests/v2/cases.py` row's `parity` means 1.4.0, and no test checks it** -- the table runs every row against the tree, so a row labelled `parity` that only matches master passes for good, and `parity` is the dataclass default, so a row written with no `classification` claims it. #614 added eight such rows, compared against master; #620 found them by running the wheel this way and relabelled each with the change its reading came from, found by `git bisect run` in a scratch worktree (`git worktree add --detach`, never this one). 3.1's prose sweep found 72 more, 27 of them #1395's `md_*` rows, and the check is a kept tool since: `uv run python tools/differential/parity_check.py` reads every default-config `parity` row with the 1.4.0 wheel, hardened as `compare.py` is, and lists each row 1.4.0 reads otherwise with its fields (`--check` exits 1 on one). It needs the network or uv's cache, so no CI job runs it, and it skips the rows carrying a policy or a locale, whose `parity` stays unchecked. Run it after adding a row on the default, and relabel what it lists the way #620 did. When bisecting, run Python with `-B` and `git clean -fdx` the scratch tree at each step: two checkouts within one second leave a stale `.pyc` whose source has the same mtime and size, and in 3.1's relabel one answered for two rows, naming a commit whose parent already read them. diff --git a/docs/design/decisions/O1-east-slavic-rotation.md b/docs/design/decisions/O1-east-slavic-rotation.md index d9e61fd1f..e91570b01 100644 --- a/docs/design/decisions/O1-east-slavic-rotation.md +++ b/docs/design/decisions/O1-east-slavic-rotation.md @@ -6,6 +6,7 @@ - The rotation is scoped to the default order by a gate on the order assign read: under FAMILY_FIRST `Мицкевич Адам Юзеф` reads family 'Мицкевич', given 'Адам', middle 'Юзеф' as plain FAMILY_FIRST does, and the natural-order `Иван Петрович Сидоров` reads family 'Иван', given 'Петрович', middle 'Сидоров', an accepted consequence pinned in tests/v2/test_locales.py rather than in rules/O1's examples — 2026-09-07 #384. - Re-deriving the order from the patronymic trace under a declared family-first order, and reporting where the trace and the declared order disagree, are declined — 2026-09-07 #384. - An initial in the first or the middle of the three name words, read as T5 and T4 read one, blocks the rotation, so `И. Б. Зубкевич`, `Ирина Б. Зубкевич` and `roman a abramovich` under `locales.RU` keep their surnames, and the family-first `Сидоров И. Петрович` reads family 'Петрович' and no patronymic as an accepted cost — 2026-11-08 #1185. +- The patronymic endings take the Ukrainian ones written in Cyrillic, `-івна`, `-ївна`, `-євич` and `Ілліч`, so `Коваленко Олена Петрівна` under `locales.RU` reads family 'Коваленко', given 'Олена', patronymic 'Петрівна'; the Belarusian endings and the Latin spellings of the Ukrainian ones are not read (decisions/R9's Open) — 2026-11-20 #1212. Not standing: 2026-08-15; the rotation and name-order question it left riding the order-constants issue, which closed without answering it, answered by 2026-09-07 #384. @@ -24,6 +25,10 @@ Open: none in this file. Where the row is pinned, and why not in rules.md. The example grammar admits ONE annotation, and `tests/v2/rules_doc.py`'s `resolve_annotation` resolves it to a policy, a locale or a gated locale — never a pair. Composite keys exist for other pairings (`family-first+middle_as_family`, `[ja+segmenter]`), but no registered annotation combines a pack with an order, so the two cannot be written on the same example line. Registering a combined policy would be a test change made inside a docs decision. #470 asked whether an example line should declare its format and was closed not-planned on 2026-09-02 — "no notation is needed. The Accepted clause is already the right home for this" — so prose in the rule is the decided home here, not a workaround. The parse is a `tests/v2/test_locales.py` row beside the pack's other rows, and rules/O1 states it in prose. - 2026-11-02 #994 — `Никитич` and `Саввич` (Latin `Nikitich`, `Savvich`) join the irregular forms the patronymic ending lists whole beside `Ильич` and `Кузьмич`: the masculine patronymics of Никита and Савва, which fit neither `-ович` nor `-евич`, so `Петров Иван Никитич` under `locales.RU` read family 'Никитич' and now reads family 'Петров', given 'Иван'. Their feminines already matched `-ична`. Found by scoring the tree against datacoon/russiannames' 61,466 labelled Cyrillic names (`parser_for(locales.RU)` matched 58,011 of them on surname, given name and patronymic, 2026-11-02 at db7e8fc4); that project's patronymic list gives Никитич a count of 1,225 and Саввич 160. Excluded: the spelling `Кузмич` (44 in the same list); the rest of that list's unmatched tail is typos (`Николавна`, `Владимирвич`). - 2026-11-08 #1185 (the first-word guard and its tag test from #1217, an outside contribution) — an initial in the first or the middle of the three name words blocks the rotation, the initial read as T5 and T4 read one: a one-letter word with its period, a bare unaccented Latin capital, and in a name written wholly in one case a bare lower-case letter (`roman a abramovich`). The test reads classify's `initial` tag, which carries both rules' reading, so a one-case name's two spellings read alike. Two drafts read otherwise, each found by review: the first read the word's text alone and missed the lower-case spellings, and the second read the text beside the tag, whose text arm decided one input only, a bare capital `Y` that P8 reads as a connective, first or in the middle, blocking `SIDOROV Y PETROVICH` and `Y IVAN PETROVICH` while their lower-case spellings rotated. Before it, a surname ending like a patronymic was rotated out of the family wherever initials came before it: `И. Б. Зубкевич` under `locales.RU` read family 'И.', given 'Б.', middle 'Зубкевич', and `Ирина Б. Зубкевич` and `Roman A. Abramovich` read family 'Ирина' and 'Roman', where the default parser reads each right. The first-word half follows from the rotation's own premise: it restores a family-first listing, and a family name is not written as an initial. The middle-word half is a fork the shape cannot settle — `Ирина Б. Зубкевич` (given, initial, surname) and `Сидоров И. Петрович` (surname, initial, patronymic) are one shape, and only knowing which `-ович` word is a surname tells them apart — so it was decided by which writing occurs. The issue measured (2026-11-08) the State Duma's eight convocations and the Federation Council, 2,423 three-word names: 16 surnames (0.7%) end like a patronymic, and composed as `Имя Б. Фамилия` 0 of the 16 read right under the pack; its comment measured the Verkhovna Rada, 35 of 1,587 surnames (2.2%), 0 of 35 right in `И. Б. Фамилия`, and 6 ORCID names from Ukraine breaking in the `Имя Б. Фамилия` shape once Latin `-ovych` endings are simulated. The other writing was looked for and not found. Recipe: parse every name of every `tools/differential/local_corpora.py` corpus but ORCID, PatentsView and FEC (whose names are composed from fields) under `parser_for(locales.RU)` with this change and on master 51d36a31, and list the names whose given, middle or family moved: 11 move on 2026-11-08, every one a given name, a middle initial and a surname (`Viktor F Yanukovich`, `Vladimir B Grinevich`, `ACACIO T GUBEROVICH`), none a family-first listing; all 11 are Latin, the corpora holding no Cyrillic name of the shape with an initial, which says more about the corpora than about the shape. A Russian family-first listing that writes the given name as an initial writes the patronymic as one too (`Сидоров И. П.`), which O1 never reaches. The cost, `Сидоров И. Петрович` reading family 'Петрович', also empties the patronymic view, which read 'Петрович' before: R9's East Slavic arm reads the middle only. A bare Cyrillic capital is no initial by T5, so `Ирина Б Зубкевич` still rotates to family 'Ирина', as it reads that letter a name word everywhere; that is T5's question, not this one's. Recording an ambiguity on the middle-initial shape was weighed and not taken: no reader of `Ирина Б. Зубкевич` hesitates. `locales/ru.py`'s `DEVIATES` is left as it was: it over-declares, the safe direction for the non-interference gate, and the surface shrank. +- 2026-11-20 #1212 — THE UKRAINIAN CYRILLIC ENDINGS. The women's `-івна` and `-ївна`, the soft `-євич` and the irregular `Ілліч` join the endings `_vocab._EAST_SLAVIC_CYR` lists (and `locales/ru.py`'s declared copy), the Ukrainian men's `-ович` and `-йович` being the Russian spelling and read already. Before, a Ukrainian woman's name written family-first under `locales.RU` read the patronymic as the family name (`Коваленко Олена Петрівна` → given 'Коваленко', family 'Петрівна'). + MEASURED on the Verkhovna Rada's deputies (`opensanctions-parliaments`, `--group ua_rada`, 1,598 names, written surname, given name, patronymic) with `config_diff.py diff default plain:RU --local opensanctions-parliaments --group ua_rada --readings ` in a checkout of master cb5088a9 and in the branch, the two files compared line by line: plain:RU moves 1,367 names from the default at cb5088a9 and 1,596 here. The 229 the change moves are all read right (family the first word, given the second, middle and patronymic the third), 150 `-івна`, 69 `-ївна`, 5 `Ілліч` and 5 `-євич`; none read right before and wrong after; every three-word name of the 1,598 now reads right under plain:RU, and the 2 others are not of three words. (#1212 counted 209 women on 2026-11-08, a smaller fetch.) + THE GROUP SUGGESTER, whose patronymic signals read the same endings: `suggest_measure.py --base ` moves 3 cells, `ua_rada` under each of the three bases, its votes rising (family-first 1,366 → 1,585 of 1,588, the East Slavic rule 1,367 → 1,586) and its suggestion unchanged (family-first, the rule on); no drawn group of any size moves, so no figure `Parser.suggest`'s docstring, docs/suggest.rst or decisions/group-suggestion quotes moves; the `ua_rada` counts in that file's dated entries stand as measured then. + ACCEPTED, the surname cost the Russian endings already carry: a name in the spoken order with two given names and a surname ending in `-євич` rotates (`Олена Марія Гаєвич` → family 'Олена'), as `Анна Мария Абрамович` does with `-евич`; a middle word carrying an ending still blocks it (`Олена Петрівна Гаєвич` keeps family 'Гаєвич'). Left out, as #1212's own measurement found them costly or unmeasured: the Belarusian endings (`-авіч`, `-евіч`, `-овіч`, `-аўна`, `-еўна`, `-оўна`; 859 of the 8,231 Belarusian names it read end their surname in `-овіч` or `-евіч`, out of O1's reach today only for their spelling, which a Belarusian pack could answer), the Latin `-ivna`, `-ovych` and `-evych` (1,688 ORCID family boxes from Ukraine end in `-ovych` or `-evych`, #1185's collision), and the irregular `Хомич` and `Савич`, which are common surnames and were not measured. The Latin `Illich` is left out with the Latin endings. Declined: diff --git a/docs/design/decisions/R7-no-initials-in-a-script-that-writes-none.md b/docs/design/decisions/R7-no-initials-in-a-script-that-writes-none.md index 3b7f14211..0ecbda47b 100644 --- a/docs/design/decisions/R7-no-initials-in-a-script-that-writes-none.md +++ b/docs/design/decisions/R7-no-initials-in-a-script-that-writes-none.md @@ -7,6 +7,7 @@ - A word opening with conjoining jamo that compose to no syllable gives no initial, the jamo being hangul: `ᄒᆞᆫ 김` gives '' — 2026-11-05 #1087 - A word opening with a letter of the Myanmar script gives no initial: `ကြည် ကြည် ဌေး` gives '' — 2026-11-12 #1234 (decisions/script-properties). - A word opening with a Thai letter gives no initial: `สมชาย ใจดี` gives '' — 2026-11-12 #1256 (decisions/script-properties). +- A word opening with a Lao letter gives no initial: `ສົມຊາຍ ໃຈດີ` gives '' — 2026-11-20 #1380 (decisions/script-properties). Open: none in this file. @@ -17,3 +18,4 @@ Open: none in this file. - 2026-11-12 #1234 — BURMESE WRITES NO INITIALS. The script-property table's Myanmar row (decisions/script-properties, which holds the evidence and the moves) adds Burmese to the rule: `ကြည် ကြည် ဌေး` gave 'က. က. ဌ.' from 1.4.0 through 3.0.1 and gives ''. The rule's Because no longer says the parse reads no period after such a word as an abbreviation: that is H2's own column, which the Myanmar row does not set. - 2026-11-12 #1256 — THAI WRITES NO INITIALS. The script-property table's Thai row (decisions/script-properties, which holds the count and the moves) adds Thai to the rule, as the 2026-08-02 #320 measurement (`th` 0 of 20) had said it belonged once it earned a row: `สมชาย ใจดี` gave 'ส. ใ.' and gives ''. - 2026-11-19 #1149 — THE ARABIC SCRIPT WRITES NO INITIALS. The Arabic script takes a row of `_policy._SCRIPT_PROPERTIES` that writes no initials, so a word whose first letter is in it contributes nothing to `initials()`, where 1.4.0 through 3.1.0 gave its first letter; the measurement, the CLDR table it was decided against and the cost are decisions/script-properties' entry of the same date. +- 2026-11-20 #1380 — LAO WRITES NO INITIALS. The script-property table's Lao row (decisions/script-properties, which holds the count and the moves) adds Lao to the rule: `ສົມຊາຍ ໃຈດີ` gave 'ສ. ໃ.' from 1.4.0 through 3.1.0 and gives ''. Khmer and Tibetan, which #1380 asked about beside it, have no row and still give their first letters (decisions/script-properties' Open). diff --git a/docs/design/decisions/R9-patronymic-view.md b/docs/design/decisions/R9-patronymic-view.md index 6f53532b2..485ea4762 100644 --- a/docs/design/decisions/R9-patronymic-view.md +++ b/docs/design/decisions/R9-patronymic-view.md @@ -9,7 +9,7 @@ Elsewhere: why the view leaves `family` and `middle` as they are, and the fielded-corpora measurements behind it, decisions/vocabulary-model's 2026-10-28 #754 entry, item 3; the rotations the two ending rules are named for, decisions/O1 and decisions/O2; the `clan`/`patronymic` line in the particle kinds, decisions/vocabulary-model's 2026-10-19 #749 entry; a father's name nothing in the text marks, which fills no view, and a view that overlaps the family, decisions/family-without-an-inherited-name. -Open: the Icelandic ending rule, which an `is` pack would turn on (the RFC's work order: 3b, 4c and 4f); whether the East Slavic endings should take the Ukrainian `-ivna`/`-ївна` and `-ovych`/`-ович` spellings, which would move O1's rotation too. Whether `a/k`, written once among Malaysia's election candidates for `anak`, and `a/l` written spaced (`A / L`), which no list measured writes, should read as `a/l` does (#1468); India's and Pakistan's `S/O`, `D/O` and `W/O`, which name a parent or a husband outside the legal name (#1165). +Open: the Icelandic ending rule, which an `is` pack would turn on (the RFC's work order: 3b, 4c and 4f); whether the East Slavic endings should take the Belarusian spellings (`-авіч`, `-аўна`) and the Latin `-ivna`/`-ovych` of the Ukrainian ones, which would move O1's rotation too ([#1212](https://github.com/derek73/python-nameparser/issues/1212); the Ukrainian Cyrillic endings are read since 2026-11-20, decisions/O1). Whether `a/k`, written once among Malaysia's election candidates for `anak`, and `a/l` written spaced (`A / L`), which no list measured writes, should read as `a/l` does (#1468); India's and Pakistan's `S/O`, `D/O` and `W/O`, which name a parent or a husband outside the legal name (#1165). ## Log diff --git a/docs/design/decisions/script-properties.md b/docs/design/decisions/script-properties.md index 3717e9c0e..1f7e22210 100644 --- a/docs/design/decisions/script-properties.md +++ b/docs/design/decisions/script-properties.md @@ -14,11 +14,13 @@ - The Thai script writes no initials, decided by the CLDR count (`th` 0 of 20 locale-authored patterns produce one) in the same amendment, and writes period abbreviations, so its titles and degrees written short read as before — 2026-11-12 #1256, Thai. - The Arabic script (U+0600–06FF, U+0750–077F, U+0870–08FF, U+FB50–FDFF, U+FE70–FEFC, U+10EC0–10EFF) writes no initials and writes period abbreviations: the letters a title is written short with (`د.`, `أ.`, `م.`) are listed as titles, an unlisted letter with a full stop being a name word (`ح. علي`), and `initials()` and the name match give no initial for a word in it. Decided from usage against CLDR's `ar` patterns; the row covers Persian and Urdu too, a row being per script — 2026-11-19 #1149. +- The Lao script (U+0E80–0EFF) writes no initials, decided by the CLDR count (`lo` 0 of 37 locale-authored patterns produce one, its block its own), and writes period abbreviations, so a Lao title written short (`ດຣ.`) reads as before — 2026-11-20 #1380. + Open: Persian and Urdu. The Arabic row covers them because a row is per script, on thin evidence for both: the Wikidata native corpus holds 30 Persian and 32 Urdu names, none with an initial, CLDR's `fa` block is mostly `en`'s (6 of its 7 patterns with an initial equal) and `ur`'s half its own (4 of 8), and no measured list of either language's names written by their bearers has been read — #1149. Open: [#1273](https://github.com/derek73/python-nameparser/issues/1273) — what an initial looks like in the Brahmic scripts, the brahmic row's own question (`initials()` gives a vowel sign's base, not the syllable written). [#1274](https://github.com/derek73/python-nameparser/issues/1274) — the Uzbek apostrophe in case repair, a language question beside #1214. [#1242](https://github.com/derek73/python-nameparser/issues/1242) — the Dutch `IJ`, a language question, out of the table by the decision. -Not examined (2026-11-12): the other scripts that write vowel signs on a consonant, Lao, Khmer and Tibetan among them, have no row, and read as Latin does: `ສົມຊາຍ ໃຈດີ`.initials() gives a leading vowel sign as an initial, the defect Thai had. The decision's third column, "joins with vowel signs", was not built: H2's Brahmic Except reads `spells_initials` instead, since Thai joins with vowel signs and must not be vetoed. +Open: [#1380](https://github.com/derek73/python-nameparser/issues/1380) — Khmer and Tibetan, the other scripts #1380 named beside Lao, have no row and read as Latin does, as every other script that writes vowel signs on a consonant does (`សុខ ចាន់`.initials() gives 'ស. ច.'). The recipe does not answer for either: CLDR's `km` block is `en`'s in 40 of its 42 authored patterns, and in all 8 that use an initial, so it states nothing about Khmer, and CLDR has no Tibetan `personNames` block. A row for either waits for a measured list of names its writers wrote. The decision's third column, "joins with vowel signs", was not built: H2's Brahmic Except reads `spells_initials` instead, since Thai joins with vowel signs and must not be vetoed. ## Log @@ -78,3 +80,13 @@ The ja, ko, th and ru counts are 2026-08-02's (#320) too. - **NFD and the joiners.** T8 counts an Arabic letter's combining marks with it (`_vocab._ARABIC_MARKS`, every mark Unicode names ARABIC) in the gate `_script_segment` asks first, on the chunk and on the name after the stop, so a decomposed `أ.محمد` or `أ.د.أحمد` divides as the composed one does; the first review found the gate left out, a single decomposed `أ.` then swallowing the name into the title. The name after the stop also admits a zero-width non-joiner or joiner between two letters, as Persian spells a name (`د.محمد‌رضا` divides; `Dr.Jean‌Paul` with it). A joiner ending the word or right after the stop is no part of a name, so the word does not divide and reads whole as the listed title, the name with it (`د.محمد‌ رضا` → title 'د.محمد‌'), as `Dr.Jean‌ Smith` read on master: accepted, a case row pinning it. The shape's letter class (`_MARKS`, decisions/H2) still counts no Arabic mark. A vowel mark written on the title letter (`دُ.`) and a presentation form (`ﺩ.`) are not read as the title, and a title written with a vowel (`أَ.د.`) is a title by shape, not the listed one, so it addresses no given name. - **MEASURED** against master `667828ae` (`tools/differential/measure.py --base`): the committed snapshot moves the 333 `initials()` views and no field; the CLDR, GND and Wikidata native records do not move. `orcid-researchers` moves 7,018 entries, 6,203 in `initials()` alone and 814 reading a title (663 with the middle, 149 with the given name, 2 with the family) and 1 an ambiguity alone; its agreement scores 423 records as regressions and 211 as changed to a reading neither side agrees with, which are holders who typed the title into the given-name box (629 records open that box with a newly listed title). The parliaments move 1,181 entries (38 reading a title) and their alike view reads 35 persons apart, each spelled once with a title it now reads and once without, the title field alone differing. `jrc-names` moves 17,070 entries, 5 reading a title (the cut-off `د آل خليفة`). ClinicalTrials.gov moves 9 `initials()` views; every other local corpus moves nothing. `tools/differential/match_diff.py --base` moves 0 of 690,426 rows, its draw holding no Arabic-script pair with a letter and a full stop, so `tests/v2/test_match.py` holds the match's move (`فؤاد علي` against `ف. علي` now conflicts); `suggest_measure.py --base` moves no cell (decisions/group-suggestion's entry of the same date). - Recompute: the CLDR table with the Standing recipe on `common/main/{en,ar,fa,ur}.xml` at `c0b65ae3`, `،` added to the copy test's commas; the lists by scanning each corpus's Arabic-script names (U+0600–06FF and the other spans above) for words that are one letter with or without a full stop, by position, and reading each; the measurement with `measure.py --base `. +- 2026-11-20 #1380 — LAO WRITES NO INITIALS, AND WRITES PERIOD ABBREVIATIONS. Decided on #1380's triage for 3.2 (Lao alone; Khmer and Tibetan left Open above). The Standing recipe run on cldr `c0b65ae3` answers for `lo`: + + | locale | authored | with an initial | `initialPattern` | equal to `en`'s | + |---|---|---|---|---| + | lo | 37 | 0 | inherited | 29 | + | km | 42 | 8 | inherited | 40, and all 8 with an initial | + + `lo`'s block is its own: the 8 patterns not equal to `en`'s are the ones where `en` writes an initial or puts the credentials after the name, and in each of the 6 where `en`'s uses an initial `lo` writes the name in full (`{given} {given2} {surname}` for `en`'s `{given-initial}{given2-initial} {surname}`). `km` is a copy in every pattern that uses an initial, so it states nothing about Khmer. Lao writes a title short with a period (`ດຣ.`, doctor), so the row's `period_abbreviations` holds and H2's shape reads such a title as before. + - **What the row moves.** `initials()` gives nothing for a word in Lao, where 1.4.0 through 3.1.0 gave its first character, a leading vowel sign included (`ເອດາ` gave 'ເ.', the defect this file's 2026-11-12 note recorded); T5 reads no Lao letter with a full stop as an initial, so under `initials_as_family` O8's run leaves it (`ສົມຊາຍ ໃຈດີ ສ. ດ.` family 'ດ.', where 3.1.0 read 'ສ. ດ.') and under `two_family_names` O6 takes it as a name word (`ສົມຊາຍ ສ. ໃຈດີ` family 'ສ. ໃຈດີ'), as for Thai. No default field moves. MEASURED against master `cb5088a9` (`tools/differential/measure.py --base`): the committed snapshot moves 23 `initials()` views, all Lao, 20 of them CLDR's `lo` renderings, and no field; no local corpus, agreement or alike view moves, and the CLDR, GND and Wikidata records do not. + - Recompute: the table with the Standing recipe on `common/main/{en,lo,km}.xml` at `c0b65ae3`; the moves with `measure.py --base `. diff --git a/docs/design/rules/O1-east-slavic-rotation.md b/docs/design/rules/O1-east-slavic-rotation.md index e4a98521b..23ba7baf3 100644 --- a/docs/design/rules/O1-east-slavic-rotation.md +++ b/docs/design/rules/O1-east-slavic-rotation.md @@ -7,6 +7,12 @@ - **A middle word that also carries the ending blocks the reading**, because the surname itself may be patronymic-derived. ``` "Иван Петрович Абрамович" [ru] → family="Абрамович" · boundary + "Олена Петрівна Гаєвич" [ru] → family="Гаєвич" · boundary + ``` +- **The endings are the Russian ones and the Ukrainian ones written in Cyrillic** (`-івна`, `-ївна`, `-євич`, `Ілліч`), the three languages writing the patronymic in the same slot and the same orders. + ``` + "Коваленко Олена Петрівна" [ru] → family="Коваленко" + "Мельник Тарас Ілліч" [ru] → family="Мельник" ``` - **The restoration is the default order's work**: it recovers the given-first reading a family-first listing hides, so where the caller has DECLARED a family-first order there is nothing left to restore and position decides. @@ -29,6 +35,16 @@ **Accepted:** +- A name written in the spoken order with two given names and a surname carrying the ending is read as family-first, the shape giving no sign of which it is, a Ukrainian `-євич` surname as a Russian `-евич` one. + ``` + "Анна Мария Абрамович" [ru] → family="Анна" + "Олена Марія Гаєвич" [ru] → family="Олена" + ``` +- The Belarusian endings and the Latin spellings of the Ukrainian ones are not read, so a Belarusian or a romanized Ukrainian name written family-first keeps its positional reading. + ``` + "Сокалаў Мікалай Іванавіч" [ru] → family="Іванавіч" + "Tkachuk Olena Petrivna" [ru] → family="Petrivna" + ``` - A family-first listing that writes the given name as an initial and the patronymic in full has the shape of a given name, an initial and a surname with the ending, so it keeps its positional reading, its patronymic standing in the family where R9 does not read one. ``` "Сидоров И. Петрович" [ru] → family="Петрович" diff --git a/docs/design/rules/O6-two-family-names.md b/docs/design/rules/O6-two-family-names.md index 2188b8513..5e9bb3161 100644 --- a/docs/design/rules/O6-two-family-names.md +++ b/docs/design/rules/O6-two-family-names.md @@ -147,7 +147,7 @@ **Accepted:** -- A letter with a full stop in a script that writes no initials is a name word, not a middle initial (T5), so it joins the family as any third name word does: Thai and Burmese since 3.1 and the Arabic script since 3.2, as Han before. +- A letter with a full stop in a script that writes no initials is a name word, not a middle initial (T5), so it joins the family as any third name word does: Thai and Burmese since 3.1 and the Arabic and Lao scripts since 3.2, as Han before. ``` "สมชาย ส. ใจดี" two_family_names → family="ส. ใจดี" "John 王. Smith" two_family_names → family="王. Smith" diff --git a/docs/design/rules/O8-letters-ending-a-name-as-its-family.md b/docs/design/rules/O8-letters-ending-a-name-as-its-family.md index c88b77faf..0d4204d5b 100644 --- a/docs/design/rules/O8-letters-ending-a-name-as-its-family.md +++ b/docs/design/rules/O8-letters-ending-a-name-as-its-family.md @@ -119,7 +119,7 @@ "राम बहादुर वि क" initials_as_family → family="क" "झलक बहादुर आ. म." initials_as_family → family="आ. म." ``` -- A letter of a script that writes no initials is no initial to T5, Thai and Burmese among them since 3.1 and the Arabic script since 3.2, as Han and Hangul were before, so letters of theirs ending a name are no run and keep their middle and family roles. +- A letter of a script that writes no initials is no initial to T5, Thai and Burmese among them since 3.1 and the Arabic and Lao scripts since 3.2, as Han and Hangul were before, so letters of theirs ending a name are no run and keep their middle and family roles. ``` "ใจดี ส. ก." initials_as_family → family="ก." "ဌေး က. ခ." initials_as_family → middle="က." diff --git a/docs/design/rules/R7-no-initials-in-a-script-that-writes-none.md b/docs/design/rules/R7-no-initials-in-a-script-that-writes-none.md index 5f2897761..56bc26749 100644 --- a/docs/design/rules/R7-no-initials-in-a-script-that-writes-none.md +++ b/docs/design/rules/R7-no-initials-in-a-script-that-writes-none.md @@ -1,10 +1,10 @@ # R7 — no initials in a script that writes none -**When:** initials are asked of a parsed name holding a word that opens with a Han ideograph, a Hangul syllable, kana, or a letter of the Myanmar, Thai or Arabic script, as in "김민준". +**When:** initials are asked of a parsed name holding a word that opens with a Han ideograph, a Hangul syllable, kana, or a letter of the Myanmar, Thai, Lao or Arabic script, as in "김민준". **Then:** a word whose first letter is in a script that writes no initials contributes nothing to the initials, and a word in another script beside it still gives its own. -**Because:** Han, Hangul, kana, Burmese, Thai and the Arabic script abbreviate no name to a letter, so the first character with a full stop after it is no initial anyone writes. The parse already reads no word in them as an initial (T5), and the name match none as one either, so the parse and this view answer that question alike. +**Because:** Han, Hangul, kana, Burmese, Thai, Lao and the Arabic script abbreviate no name to a letter, so the first character with a full stop after it is no initial anyone writes. The parse already reads no word in them as an initial (T5), and the name match none as one either, so the parse and this view answer that question alike. ``` "김민준" → initials="" @@ -12,6 +12,7 @@ "王 小明" → initials="" "ကြည် ကြည် ဌေး" → initials="" "สมชาย ใจดี" → initials="" +"ສົມຊາຍ ໃຈດີ" → initials="" "أحمد علي حسن" → initials="" "김민준 John" → initials="J." · boundary ``` diff --git a/docs/design/rules/R9-patronymic-view.md b/docs/design/rules/R9-patronymic-view.md index 02a03ef0b..d10019c78 100644 --- a/docs/design/rules/R9-patronymic-view.md +++ b/docs/design/rules/R9-patronymic-view.md @@ -93,7 +93,12 @@ "ibn Ali Hasan" → patronymic="ibn Ali Hasan" ``` - The East Slavic arm reads the middle only, the field the parse puts a patronymic in after a given name: one the parse put in the family (a two-word `Ivan Petrovich`) or in the given name (FAMILY_FIRST_GIVEN_LAST's last word) is not read, and under a declared FAMILY_FIRST a surname the order puts in the middle is, `Иван Петрович Абрамович` reading patronymic `Абрамович`, the declaration O1 honors. -- The East Slavic endings are O1's, so a Ukrainian `-ївна` (`Оксана Сергіївна Баюл`) is not read. +- The East Slavic endings are O1's, so a Ukrainian `-ївна` is read and a Belarusian `-аўна` or a Latin `-ivna` is not. + ``` + "Олена Сергіївна Ткачук" [ru] → patronymic="Сергіївна" + "Алена Сяргееўна Ткачук" [ru] → patronymic="" + "Olena Serhiivna Tkachuk" [ru] → patronymic="" + ``` - The Turkic father's name may stand in another field than the marker, as O2 leaves a name of five name words, and a two-word name with a marker is read whole, a family name spelled as a marker included. ``` "Ali Ahmad Vali Hasan oglu" [tr_az] → patronymic="Hasan oglu" diff --git a/docs/locales.rst b/docs/locales.rst index 022d22ed1..1d52f8501 100644 --- a/docs/locales.rst +++ b/docs/locales.rst @@ -464,8 +464,9 @@ and the patronymic for the family. The pack detects that shape and assigns it accordingly. The shape is three name words, the last ending like a patronymic (Cyrillic and -transliterated ``-ovich``/``-ovna``-style endings), the middle not, and -no initial before the last, so ``И. Б. Зубкевич`` keeps family +transliterated ``-ovich``/``-ovna``-style endings, and the Ukrainian +``-івна``, ``-ївна``, ``-євич`` and ``Ілліч`` in Cyrillic), the middle +not, and no initial before the last, so ``И. Б. Зубкевич`` keeps family ``Зубкевич``: .. doctest:: diff --git a/docs/migrate.rst b/docs/migrate.rst index a3e9bf266..24bb6ac62 100644 --- a/docs/migrate.rst +++ b/docs/migrate.rst @@ -2440,3 +2440,35 @@ To read the two as name words again, remove their readings: >>> as_31 = Parser(lexicon=Lexicon.default().remove("@", "urf", kind="alias_marker")) >>> as_31.parse("Ravi Kumar urf Raju").middle 'Kumar urf' + +Initials in Lao +^^^^^^^^^^^^^^^ + +:meth:`~nameparser.ParsedName.initials` gives nothing for a word in the +Lao script, which shortens no name to a letter, as for Thai and +Burmese, where 1.4 through 3.1 gave its first letter. A Lao title +written short with a full stop is still a title: + +.. doctest:: + + >>> parse("ສົມຊາຍ ໃຈດີ").initials() + '' + >>> parse("ດຣ. ສົມຊາຍ ໃຈດີ").title + 'ດຣ.' + +Ukrainian patronymics under locales.RU +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Under ``locales.RU`` the Ukrainian patronymic endings written in +Cyrillic, ``-івна``, ``-ївна``, ``-євич`` and ``Ілліч``, read as the +Russian ones do: a name written family name first is reordered, and the +patronymic fills ``patronymic``, where 2.0 through 3.1 read the +patronymic as the family name. The default parse is unchanged: + +.. doctest:: + + >>> olena = parser_for(locales.RU).parse("Коваленко Олена Петрівна") + >>> olena.given, olena.family, olena.patronymic + ('Олена', 'Коваленко', 'Петрівна') + >>> parse("Коваленко Олена Петрівна").family + 'Петрівна' diff --git a/docs/release_log.rst b/docs/release_log.rst index d1926ae13..9f7478688 100644 --- a/docs/release_log.rst +++ b/docs/release_log.rst @@ -4,6 +4,8 @@ Release Log nameparser 3.2 is under development. + - **Fix locales.RU reading a Ukrainian patronymic written in Cyrillic as the family name.** ``parser_for(locales.RU).parse("Коваленко Олена Петрівна")`` gives family ``Коваленко``, given ``Олена``, patronymic ``Петрівна``, where 2.0.0 through 3.1.0 gave family ``Петрівна``, given ``Коваленко``; ``-ївна``, ``-євич`` and ``Ілліч`` read the same way, while the Belarusian endings and the Latin spellings (``-ivna``, ``-ovych``) still do not. :issue:`1212` + - **Fix initials() giving a Lao name its first letters.** ``parse("ສົມຊາຍ ໃຈດີ").initials()`` gives ``''``, as a Thai or Burmese name does, where 1.4.0 through 3.1.0 gave ``'ສ. ໃ.'``; a Lao title written short (``ດຣ.``) is still a title. :issue:`1380` - **Add familiar forms in Central and Eastern European and Balkan languages, found in Wikidata.** With ``familiar-form`` accepted, ``Erzsi Nagy`` / ``Erzsébet Nagy`` and ``Jára Novák`` / ``Jaroslav Novák`` are consistent, where 3.1.0 read a conflict, Czech and Hungarian gaining the most; the Russian, Ukrainian, Belarusian, Bulgarian and most Serbian pairs are written in Cyrillic, so a name romanized in Latin letters does not reach them. :issue:`1387` - **Read a second name written after @ or urf as the nickname.** ``parse("Rahim @ Jaki bin Osman")`` gives given ``Rahim``, nickname ``Jaki``, family ``bin Osman``, where 1.4.0 through 3.1.0 gave middle ``@ Jaki``; the alias runs to a patronymic particle, another marker or a comma, and a one-word alias before the family name takes the family name with it (``Rahim @ Jaki Osman`` gives no family name). ``alias`` and ``aka`` are read so only where you add them (``Lexicon.add("aka", kind="alias_marker")``); an ``@`` glued to a word is part of it. :issue:`1164` - **Fix an Arabic-script name written with الدين or الله second, which read as two names.** ``parse("نور الدين سامر حداد")`` gives given ``نور الدين``, where 1.4.0 through 3.1.0 gave given ``نور``, middle ``الدين سامر``; ending the name the pair is the family name, and ``الدین``, ``اله`` and ``اللہ`` read the same way; a name of two name words keeps them apart. ``Lexicon.add`` accepts a new kind, ``bound_second``, for such a word. :issue:`1072` diff --git a/tests/v2/cases.py b/tests/v2/cases.py index 66bb5ed03..2a35d6357 100644 --- a/tests/v2/cases.py +++ b/tests/v2/cases.py @@ -22930,4 +22930,86 @@ def _check_cjk_shape_purity(self) -> None: "nickname": "Jack"}, classification="fix(#1164)", notes="a title followed by another opens the trailing run"), + # #1380: the Lao script writes no initials (rules/R7, the + # script-property table's lao row), so a Lao letter with a full stop + # is a name word to the policy switches, as a Thai one is + Case("lao_letters_ending_a_name_are_no_initials_to_the_letters_switch", + "ສົມຊາຍ ໃຈດີ ສ. ດ.", + {"given": "ສົມຊາຍ", "middle": "ໃຈດີ ສ.", "family": "ດ."}, + policy=_LETTERS, classification="fix(#1380)", + notes="rules/O8 reads no Lao letter as an initial; 3.1.0 read " + "family 'ສ. ດ.', middle 'ໃຈດີ'"), + Case("lao_letter_between_two_name_words_joins_two_family_names", + "ສົມຊາຍ ສ. ໃຈດີ", + {"given": "ສົມຊາຍ", "family": "ສ. ໃຈດີ"}, + policy=_TWO, classification="fix(#1380)", + notes="rules/O6 takes a Lao letter as a name word, no middle " + "initial; 3.1.0 read middle 'ສ.', family 'ໃຈດີ'"), + Case("lao_title_written_short_keeps_its_shape", + "ດຣ. ສົມຊາຍ ໃຈດີ", + {"title": "ດຣ.", "given": "ສົມຊາຍ", "family": "ໃຈດີ"}, + notes="the lao row writes period abbreviations (#1380), so " + "rules/H2's shape still reads the title"), + # #1212: the Ukrainian Cyrillic patronymic endings under the East + # Slavic rule (rules/O1, R9) + Case("ru_pack_ukrainian_ivna", "Коваленко Олена Петрівна", + {"given": "Олена", "middle": "Петрівна", "family": "Коваленко"}, + views=(("patronymic", "Петрівна"),), + locale="ru", classification="fix(#1212)", + notes="2.0.0 through 3.1.0 read given 'Коваленко', family " + "'Петрівна'"), + Case("ru_pack_ukrainian_yivna", "Ткачук Ганна Сергіївна", + {"given": "Ганна", "middle": "Сергіївна", "family": "Ткачук"}, + views=(("patronymic", "Сергіївна"),), + locale="ru", classification="fix(#1212)"), + Case("ru_pack_ukrainian_yevych", "Бондар Василь Леонтієвич", + {"given": "Василь", "middle": "Леонтієвич", "family": "Бондар"}, + views=(("patronymic", "Леонтієвич"),), + locale="ru", classification="fix(#1212)"), + Case("ru_pack_ukrainian_illich", "Мельник Тарас Ілліч", + {"given": "Тарас", "middle": "Ілліч", "family": "Мельник"}, + views=(("patronymic", "Ілліч"),), + locale="ru", classification="fix(#1212)", + notes="an irregular ending nearly the whole word, matched " + "capitalized (re.I, AGENTS.md's Cyrillic gotcha)"), + Case("ru_pack_ukrainian_ending_in_capitals", "МЕЛЬНИК ТАРАС ІЛЛІЧ", + {"given": "ТАРАС", "middle": "ІЛЛІЧ", "family": "МЕЛЬНИК"}, + views=(("patronymic", "ІЛЛІЧ"),), + locale="ru", classification="fix(#1212)"), + Case("ru_pack_ukrainian_spoken_order_fills_the_view", + "Олена Сергіївна Ткачук", + {"given": "Олена", "middle": "Сергіївна", "family": "Ткачук"}, + views=(("patronymic", "Сергіївна"),), + locale="ru", classification="fix(#1212)", + notes="no rotation; the view, empty in 3.0.0 and 3.1.0, reads " + "the middle"), + Case("ru_pack_ukrainian_patronymic_before_an_yevych_surname", + "Олена Петрівна Гаєвич", + {"given": "Олена", "middle": "Петрівна", "family": "Гаєвич"}, + views=(("patronymic", "Петрівна"),), + locale="ru", classification="fix(#1212)", + notes="the false-reorder guard: a middle word carrying an ending " + "blocks rules/O1, so the surname with the ending stays " + "the family; only the view moved (empty in 3.0.0 and " + "3.1.0)"), + Case("ru_pack_ukrainian_yevych_surname_behind_two_given_names", + "Олена Марія Гаєвич", + {"given": "Марія", "middle": "Гаєвич", "family": "Олена"}, + views=(("patronymic", "Гаєвич"),), + locale="ru", classification="fix(#1212)", + notes="rules/O1's accepted cost, the twin of 'Анна Мария " + "Абрамович': the shape gives no sign the surname is one; " + "2.0.0 through 3.1.0 read family 'Гаєвич'"), + Case("ru_pack_belarusian_ending_is_not_read", + "Сокалаў Мікалай Іванавіч", + {"given": "Сокалаў", "middle": "Мікалай", "family": "Іванавіч"}, + locale="ru", + notes="the Belarusian endings stay out (decisions/R9's Open, " + "#1212)"), + Case("ru_pack_latin_ukrainian_ending_is_not_read", + "Tkachuk Olena Petrivna", + {"given": "Tkachuk", "middle": "Olena", "family": "Petrivna"}, + locale="ru", + notes="the Latin -ivna stays out with -ovych (decisions/R9's " + "Open, #1212)"), ) diff --git a/tools/differential/corpus_rules.jsonl b/tools/differential/corpus_rules.jsonl index 6d5f73980..65c5305d1 100644 --- a/tools/differential/corpus_rules.jsonl +++ b/tools/differential/corpus_rules.jsonl @@ -1429,6 +1429,7 @@ "Nour El Houda Haddou" "OTTO GRAF LAMBSDORFF" "Ole Simonsen, Dr.Med" +"Olena Serhiivna Tkachuk" "Ortega y Gasset III" "Ortega y Gasset VI" "Ortega y Gasset VI MD" @@ -1836,6 +1837,7 @@ "The Right Hon. the President of the Queen's Bench Division" "The Rt Hon Nadia Abdul Rahim" "The Saint Thomas More" +"Tkachuk Olena Petrivna" "Tom N/A Reed" "Torres Sánchez-Cid Andrés" "Treadwell, U.S. District Judge Marc" @@ -2064,7 +2066,9 @@ "ʻIOLANI KAMAKA" "ІВАН П'ЯТАК" "Агриппина Младшая" +"Алена Сяргееўна Ткачук" "Ана Хорват старији Џонс" +"Анна Мария Абрамович" "БЕЗУГЛА МАР'ЯНА" "Батын Сүхээ" "Бекмырза Чолпонбай уулу" @@ -2079,11 +2083,17 @@ "Иван Петрович Абрамович" "Ирина Б Зубкевич" "Ирина Б. Зубкевич" +"Коваленко Олена Петрівна" "ЛЮДМИЛА О'КОННОР" "Мар’яна Безугла" +"Мельник Тарас Ілліч" +"Олена Марія Гаєвич" +"Олена Петрівна Гаєвич" +"Олена Сергіївна Ткачук" "Питер Брейгель мл." "Сидоров И. Петрович" "Сидоров Иван Петрович" +"Сокалаў Мікалай Іванавіч" "Сүхээ" "Хосе И Мария Сантос" "Ц.Сандаг-Очир" @@ -2190,6 +2200,7 @@ "ใจดี, พล.ต.ต.สุรศักดิ์" "ใจดี, ว่าที่ร.ท.วินัย" "ດຣ. ສົມ" +"ສົມຊາຍ ໃຈດີ" "ကြည် ကြည် ဌေး" "ဌေး က. ခ." "ნ.ბ. MA" diff --git a/tools/differential/snapshot.jsonl b/tools/differential/snapshot.jsonl index d155f6298..66c40ec45 100644 --- a/tools/differential/snapshot.jsonl +++ b/tools/differential/snapshot.jsonl @@ -3510,6 +3510,7 @@ {"name": "Olabisi Adeboye", "given": "Olabisi", "family": "Adeboye", "initials": "O. A."} {"name": "Oldenburg-Januschau, Elard von", "given": "Elard", "family": "von Oldenburg-Januschau", "ambiguities": ["PARTICLE_OR_GIVEN"], "alternatives": ["PARTICLE_OR_GIVEN: name as middle (declared)"], "initials": "E. O."} {"name": "Ole Simonsen, Dr.Med", "title": "Dr.Med", "given": "Ole", "family": "Simonsen", "initials": "O. S."} +{"name": "Olena Serhiivna Tkachuk", "given": "Olena", "middle": "Serhiivna", "family": "Tkachuk", "initials": "O. S. T."} {"name": "Oranje-Nassau, Lodewijk van", "given": "Lodewijk", "family": "van Oranje-Nassau", "ambiguities": ["PARTICLE_OR_GIVEN"], "alternatives": ["PARTICLE_OR_GIVEN: name as middle (declared)"], "initials": "L. O."} {"name": "Orel Irena", "order": "FAMILY_FIRST", "given": "Irena", "family": "Orel", "initials": "I. O."} {"name": "Orel, Irena", "given": "Irena", "family": "Orel", "initials": "I. O."} @@ -4446,6 +4447,7 @@ {"name": "Tisza, István", "given": "István", "family": "Tisza", "initials": "I. T."} {"name": "Title First Middle Middle Last, Jr.", "given": "Title", "middle": "First Middle Middle", "family": "Last", "suffix": "Jr.", "initials": "T. F. M. M. L.", "generation": "Jr."} {"name": "Tito, Santi di", "given": "Santi", "family": "di Tito", "ambiguities": ["PARTICLE_OR_GIVEN"], "alternatives": ["PARTICLE_OR_GIVEN: name as middle (declared)"], "initials": "S. T."} +{"name": "Tkachuk Olena Petrivna", "given": "Tkachuk", "middle": "Olena", "family": "Petrivna", "initials": "T. O. P."} {"name": "Tn. Syed Abd Aziz Syed A Ismail Petra MP", "title": "Tn.", "given": "Syed", "middle": "Abd Aziz Syed A Ismail", "family": "Petra", "suffix": "MP", "initials": "S. A. A. S. A. I. P."} {"name": "Tokugawa, Nariaki", "given": "Nariaki", "family": "Tokugawa", "initials": "N. T."} {"name": "Toledo Osorio, Fadrique de", "given": "Fadrique", "family": "de Toledo Osorio", "initials": "F. T. O."} @@ -5338,6 +5340,7 @@ {"name": "Алексей Иванович Савельев", "given": "Алексей", "middle": "Иванович", "family": "Савельев", "initials": "А. И. С."} {"name": "Алексей Николаевич Плещеев", "given": "Алексей", "middle": "Николаевич", "family": "Плещеев", "initials": "А. Н. П."} {"name": "Алексей Семёнович Сечкин", "given": "Алексей", "middle": "Семёнович", "family": "Сечкин", "initials": "А. С. С."} +{"name": "Алена Сяргееўна Ткачук", "given": "Алена", "middle": "Сяргееўна", "family": "Ткачук", "initials": "А. С. Т."} {"name": "Алымбекова Каныкей", "order": "FAMILY_FIRST", "given": "Каныкей", "family": "Алымбекова", "initials": "К. А."} {"name": "Амосова Ирина", "order": "FAMILY_FIRST", "given": "Ирина", "family": "Амосова", "initials": "И. А."} {"name": "Амосова, Ирина", "given": "Ирина", "family": "Амосова", "initials": "И. А."} @@ -5354,6 +5357,7 @@ {"name": "Андрија Милошевић", "given": "Андрија", "family": "Милошевић", "initials": "А. М."} {"name": "Андрій Володимирович Бондар", "given": "Андрій", "middle": "Володимирович", "family": "Бондар", "initials": "А. В. Б."} {"name": "Андрій Володимирович Портнов", "given": "Андрій", "middle": "Володимирович", "family": "Портнов", "initials": "А. В. П."} +{"name": "Анна Мария Абрамович", "given": "Анна", "middle": "Мария", "family": "Абрамович", "initials": "А. М. А."} {"name": "Анна Мельник", "given": "Анна", "family": "Мельник", "initials": "А. М."} {"name": "Анна Николаевна Гладкова", "given": "Анна", "middle": "Николаевна", "family": "Гладкова", "initials": "А. Н. Г."} {"name": "Анна Сергеевна Курникова", "given": "Анна", "middle": "Сергеевна", "family": "Курникова", "initials": "А. С. К."} @@ -5576,6 +5580,7 @@ {"name": "Кетэ Мюлер", "given": "Кетэ", "family": "Мюлер", "initials": "К. М."} {"name": "Кирилл Афанасьевич Мерецков", "given": "Кирилл", "middle": "Афанасьевич", "family": "Мерецков", "initials": "К. А. М."} {"name": "Кислов, Александр Степанович", "given": "Александр", "middle": "Степанович", "family": "Кислов", "initials": "А. С. К."} +{"name": "Коваленко Олена Петрівна", "given": "Коваленко", "middle": "Олена", "family": "Петрівна", "initials": "К. О. П."} {"name": "Козловский, Фёдор Алексеевич", "given": "Фёдор", "middle": "Алексеевич", "family": "Козловский", "initials": "Ф. А. К."} {"name": "Колкутин, Андрей Борисович", "given": "Андрей", "middle": "Борисович", "family": "Колкутин", "initials": "А. Б. К."} {"name": "Комиссаров Геннадий Германович", "order": "FAMILY_FIRST", "given": "Геннадий", "middle": "Германович", "family": "Комиссаров", "initials": "Г. Г. К."} @@ -5625,6 +5630,7 @@ {"name": "Матвеев, Герман Иванович", "given": "Герман", "middle": "Иванович", "family": "Матвеев", "initials": "Г. И. М."} {"name": "Медведев, Николай Дмитриевич", "given": "Николай", "middle": "Дмитриевич", "family": "Медведев", "initials": "Н. Д. М."} {"name": "Мельник Анна", "order": "FAMILY_FIRST", "given": "Анна", "family": "Мельник", "initials": "А. М."} +{"name": "Мельник Тарас Ілліч", "given": "Мельник", "middle": "Тарас", "family": "Ілліч", "initials": "М. Т. І."} {"name": "Микола Козленко", "given": "Микола", "family": "Козленко", "initials": "М. К."} {"name": "Миленковић др Слађана Вера млађи, дипл. инж.", "order": "FAMILY_FIRST", "title": "дипл. инж.", "given": "др", "middle": "Слађана Вера", "family": "Миленковић", "suffix": "млађи", "initials": "д. С. В. М.", "capitalized_force": "Дипл. Инж. Миленковић Др Слађана Вера Млађи", "generation": "млађи"} {"name": "Миленковић, Слађана Вера", "given": "Слађана", "middle": "Вера", "family": "Миленковић", "initials": "С. В. М."} @@ -5703,6 +5709,9 @@ {"name": "Олександр Музичко", "given": "Олександр", "family": "Музичко", "initials": "О. М."} {"name": "Олександр Положинський", "given": "Олександр", "family": "Положинський", "initials": "О. П."} {"name": "Олексій Олексійович Гончаренко", "given": "Олексій", "middle": "Олексійович", "family": "Гончаренко", "initials": "О. О. Г."} +{"name": "Олена Марія Гаєвич", "given": "Олена", "middle": "Марія", "family": "Гаєвич", "initials": "О. М. Г."} +{"name": "Олена Петрівна Гаєвич", "given": "Олена", "middle": "Петрівна", "family": "Гаєвич", "initials": "О. П. Г."} +{"name": "Олена Сергіївна Ткачук", "given": "Олена", "middle": "Сергіївна", "family": "Ткачук", "initials": "О. С. Т."} {"name": "Олимпиада Ивановна Шмидт", "given": "Олимпиада", "middle": "Ивановна", "family": "Шмидт", "initials": "О. И. Ш."} {"name": "Ольга Игоревна Кабо", "given": "Ольга", "middle": "Игоревна", "family": "Кабо", "initials": "О. И. К."} {"name": "Ольга Рыпакова", "given": "Ольга", "family": "Рыпакова", "initials": "О. Р."} @@ -5776,6 +5785,7 @@ {"name": "Синиша Михајловић", "given": "Синиша", "family": "Михајловић", "initials": "С. М."} {"name": "Слуцкий, Леонид Эдуардович", "given": "Леонид", "middle": "Эдуардович", "family": "Слуцкий", "initials": "Л. Э. С."} {"name": "Смыслов, Василий Васильевич", "given": "Василий", "middle": "Васильевич", "family": "Смыслов", "initials": "В. В. С."} +{"name": "Сокалаў Мікалай Іванавіч", "given": "Сокалаў", "middle": "Мікалай", "family": "Іванавіч", "initials": "С. М. І."} {"name": "Сольский, Семён Мартынович", "given": "Семён", "middle": "Мартынович", "family": "Сольский", "initials": "С. М. С."} {"name": "Соња Петровић", "given": "Соња", "family": "Петровић", "initials": "С. П."} {"name": "Срђан Новаковић", "given": "Срђан", "family": "Новаковић", "initials": "С. Н."} @@ -6957,29 +6967,30 @@ {"name": "ใจดี, พล.ต.ต.สุรศักดิ์", "title": "พล.ต.ต.", "given": "สุรศักดิ์", "family": "ใจดี"} {"name": "ใจดี, ว่าที่ร.ท.วินัย", "title": "ว่าที่ร.ท.", "given": "วินัย", "family": "ใจดี"} {"name": "ไอริณ กล้าหาญ", "given": "ไอริณ", "family": "กล้าหาญ"} -{"name": "ຄຳຫຼ້າ", "given": "ຄຳຫຼ້າ", "ambiguities": ["GIVEN_OR_FAMILY"], "alternatives": ["GIVEN_OR_FAMILY: name as family (position)"], "initials": "ຄ."} -{"name": "ຄຳຫຼ້າ", "order": "FAMILY_FIRST", "given": "ຄຳຫຼ້າ", "ambiguities": ["GIVEN_OR_FAMILY"], "alternatives": ["GIVEN_OR_FAMILY: name as family (position)"], "initials": "ຄ."} -{"name": "ຊາຊິເລຍ ຮາມີສ ສໂຕເບີ", "given": "ຊາຊິເລຍ", "middle": "ຮາມີສ", "family": "ສໂຕເບີ", "initials": "ຊ. ຮ. ສ."} -{"name": "ຊິນແບດ", "given": "ຊິນແບດ", "ambiguities": ["GIVEN_OR_FAMILY"], "alternatives": ["GIVEN_OR_FAMILY: name as family (position)"], "initials": "ຊ."} -{"name": "ຊິນແບດ", "order": "FAMILY_FIRST", "given": "ຊິນແບດ", "ambiguities": ["GIVEN_OR_FAMILY"], "alternatives": ["GIVEN_OR_FAMILY: name as family (position)"], "initials": "ຊ."} -{"name": "ດຣ. ປອ. ວອນ ບຣູລ ສຈ. ປອ. ເອດາ ຄໍນີເລຍ ເຊຊາ ມາຕິນ ຮຸ່ນລູກ", "order": "FAMILY_FIRST", "title": "ດຣ. ປອ.", "given": "ບຣູລ", "middle": "ສຈ. ປອ. ເອດາ ຄໍນີເລຍ ເຊຊາ ມາຕິນ ຮຸ່ນລູກ", "family": "ວອນ", "initials": "ບ. ສ. ປ. ເ. ຄ. ເ. ມ. ຮ. ວ."} -{"name": "ດຣ. ປອ. ສຈ. ປອ. ເອດາ ຄໍນີເລຍ ເຊຊາ ມາຕິນ ວອນ ບຣູລ ຮຸ່ນລູກ", "title": "ດຣ. ປອ. ສຈ. ປອ.", "given": "ເອດາ", "middle": "ຄໍນີເລຍ ເຊຊາ ມາຕິນ ວອນ ບຣູລ", "family": "ຮຸ່ນລູກ", "initials": "ເ. ຄ. ເ. ມ. ວ. ບ. ຮ."} -{"name": "ດຣ. ສົມ", "title": "ດຣ.", "family": "ສົມ", "initials": "ສ."} -{"name": "ນາລິນ ເອກະພົນ", "given": "ນາລິນ", "family": "ເອກະພົນ", "initials": "ນ. ເ."} -{"name": "ບຣູລ, ເອດາ ຄໍນີເລຍ ເຊຊາ ມາຕິນ ວອນ", "given": "ເອດາ", "middle": "ຄໍນີເລຍ ເຊຊາ ມາຕິນ ວອນ", "family": "ບຣູລ", "initials": "ເ. ຄ. ເ. ມ. ວ. ບ."} -{"name": "ມະນີ ມະນີຈັນ ວັດທະນາ", "given": "ມະນີ", "middle": "ມະນີຈັນ", "family": "ວັດທະນາ", "initials": "ມ. ມ. ວ."} -{"name": "ມູລເລີ ເຄທີ", "order": "FAMILY_FIRST", "given": "ເຄທີ", "family": "ມູລເລີ", "initials": "ເ. ມ."} -{"name": "ມູລເລີ, ເຄທີ", "given": "ເຄທີ", "family": "ມູລເລີ", "initials": "ເ. ມ."} -{"name": "ວັດທະນາ ມະນີ ມະນີຈັນ", "order": "FAMILY_FIRST", "given": "ມະນີ", "middle": "ມະນີຈັນ", "family": "ວັດທະນາ", "initials": "ມ. ມ. ວ."} -{"name": "ວັດທະນາ, ມະນີ ມະນີຈັນ", "given": "ມະນີ", "middle": "ມະນີຈັນ", "family": "ວັດທະນາ", "initials": "ມ. ມ. ວ."} -{"name": "ວູສເຕີ, ເບີແທຣັມ ວິວເບີຟອດຊ ເຮັນຣີ ໂຣເບີດ", "given": "ເບີແທຣັມ", "middle": "ວິວເບີຟອດຊ ເຮັນຣີ ໂຣເບີດ", "family": "ວູສເຕີ", "initials": "ເ. ວ. ເ. ໂ. ວ."} -{"name": "ສ.ສ. ທ. ເບີແທຣັມ ວິວເບີຟອດຊ ເຮັນຣີ ໂຣເບີດ ວູສເຕີ ຮຸ່ນລູກ", "given": "ສ.ສ.", "middle": "ທ. ເບີແທຣັມ ວິວເບີຟອດຊ ເຮັນຣີ ໂຣເບີດ ວູສເຕີ", "family": "ຮຸ່ນລູກ", "initials": "ສ. ທ. ເ. ວ. ເ. ໂ. ວ. ຮ."} -{"name": "ສ.ສ. ວູສເຕີ ທ. ເບີແທຣັມ ວິວເບີຟອດຊ ເຮັນຣີ ໂຣເບີດ ຮຸ່ນລູກ", "order": "FAMILY_FIRST", "given": "ວູສເຕີ", "middle": "ທ. ເບີແທຣັມ ວິວເບີຟອດຊ ເຮັນຣີ ໂຣເບີດ ຮຸ່ນລູກ", "family": "ສ.ສ.", "initials": "ວ. ທ. ເ. ວ. ເ. ໂ. ຮ. ສ."} -{"name": "ສໂຕເບີ ຊາຊິເລຍ ຮາມີສ", "order": "FAMILY_FIRST", "given": "ຊາຊິເລຍ", "middle": "ຮາມີສ", "family": "ສໂຕເບີ", "initials": "ຊ. ຮ. ສ."} -{"name": "ສໂຕເບີ, ຊາຊິເລຍ ຮາມີສ", "given": "ຊາຊິເລຍ", "middle": "ຮາມີສ", "family": "ສໂຕເບີ", "initials": "ຊ. ຮ. ສ."} -{"name": "ເຄທີ ມູລເລີ", "given": "ເຄທີ", "family": "ມູລເລີ", "initials": "ເ. ມ."} -{"name": "ເອກະພົນ ນາລິນ", "order": "FAMILY_FIRST", "given": "ນາລິນ", "family": "ເອກະພົນ", "initials": "ນ. ເ."} -{"name": "ເອກະພົນ, ນາລິນ", "given": "ນາລິນ", "family": "ເອກະພົນ", "initials": "ນ. ເ."} +{"name": "ຄຳຫຼ້າ", "given": "ຄຳຫຼ້າ", "ambiguities": ["GIVEN_OR_FAMILY"], "alternatives": ["GIVEN_OR_FAMILY: name as family (position)"]} +{"name": "ຄຳຫຼ້າ", "order": "FAMILY_FIRST", "given": "ຄຳຫຼ້າ", "ambiguities": ["GIVEN_OR_FAMILY"], "alternatives": ["GIVEN_OR_FAMILY: name as family (position)"]} +{"name": "ຊາຊິເລຍ ຮາມີສ ສໂຕເບີ", "given": "ຊາຊິເລຍ", "middle": "ຮາມີສ", "family": "ສໂຕເບີ"} +{"name": "ຊິນແບດ", "given": "ຊິນແບດ", "ambiguities": ["GIVEN_OR_FAMILY"], "alternatives": ["GIVEN_OR_FAMILY: name as family (position)"]} +{"name": "ຊິນແບດ", "order": "FAMILY_FIRST", "given": "ຊິນແບດ", "ambiguities": ["GIVEN_OR_FAMILY"], "alternatives": ["GIVEN_OR_FAMILY: name as family (position)"]} +{"name": "ດຣ. ປອ. ວອນ ບຣູລ ສຈ. ປອ. ເອດາ ຄໍນີເລຍ ເຊຊາ ມາຕິນ ຮຸ່ນລູກ", "order": "FAMILY_FIRST", "title": "ດຣ. ປອ.", "given": "ບຣູລ", "middle": "ສຈ. ປອ. ເອດາ ຄໍນີເລຍ ເຊຊາ ມາຕິນ ຮຸ່ນລູກ", "family": "ວອນ"} +{"name": "ດຣ. ປອ. ສຈ. ປອ. ເອດາ ຄໍນີເລຍ ເຊຊາ ມາຕິນ ວອນ ບຣູລ ຮຸ່ນລູກ", "title": "ດຣ. ປອ. ສຈ. ປອ.", "given": "ເອດາ", "middle": "ຄໍນີເລຍ ເຊຊາ ມາຕິນ ວອນ ບຣູລ", "family": "ຮຸ່ນລູກ"} +{"name": "ດຣ. ສົມ", "title": "ດຣ.", "family": "ສົມ"} +{"name": "ນາລິນ ເອກະພົນ", "given": "ນາລິນ", "family": "ເອກະພົນ"} +{"name": "ບຣູລ, ເອດາ ຄໍນີເລຍ ເຊຊາ ມາຕິນ ວອນ", "given": "ເອດາ", "middle": "ຄໍນີເລຍ ເຊຊາ ມາຕິນ ວອນ", "family": "ບຣູລ"} +{"name": "ມະນີ ມະນີຈັນ ວັດທະນາ", "given": "ມະນີ", "middle": "ມະນີຈັນ", "family": "ວັດທະນາ"} +{"name": "ມູລເລີ ເຄທີ", "order": "FAMILY_FIRST", "given": "ເຄທີ", "family": "ມູລເລີ"} +{"name": "ມູລເລີ, ເຄທີ", "given": "ເຄທີ", "family": "ມູລເລີ"} +{"name": "ວັດທະນາ ມະນີ ມະນີຈັນ", "order": "FAMILY_FIRST", "given": "ມະນີ", "middle": "ມະນີຈັນ", "family": "ວັດທະນາ"} +{"name": "ວັດທະນາ, ມະນີ ມະນີຈັນ", "given": "ມະນີ", "middle": "ມະນີຈັນ", "family": "ວັດທະນາ"} +{"name": "ວູສເຕີ, ເບີແທຣັມ ວິວເບີຟອດຊ ເຮັນຣີ ໂຣເບີດ", "given": "ເບີແທຣັມ", "middle": "ວິວເບີຟອດຊ ເຮັນຣີ ໂຣເບີດ", "family": "ວູສເຕີ"} +{"name": "ສ.ສ. ທ. ເບີແທຣັມ ວິວເບີຟອດຊ ເຮັນຣີ ໂຣເບີດ ວູສເຕີ ຮຸ່ນລູກ", "given": "ສ.ສ.", "middle": "ທ. ເບີແທຣັມ ວິວເບີຟອດຊ ເຮັນຣີ ໂຣເບີດ ວູສເຕີ", "family": "ຮຸ່ນລູກ"} +{"name": "ສ.ສ. ວູສເຕີ ທ. ເບີແທຣັມ ວິວເບີຟອດຊ ເຮັນຣີ ໂຣເບີດ ຮຸ່ນລູກ", "order": "FAMILY_FIRST", "given": "ວູສເຕີ", "middle": "ທ. ເບີແທຣັມ ວິວເບີຟອດຊ ເຮັນຣີ ໂຣເບີດ ຮຸ່ນລູກ", "family": "ສ.ສ."} +{"name": "ສົມຊາຍ ໃຈດີ", "given": "ສົມຊາຍ", "family": "ໃຈດີ"} +{"name": "ສໂຕເບີ ຊາຊິເລຍ ຮາມີສ", "order": "FAMILY_FIRST", "given": "ຊາຊິເລຍ", "middle": "ຮາມີສ", "family": "ສໂຕເບີ"} +{"name": "ສໂຕເບີ, ຊາຊິເລຍ ຮາມີສ", "given": "ຊາຊິເລຍ", "middle": "ຮາມີສ", "family": "ສໂຕເບີ"} +{"name": "ເຄທີ ມູລເລີ", "given": "ເຄທີ", "family": "ມູລເລີ"} +{"name": "ເອກະພົນ ນາລິນ", "order": "FAMILY_FIRST", "given": "ນາລິນ", "family": "ເອກະພົນ"} +{"name": "ເອກະພົນ, ນາລິນ", "given": "ນາລິນ", "family": "ເອກະພົນ"} {"name": "ကက်သီ မူလာ", "given": "ကက်သီ", "family": "မူလာ"} {"name": "ကြည် ကြည် ဌေး", "given": "ကြည်", "middle": "ကြည်", "family": "ဌေး"} {"name": "စတိုဘာ ဇာဇီလာ ဟာမစ်ရှ်", "order": "FAMILY_FIRST", "given": "ဇာဇီလာ", "middle": "ဟာမစ်ရှ်", "family": "စတိုဘာ"} From 62128eda217d585a43bc5d4f5964452b4043b136 Mon Sep 17 00:00:00 2001 From: Derek Gulbranson Date: Fri, 20 Nov 2026 16:08:31 -0800 Subject: [PATCH 4/5] =?UTF-8?q?Read=20a=20decomposed=20=D1=97=20in=20the?= =?UTF-8?q?=20patronymic=20endings,=20and=20pin=20and=20record=20the=20mov?= =?UTF-8?q?es=20review=20found=20(#1212,=20#1380)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit has_patronymic_ending and the RU pack's DEVIATES compose the word first, as the Turkic marker test does (#1316), so -ївна written with a combining diaeresis reads. Rows for it, the comma shapes and the rule without the pack; suggester and name-match rows for Lao beside Thai, Burmese and Arabic, and for the Ukrainian endings; the Lao row's match, report and suggester moves recorded in decisions/script-properties and group-suggestion, H2's script list, the release log and migrate.rst. Co-Authored-By: Claude Opus 5.5 --- .../H2-leading-abbreviation-title.md | 2 +- .../decisions/O1-east-slavic-rotation.md | 3 +- docs/design/decisions/R9-patronymic-view.md | 2 +- docs/design/decisions/group-suggestion.md | 2 + docs/design/decisions/script-properties.md | 4 +- docs/design/rules/O1-east-slavic-rotation.md | 2 +- docs/languages.rst | 2 +- docs/migrate.rst | 8 ++-- docs/release_log.rst | 4 +- nameparser/_pipeline/_vocab.py | 15 +++++-- nameparser/locales/ru.py | 13 +++--- tests/v2/cases.py | 40 ++++++++++++++++++- tests/v2/test_locales.py | 10 +++++ tests/v2/test_match.py | 15 +++++++ tests/v2/test_script_properties.py | 3 +- tests/v2/test_suggest.py | 14 +++++++ 16 files changed, 115 insertions(+), 24 deletions(-) diff --git a/docs/design/decisions/H2-leading-abbreviation-title.md b/docs/design/decisions/H2-leading-abbreviation-title.md index 7e5b27553..9c04dfddf 100644 --- a/docs/design/decisions/H2-leading-abbreviation-title.md +++ b/docs/design/decisions/H2-leading-abbreviation-title.md @@ -5,7 +5,7 @@ - An abbreviation of two or more letters ending in its one period, opening the part that carries the given name (the whole name, or the part after a family comma), is a title even unlisted and even where it is suffix vocabulary, and a single-letter initial is not: `Insp. Jane Morse` → title 'Insp.', `Morse, Det. Insp. Jane` → title 'Det. Insp.', `Esq. Smith` → title 'Esq.', `J. Smith` → given 'J.' — 2026-06-30 #288. - The shape is an unbroken run of letters, so an unlisted abugida abbreviation written with a vowel sign stays a name word and only vocabulary recognizes it — 2026-06-30 #288 (the run was the whole cause until 2026-11-08 #1191, below, found the word with no sign). - The shape declines a period-marked word carrying a letter of the ten Brahmic scripts from Devanagari to Sinhala (U+0900 to U+0DFF), an Except of rules/H2, so a Latin initial spelled there with no vowel sign is no title: `एम. एस. वर्मा` → given 'एम.', middle 'एस.' — 2026-11-08 #1191. -- The shape declines a period-marked word carrying a script that writes no period abbreviations (Han, kana, hangul; Thai, Burmese and the Arabic script write no initials but are not among them, decisions/script-properties): `田中. 太郎` → family '田中.', where `Smith. John` keeps title 'Smith.' — 2026-09-10. +- The shape declines a period-marked word carrying a script that writes no period abbreviations (Han, kana, hangul; Thai, Burmese, Lao and the Arabic script write no initials but are not among them, decisions/script-properties): `田中. 太郎` → family '田中.', where `Smith. John` keeps title 'Smith.' — 2026-09-10. - C13 wins for a credential opening the part after a family comma (`Smith, Esq. John` → suffix 'Esq. John'), and the shape still reads a title there for a word that starts no S8 run (`Smith, Insp. John`, `Smith, Do. John` → title) — 2026-10-20 #761; its `Smith, Ma. John` example moved to the given name on 2026-10-26 #789. - A given name written short outranks the shape: a word the vocabulary lists with a `given` reading whose `same_as` is the full name, period-marked where the shape would fire, is the given name and the name reads as it would with the full name there (`Chas. Smith` → given 'Chas.', `Mrs Ma. Liza Cruz` → title 'Mrs', given 'Ma.'). The shipped set is the traditional English abbreviations, the Filipino `ma` and `jo`, since #1115 Muhammad, Achmad and Francisco written short (`mohd`, `mhd`, `muh`, `moh`, `moch`, `ach`, `fco`; decisions/H6's 2026-11-06 entry), Sheikh written short (`sk`, #1129) and since #1383 `md`; a listed title still wins — 2026-10-26 #789. - A transliteration digraph declines the shape, an Except of rules/H2: the Latin spellings of one Cyrillic letter that are no title in any corpus read, `Yu`, `Ya`, `Ye`, `Yo`, `Zh`, `Kh`, `Shch` and `Dzh`, in any case, so `Yu. A. Chibrikova` → given 'Yu.', middle 'A.', as `Ю. А. Чибрикова` reads; `Ts`, `Ch` and `Sh`, each also a title written short, keep the shape, and a digraph of another alphabet or a Latin given name written short (`Th.`) is outside the set — 2026-11-09 #1136. diff --git a/docs/design/decisions/O1-east-slavic-rotation.md b/docs/design/decisions/O1-east-slavic-rotation.md index e91570b01..a1dbb8f29 100644 --- a/docs/design/decisions/O1-east-slavic-rotation.md +++ b/docs/design/decisions/O1-east-slavic-rotation.md @@ -27,8 +27,9 @@ Open: none in this file. - 2026-11-08 #1185 (the first-word guard and its tag test from #1217, an outside contribution) — an initial in the first or the middle of the three name words blocks the rotation, the initial read as T5 and T4 read one: a one-letter word with its period, a bare unaccented Latin capital, and in a name written wholly in one case a bare lower-case letter (`roman a abramovich`). The test reads classify's `initial` tag, which carries both rules' reading, so a one-case name's two spellings read alike. Two drafts read otherwise, each found by review: the first read the word's text alone and missed the lower-case spellings, and the second read the text beside the tag, whose text arm decided one input only, a bare capital `Y` that P8 reads as a connective, first or in the middle, blocking `SIDOROV Y PETROVICH` and `Y IVAN PETROVICH` while their lower-case spellings rotated. Before it, a surname ending like a patronymic was rotated out of the family wherever initials came before it: `И. Б. Зубкевич` under `locales.RU` read family 'И.', given 'Б.', middle 'Зубкевич', and `Ирина Б. Зубкевич` and `Roman A. Abramovich` read family 'Ирина' and 'Roman', where the default parser reads each right. The first-word half follows from the rotation's own premise: it restores a family-first listing, and a family name is not written as an initial. The middle-word half is a fork the shape cannot settle — `Ирина Б. Зубкевич` (given, initial, surname) and `Сидоров И. Петрович` (surname, initial, patronymic) are one shape, and only knowing which `-ович` word is a surname tells them apart — so it was decided by which writing occurs. The issue measured (2026-11-08) the State Duma's eight convocations and the Federation Council, 2,423 three-word names: 16 surnames (0.7%) end like a patronymic, and composed as `Имя Б. Фамилия` 0 of the 16 read right under the pack; its comment measured the Verkhovna Rada, 35 of 1,587 surnames (2.2%), 0 of 35 right in `И. Б. Фамилия`, and 6 ORCID names from Ukraine breaking in the `Имя Б. Фамилия` shape once Latin `-ovych` endings are simulated. The other writing was looked for and not found. Recipe: parse every name of every `tools/differential/local_corpora.py` corpus but ORCID, PatentsView and FEC (whose names are composed from fields) under `parser_for(locales.RU)` with this change and on master 51d36a31, and list the names whose given, middle or family moved: 11 move on 2026-11-08, every one a given name, a middle initial and a surname (`Viktor F Yanukovich`, `Vladimir B Grinevich`, `ACACIO T GUBEROVICH`), none a family-first listing; all 11 are Latin, the corpora holding no Cyrillic name of the shape with an initial, which says more about the corpora than about the shape. A Russian family-first listing that writes the given name as an initial writes the patronymic as one too (`Сидоров И. П.`), which O1 never reaches. The cost, `Сидоров И. Петрович` reading family 'Петрович', also empties the patronymic view, which read 'Петрович' before: R9's East Slavic arm reads the middle only. A bare Cyrillic capital is no initial by T5, so `Ирина Б Зубкевич` still rotates to family 'Ирина', as it reads that letter a name word everywhere; that is T5's question, not this one's. Recording an ambiguity on the middle-initial shape was weighed and not taken: no reader of `Ирина Б. Зубкевич` hesitates. `locales/ru.py`'s `DEVIATES` is left as it was: it over-declares, the safe direction for the non-interference gate, and the surface shrank. - 2026-11-20 #1212 — THE UKRAINIAN CYRILLIC ENDINGS. The women's `-івна` and `-ївна`, the soft `-євич` and the irregular `Ілліч` join the endings `_vocab._EAST_SLAVIC_CYR` lists (and `locales/ru.py`'s declared copy), the Ukrainian men's `-ович` and `-йович` being the Russian spelling and read already. Before, a Ukrainian woman's name written family-first under `locales.RU` read the patronymic as the family name (`Коваленко Олена Петрівна` → given 'Коваленко', family 'Петрівна'). MEASURED on the Verkhovna Rada's deputies (`opensanctions-parliaments`, `--group ua_rada`, 1,598 names, written surname, given name, patronymic) with `config_diff.py diff default plain:RU --local opensanctions-parliaments --group ua_rada --readings ` in a checkout of master cb5088a9 and in the branch, the two files compared line by line: plain:RU moves 1,367 names from the default at cb5088a9 and 1,596 here. The 229 the change moves are all read right (family the first word, given the second, middle and patronymic the third), 150 `-івна`, 69 `-ївна`, 5 `Ілліч` and 5 `-євич`; none read right before and wrong after; every three-word name of the 1,598 now reads right under plain:RU, and the 2 others are not of three words. (#1212 counted 209 women on 2026-11-08, a smaller fetch.) - THE GROUP SUGGESTER, whose patronymic signals read the same endings: `suggest_measure.py --base ` moves 3 cells, `ua_rada` under each of the three bases, its votes rising (family-first 1,366 → 1,585 of 1,588, the East Slavic rule 1,367 → 1,586) and its suggestion unchanged (family-first, the rule on); no drawn group of any size moves, so no figure `Parser.suggest`'s docstring, docs/suggest.rst or decisions/group-suggestion quotes moves; the `ua_rada` counts in that file's dated entries stand as measured then. + THE GROUP SUGGESTER, whose patronymic signals read the same endings: `suggest_measure.py --base ` moves 3 cells, `ua_rada` under each of the three bases, its votes rising (family-first 1,366 → 1,585 of 1,588, the East Slavic rule 1,367 → 1,586) and its suggestion unchanged (family-first, the rule on); no drawn group of any size moves, the draws holding no Ukrainian list, so no figure `Parser.suggest`'s docstring, docs/suggest.rst or decisions/group-suggestion quotes moves, though a list of Ukrainian names with these endings now suggests the rule and the order (six invented ones written family-first, `Коваленко Олена Петрівна` among them: `PolicyPatch(name_order=FAMILY_FIRST, patronymic_rules={EAST_SLAVIC})`, where master suggested nothing); the `ua_rada` counts in that file's dated entries stand as measured then. ACCEPTED, the surname cost the Russian endings already carry: a name in the spoken order with two given names and a surname ending in `-євич` rotates (`Олена Марія Гаєвич` → family 'Олена'), as `Анна Мария Абрамович` does with `-евич`; a middle word carrying an ending still blocks it (`Олена Петрівна Гаєвич` keeps family 'Гаєвич'). Left out, as #1212's own measurement found them costly or unmeasured: the Belarusian endings (`-авіч`, `-евіч`, `-овіч`, `-аўна`, `-еўна`, `-оўна`; 859 of the 8,231 Belarusian names it read end their surname in `-овіч` or `-евіч`, out of O1's reach today only for their spelling, which a Belarusian pack could answer), the Latin `-ivna`, `-ovych` and `-evych` (1,688 ORCID family boxes from Ukraine end in `-ovych` or `-evych`, #1185's collision), and the irregular `Хомич` and `Савич`, which are common surnames and were not measured. The Latin `Illich` is left out with the Latin endings. + THE REVIEW found the decomposed `ї` (і and U+0308, the first letter of an ending that decomposes) unread, the predicate matching the word as written: `has_patronymic_ending` and `locales/ru.py`'s `DEVIATES` now compose it first, as #1316 made the Turkic marker test do, with case rows in both cases and a `DEVIATES` test. Declined: diff --git a/docs/design/decisions/R9-patronymic-view.md b/docs/design/decisions/R9-patronymic-view.md index 485ea4762..ddb5354cc 100644 --- a/docs/design/decisions/R9-patronymic-view.md +++ b/docs/design/decisions/R9-patronymic-view.md @@ -9,7 +9,7 @@ Elsewhere: why the view leaves `family` and `middle` as they are, and the fielded-corpora measurements behind it, decisions/vocabulary-model's 2026-10-28 #754 entry, item 3; the rotations the two ending rules are named for, decisions/O1 and decisions/O2; the `clan`/`patronymic` line in the particle kinds, decisions/vocabulary-model's 2026-10-19 #749 entry; a father's name nothing in the text marks, which fills no view, and a view that overlaps the family, decisions/family-without-an-inherited-name. -Open: the Icelandic ending rule, which an `is` pack would turn on (the RFC's work order: 3b, 4c and 4f); whether the East Slavic endings should take the Belarusian spellings (`-авіч`, `-аўна`) and the Latin `-ivna`/`-ovych` of the Ukrainian ones, which would move O1's rotation too ([#1212](https://github.com/derek73/python-nameparser/issues/1212); the Ukrainian Cyrillic endings are read since 2026-11-20, decisions/O1). Whether `a/k`, written once among Malaysia's election candidates for `anak`, and `a/l` written spaced (`A / L`), which no list measured writes, should read as `a/l` does (#1468); India's and Pakistan's `S/O`, `D/O` and `W/O`, which name a parent or a husband outside the legal name (#1165). +Open: the Icelandic ending rule, which an `is` pack would turn on (the RFC's work order: 3b, 4c and 4f); whether the East Slavic endings should take the Belarusian spellings (`-авіч`, `-аўна`) and the Latin `-ivna`/`-ovych` of the Ukrainian ones, which would move O1's rotation too ([#1212](https://github.com/derek73/python-nameparser/issues/1212); the Ukrainian Cyrillic endings are read since 2026-11-20, decisions/O1); and a Ukrainian ending typed with a Latin `i` in a Cyrillic word (`Петрiвна`), which is not read. Whether `a/k`, written once among Malaysia's election candidates for `anak`, and `a/l` written spaced (`A / L`), which no list measured writes, should read as `a/l` does (#1468); India's and Pakistan's `S/O`, `D/O` and `W/O`, which name a parent or a husband outside the legal name (#1165). ## Log diff --git a/docs/design/decisions/group-suggestion.md b/docs/design/decisions/group-suggestion.md index beb3ba5ae..6cdf51844 100644 --- a/docs/design/decisions/group-suggestion.md +++ b/docs/design/decisions/group-suggestion.md @@ -30,6 +30,7 @@ - That rule's reach as implemented, the opening word standing alone: a run of capitals words in front votes as before, whatever its first word (`DE SOUZA Maria`) — 2026-11-14 #1355. - A name word in a script that writes no initials followed by a letter of it casts no trailing-initial vote, since no byline writes such a name before an initial, as rules/T5 and the order report read it: a group of Thai or Burmese names, each a word and a letter, suggests nothing — 2026-11-12 #1256. - A group of Arabic-script names, each a word and a letter, casts no trailing-initial vote either, the Arabic script writing no initials (decisions/script-properties) — 2026-11-19 #1149. +- A group of Lao names, each a word and a letter, casts no trailing-initial vote, as Thai does (decisions/script-properties) — 2026-11-20 #1380. - A caller with a large list is told a sample of a few hundred names from each source is enough: nearly every kind of list measured is read right from 200 names, a longer list is rarely better (bylines written given first under a family-first base are the one kind measured that kept improving), and since the 1% floor no list measured in its base's own order is read worse at 2,000 names — 2026-11-16 #1442, 2026-11-16 ORDER FLOOR. Open: the other four settings count their shares among the names with evidence on them, never the group, so a few stray names decide `patronymic_rules`, `initials_as_family`, `capitals_as_family` or `two_family_names` (whose share is of the names the switch would change) in a long silent list (2026-11-16 ORDER FLOOR, its bullet on the other settings; 2026-11-19 #1452); no measured population moves on any of them, and no issue is filed. Suggesting `two_family_names` for Portuguese and Brazilian lists (the switch reading Brazil's ORCID holders better and its PatentsView inventors worse), and for the countries #1452 left out (Croatia, Slovenia, Iran, DR Congo, Cameroon), whose ORCID holders' names the bare switch reads better and their PatentsView inventors' a little worse, is open (2026-11-19 #1452, its Open bullet). A group gate for the short capitals words, under which one votes where another name of the list writes a longer capitals word at the same end, measured and not taken for 3.1 (2026-11-14 #1355, its Declined bullet), to weigh beside #1402, which was decided 2026-11-19, left as it reads (decisions/O9). For a list mixing East Slavic and Turkic patronymics (uz_senate, kz_senate), suggesting both rules, and reading the Kazakh `-uly` and `-kyzy` endings as a Turkic signal, are not taken for 3.1 and not decided against (2026-11-15 #1356, its Not taken bullet). `_MIN_PATRONYMIC_VOTES`, five names, was set to keep small Russian groups written family first from moving a family-first base to given-first (2026-11-10 THRESHOLDS); since 2026-11-15 #1356 a `FAMILY_FIRST` base keeps its order on such a group, and that entry measured what relaxing the count did then: no same-order cell moved, and groups written given-first moved a family-first base sooner; since 2026-11-19 #1447 two names written given first decide given-first by their position votes without the rule, so that measurement predates the vote and is not re-taken. The threshold is unchanged and has no issue. #1308, the tracking issue, is closed; its other open item, the given names the given-name table's family-share filter drops, was #1357, settled for `John`, `David` and `Robert` by 2026-11-15 #1357, which leaves `James`, `Paul`, `George`, `Charles`, `Thomas` and `Martin` out. #1364's ORCID surname table at a given-box share of 12%, which helps Portuguese and Brazilian lists written given first and costs those written family first at 10 and 20 names, and which would also add Portuguese surnames to the `two_family_names` vote, and so could reach Lusophone lists the switch costs (Angola, Mozambique; 2026-11-19 #1452; not measured) as well as Brazil and Portugal, so it is measured on that setting's rows too, and the census table for English it held, are open (2026-11-19 #1364, its Declined and Open bullets; 2026-11-15 #1357 holds what a gate measured for the census table); so is the cost that table's `pv-listed-given` shows, English given names ORCID's holders rarely type as one (`Cooper`, `Burke`). Not measured, and without an issue: the table's 20-use floor (`MIN_USES`), and a family share between 10% and 15%. @@ -559,3 +560,4 @@ Open: the other four settings count their shares among the names with evidence o - Declined: the shared-surname signal (above); a share above 0.3 (above); a veto inside `suggest` on a list a pack would read better, the issue deciding the bare switch. - Open: Portuguese and Brazilian lists, which the switch reads better on ORCID (Brazilian inventors on PatentsView worse) and nothing proposed here reaches without bringing Pakistani and Bangladeshi lists with it; the countries left out, whose ORCID holders' names the switch reads better too and their PatentsView inventors' a little worse (HR, SI, IR, CD, CM above); `middle_as_family` and `two_given_names` as suggested settings, each a later issue. - 2026-11-19 #1149 — ARABIC LETTERS ARE NO INITIALS TO THE TRAILING-INITIAL VOTE. The script-property table's Arabic row writes no initials (decisions/script-properties), and the vote reads `_vocab.is_initial`, so five Arabic-script names each a word and a letter, which suggested `name_order=FAMILY_FIRST` by five trailing-initial votes on master, suggest nothing. `tools/differential/suggest_measure.py --base ` moves no cell of its populations, which hold no such group. +- 2026-11-20 #1380 — LAO LETTERS ARE NO INITIALS TO THE TRAILING-INITIAL VOTE. The script-property table's Lao row (decisions/script-properties) writes no initials, and the vote reads the same predicate, so a Lao name word followed by a letter casts none: five invented names written so (`ສົມຊາຍ ສ.`, `ບຸນມີ ຄ.` and three more) suggested `FAMILY_FIRST` at master cb5088a9 by five trailing-initial votes and suggest nothing now, as the Thai and Burmese groups have since 2026-11-12. `suggest_measure.py --base` moves no Lao cell, its populations holding no Lao names; the per-name row is in tests/v2/test_suggest.py beside the Thai, Burmese and Arabic ones. diff --git a/docs/design/decisions/script-properties.md b/docs/design/decisions/script-properties.md index 1f7e22210..db8cf03f7 100644 --- a/docs/design/decisions/script-properties.md +++ b/docs/design/decisions/script-properties.md @@ -88,5 +88,5 @@ The ja, ko, th and ru counts are 2026-08-02's (#320) too. | km | 42 | 8 | inherited | 40, and all 8 with an initial | `lo`'s block is its own: the 8 patterns not equal to `en`'s are the ones where `en` writes an initial or puts the credentials after the name, and in each of the 6 where `en`'s uses an initial `lo` writes the name in full (`{given} {given2} {surname}` for `en`'s `{given-initial}{given2-initial} {surname}`). `km` is a copy in every pattern that uses an initial, so it states nothing about Khmer. Lao writes a title short with a period (`ດຣ.`, doctor), so the row's `period_abbreviations` holds and H2's shape reads such a title as before. - - **What the row moves.** `initials()` gives nothing for a word in Lao, where 1.4.0 through 3.1.0 gave its first character, a leading vowel sign included (`ເອດາ` gave 'ເ.', the defect this file's 2026-11-12 note recorded); T5 reads no Lao letter with a full stop as an initial, so under `initials_as_family` O8's run leaves it (`ສົມຊາຍ ໃຈດີ ສ. ດ.` family 'ດ.', where 3.1.0 read 'ສ. ດ.') and under `two_family_names` O6 takes it as a name word (`ສົມຊາຍ ສ. ໃຈດີ` family 'ສ. ໃຈດີ'), as for Thai. No default field moves. MEASURED against master `cb5088a9` (`tools/differential/measure.py --base`): the committed snapshot moves 23 `initials()` views, all Lao, 20 of them CLDR's `lo` renderings, and no field; no local corpus, agreement or alike view moves, and the CLDR, GND and Wikidata records do not. - - Recompute: the table with the Standing recipe on `common/main/{en,lo,km}.xml` at `c0b65ae3`; the moves with `measure.py --base `. + - **What the row moves.** `initials()` gives nothing for a word in Lao, where 1.4.0 through 3.1.0 gave its first character, a leading vowel sign included (`ເອດາ` gave 'ເ.', the defect the 2026-11-12 "Not examined" note recorded, which the Open line on #1380 replaces); T5 reads no Lao letter with a full stop as an initial, so under `initials_as_family` O8's run leaves it (`ສົມຊາຍ ໃຈດີ ສ. ດ.` family 'ດ.', where 3.1.0 read 'ສ. ດ.') and under `two_family_names` O6 takes it as a name word (`ສົມຊາຍ ສ. ໃຈດີ` family 'ສ. ໃຈດີ'), as for Thai. No default field moves; the reports and the views do, as Thai's did: the name match reads a Lao letter as a whole name (`ສ. ໃຈດີ` and `ສົມຊາຍ ໃຈດີ` conflict, where 3.1.0 read the letter as the initial), a name word and a letter loses its `order` report (`ສົມຊາຍ ສ.`), a lone `ສ.` reports `given-or-family`, and the group suggester casts no trailing-initial vote for it (decisions/group-suggestion). MEASURED against master `cb5088a9` (`tools/differential/measure.py --base`): the committed snapshot moves 23 `initials()` views, all Lao, 22 of them CLDR's `lo` renderings and one a rules/R7 example this change adds, and no field; no local corpus, agreement or alike view moves, and the CLDR, GND and Wikidata records do not. + - Recompute: the table with the Standing recipe on `common/main/{en,lo,km}.xml` at `c0b65ae3`; the moves with `measure.py --base `; the match and suggester moves by the rows in tests/v2/test_match.py and tests/v2/test_suggest.py, whose populations held no Lao before them (`match_diff.py` and `suggest_measure.py` draw from those and the corpora): with them, `match_diff.py --base ` moves 44 of 690,690 rows, every one those Lao pairs going from `initial` to `conflict` under each of its 22 settings, and no corpus pair. diff --git a/docs/design/rules/O1-east-slavic-rotation.md b/docs/design/rules/O1-east-slavic-rotation.md index 23ba7baf3..a0f16af00 100644 --- a/docs/design/rules/O1-east-slavic-rotation.md +++ b/docs/design/rules/O1-east-slavic-rotation.md @@ -9,7 +9,7 @@ "Иван Петрович Абрамович" [ru] → family="Абрамович" · boundary "Олена Петрівна Гаєвич" [ru] → family="Гаєвич" · boundary ``` -- **The endings are the Russian ones and the Ukrainian ones written in Cyrillic** (`-івна`, `-ївна`, `-євич`, `Ілліч`), the three languages writing the patronymic in the same slot and the same orders. +- **The endings are the Russian ones and the Ukrainian ones written in Cyrillic** (`-івна`, `-ївна`, `-євич`, `Ілліч`), the two languages writing the patronymic in the same slot and the same orders. ``` "Коваленко Олена Петрівна" [ru] → family="Коваленко" "Мельник Тарас Ілліч" [ru] → family="Мельник" diff --git a/docs/languages.rst b/docs/languages.rst index 093b2d38c..2c42a37ad 100644 --- a/docs/languages.rst +++ b/docs/languages.rst @@ -1095,7 +1095,7 @@ Initials In the name lists measured, Arabic script writes a letter with a full stop before a name as a title and almost never for a name (Persian and Urdu names were measured less). :meth:`~nameparser.ParsedName.initials` -gives nothing for a word in Arabic script, as for Han, Thai and +gives nothing for a word in Arabic script, as for Han, Thai, Lao and Burmese, and the name match reads a letter with a full stop as a word of its own, not as an initial: diff --git a/docs/migrate.rst b/docs/migrate.rst index 24bb6ac62..471c1d547 100644 --- a/docs/migrate.rst +++ b/docs/migrate.rst @@ -2445,9 +2445,11 @@ Initials in Lao ^^^^^^^^^^^^^^^ :meth:`~nameparser.ParsedName.initials` gives nothing for a word in the -Lao script, which shortens no name to a letter, as for Thai and -Burmese, where 1.4 through 3.1 gave its first letter. A Lao title -written short with a full stop is still a title: +Lao script, where 1.4 through 3.1 gave its first letter: Lao shortens +no name to a letter, as Thai and Burmese do not. The name match reads +a Lao letter with a full stop as a word, so ``ສ. ໃຈດີ`` no longer +matches ``ສົມຊາຍ ໃຈດີ``. A Lao title written short with a full stop is +still a title: .. doctest:: diff --git a/docs/release_log.rst b/docs/release_log.rst index 9f7478688..b3f566df8 100644 --- a/docs/release_log.rst +++ b/docs/release_log.rst @@ -4,8 +4,8 @@ Release Log nameparser 3.2 is under development. - - **Fix locales.RU reading a Ukrainian patronymic written in Cyrillic as the family name.** ``parser_for(locales.RU).parse("Коваленко Олена Петрівна")`` gives family ``Коваленко``, given ``Олена``, patronymic ``Петрівна``, where 2.0.0 through 3.1.0 gave family ``Петрівна``, given ``Коваленко``; ``-ївна``, ``-євич`` and ``Ілліч`` read the same way, while the Belarusian endings and the Latin spellings (``-ivna``, ``-ovych``) still do not. :issue:`1212` - - **Fix initials() giving a Lao name its first letters.** ``parse("ສົມຊາຍ ໃຈດີ").initials()`` gives ``''``, as a Thai or Burmese name does, where 1.4.0 through 3.1.0 gave ``'ສ. ໃ.'``; a Lao title written short (``ດຣ.``) is still a title. :issue:`1380` + - **Fix locales.RU reading a Ukrainian patronymic written in Cyrillic as the family name.** ``parser_for(locales.RU).parse("Коваленко Олена Петрівна")`` gives family ``Коваленко``, given ``Олена``, patronymic ``Петрівна``, where 2.0.0 through 3.1.0 gave family ``Петрівна``, given ``Коваленко``; ``-ївна``, ``-євич`` and ``Ілліч`` read the same way, while the Belarusian endings and the Latin spellings (``-ivna``, ``-ovych``) still do not; ``Parser.suggest`` now suggests the East Slavic rule for a list of such names too. :issue:`1212` + - **Fix initials() giving a Lao name its first letters.** ``parse("ສົມຊາຍ ໃຈດີ").initials()`` gives ``''``, as a Thai or Burmese name does, where 1.4.0 through 3.1.0 gave ``'ສ. ໃ.'``; the name match reads a Lao letter as a word, so ``ສ. ໃຈດີ`` no longer matches ``ສົມຊາຍ ໃຈດີ``, and a list of Lao names each ending in a letter no longer suggests a family-first order. A Lao title written short (``ດຣ.``) is still a title. :issue:`1380` - **Add familiar forms in Central and Eastern European and Balkan languages, found in Wikidata.** With ``familiar-form`` accepted, ``Erzsi Nagy`` / ``Erzsébet Nagy`` and ``Jára Novák`` / ``Jaroslav Novák`` are consistent, where 3.1.0 read a conflict, Czech and Hungarian gaining the most; the Russian, Ukrainian, Belarusian, Bulgarian and most Serbian pairs are written in Cyrillic, so a name romanized in Latin letters does not reach them. :issue:`1387` - **Read a second name written after @ or urf as the nickname.** ``parse("Rahim @ Jaki bin Osman")`` gives given ``Rahim``, nickname ``Jaki``, family ``bin Osman``, where 1.4.0 through 3.1.0 gave middle ``@ Jaki``; the alias runs to a patronymic particle, another marker or a comma, and a one-word alias before the family name takes the family name with it (``Rahim @ Jaki Osman`` gives no family name). ``alias`` and ``aka`` are read so only where you add them (``Lexicon.add("aka", kind="alias_marker")``); an ``@`` glued to a word is part of it. :issue:`1164` - **Fix an Arabic-script name written with الدين or الله second, which read as two names.** ``parse("نور الدين سامر حداد")`` gives given ``نور الدين``, where 1.4.0 through 3.1.0 gave given ``نور``, middle ``الدين سامر``; ending the name the pair is the family name, and ``الدین``, ``اله`` and ``اللہ`` read the same way; a name of two name words keeps them apart. ``Lexicon.add`` accepts a new kind, ``bound_second``, for such a word. :issue:`1072` diff --git a/nameparser/_pipeline/_vocab.py b/nameparser/_pipeline/_vocab.py index 8cc549342..54146a8c8 100644 --- a/nameparser/_pipeline/_vocab.py +++ b/nameparser/_pipeline/_vocab.py @@ -389,9 +389,10 @@ def is_initial_shaped(text: str) -> bool: # nameparser.config.regexes, removed in 3.0, #1008), the RU and TR_AZ # packs' copies pinned to these by tests/v2/test_locales.py: the East # Slavic patronymic endings and the standalone Turkic patronymic -# markers, which rules/O1's and O2's rotations and rules/R9's reading -# ask through the two predicates below. The Ukrainian Cyrillic endings -# (`івна`, `ївна`, `євич`, `ілліч`) joined v1's in 3.2 (#1212). +# markers, which rules/O1's and O2's rotations, rules/R9's reading and +# the group suggester's patronymic signal (nameparser/_suggest.py) ask +# through the two predicates below. The Ukrainian Cyrillic endings are +# decisions/O1's (#1212). _EAST_SLAVIC = re.compile( r"(ovich|ovna|evich|evna|ichna|ilyich|kuzmich|lukich|fomich|fokich|nikitich|savvich)$", re.I) @@ -409,7 +410,13 @@ def is_initial_shaped(text: str) -> bool: def has_patronymic_ending(text: str) -> bool: """Whether `text` ends in an East Slavic patronymic ending, Latin or Cyrillic ("Ivanovich", "Петрович"): rules/O1's test and, under - `PatronymicRule.EAST_SLAVIC`, rules/R9's.""" + `PatronymicRule.EAST_SLAVIC`, rules/R9's. Asked of the word + NFC-composed, as `is_patronymic_marker` is (#1316): the Ukrainian + `ї` of `-ївна` decomposes to і and a combining diaeresis (#1212); + the fold is inline behind `isascii()` so a plain word costs no + frame.""" + if not text.isascii(): + text = unicodedata.normalize("NFC", text) return bool(_EAST_SLAVIC.search(text) or _EAST_SLAVIC_CYR.search(text)) diff --git a/nameparser/locales/ru.py b/nameparser/locales/ru.py index fdeee6d22..5f7b73349 100644 --- a/nameparser/locales/ru.py +++ b/nameparser/locales/ru.py @@ -2,10 +2,11 @@ on the EAST_SLAVIC patronymic rule, its policy patch compiled from nameparser/vocab/ru.toml's [rules] table by tools/vocab/build.py (#754, 4f; mechanisms.md#LOCALE-PACKS-PURE-DATA). The morphology data (-ovich/-ovna -endings, Cyrillic and transliterated) lives beside the rule -implementation, in nameparser/_pipeline/_vocab.py's patterns, which -_post_rules.py's rotation and assemble's patronymic reading (rules/R9) -both ask, not in the Lexicon (mirrors v1's patronymic_name_order flag design, v1.3.0). +endings, Cyrillic and transliterated, and the Ukrainian -івна/-ївна/ +-євич/Ілліч in Cyrillic only) lives beside the rule implementation, in +nameparser/_pipeline/_vocab.py's patterns, which _post_rules.py's +rotation, assemble's patronymic reading (rules/R9) and the group +suggester ask, not in the Lexicon (mirrors v1's patronymic_name_order flag design, v1.3.0). Cyrillic titles/conjunctions are default-lexicon vocabulary (#269), not pack data (mechanisms.md#LOCALE-PACKS-PURE-DATA, the sorting rule). @@ -26,6 +27,7 @@ from __future__ import annotations import re +import unicodedata from nameparser._lexicon import Lexicon from nameparser._locale import Locale, rules_patch @@ -63,5 +65,6 @@ def DEVIATES(name: str) -> bool: # 'Sidorovich Anna' matches though the rule's 1+1+1 shape never # fires) -- the safe direction: DEVIATES may claim more than the # rule changes, never less. + # NFC-composed, as the rule reads the word (#1212's `ї`, #1316) return any(_EAST_SLAVIC.search(tok) or _EAST_SLAVIC_CYR.search(tok) - for tok in name.split()) + for tok in unicodedata.normalize("NFC", name).split()) diff --git a/tests/v2/cases.py b/tests/v2/cases.py index 2a35d6357..c001036f2 100644 --- a/tests/v2/cases.py +++ b/tests/v2/cases.py @@ -22944,7 +22944,8 @@ def _check_cjk_shape_purity(self) -> None: {"given": "ສົມຊາຍ", "family": "ສ. ໃຈດີ"}, policy=_TWO, classification="fix(#1380)", notes="rules/O6 takes a Lao letter as a name word, no middle " - "initial; 3.1.0 read middle 'ສ.', family 'ໃຈດີ'"), + "initial; 2.6.0 through 3.1.0 read middle 'ສ.', family " + "'ໃຈດີ'"), Case("lao_title_written_short_keeps_its_shape", "ດຣ. ສົມຊາຍ ໃຈດີ", {"title": "ດຣ.", "given": "ສົມຊາຍ", "family": "ໃຈດີ"}, @@ -22970,7 +22971,7 @@ def _check_cjk_shape_purity(self) -> None: {"given": "Тарас", "middle": "Ілліч", "family": "Мельник"}, views=(("patronymic", "Ілліч"),), locale="ru", classification="fix(#1212)", - notes="an irregular ending nearly the whole word, matched " + notes="an irregular ending that is the whole word, matched " "capitalized (re.I, AGENTS.md's Cyrillic gotcha)"), Case("ru_pack_ukrainian_ending_in_capitals", "МЕЛЬНИК ТАРАС ІЛЛІЧ", {"given": "ТАРАС", "middle": "ІЛЛІЧ", "family": "МЕЛЬНИК"}, @@ -23000,6 +23001,41 @@ def _check_cjk_shape_purity(self) -> None: notes="rules/O1's accepted cost, the twin of 'Анна Мария " "Абрамович': the shape gives no sign the surname is one; " "2.0.0 through 3.1.0 read family 'Гаєвич'"), + Case("ru_pack_ukrainian_decomposed_yivna", + unicodedata.normalize("NFD", "Ткачук Ганна Сергіївна"), + {"given": "Ганна", + "middle": unicodedata.normalize("NFD", "Сергіївна"), + "family": "Ткачук"}, + views=(("patronymic", unicodedata.normalize("NFD", "Сергіївна")),), + locale="ru", classification="fix(#1212)", + notes="ї written as і and a combining diaeresis: the ending is " + "asked of the word NFC-composed, as the Turkic markers " + "are (#1316)"), + Case("ru_pack_ukrainian_decomposed_yivna_in_capitals", + unicodedata.normalize("NFD", "ТКАЧУК ГАННА СЕРГІЇВНА"), + {"given": "ГАННА", + "middle": unicodedata.normalize("NFD", "СЕРГІЇВНА"), + "family": "ТКАЧУК"}, + locale="ru", classification="fix(#1212)"), + Case("ru_pack_ukrainian_family_comma_fills_the_view", + "Коваленко, Олена Петрівна", + {"given": "Олена", "middle": "Петрівна", "family": "Коваленко"}, + views=(("patronymic", "Петрівна"),), + locale="ru", classification="fix(#1212)", + notes="the comma suppresses rules/O1; rules/R9's view, empty in " + "3.0.0 and 3.1.0, reads the middle"), + Case("ru_pack_ukrainian_empty_head_fills_the_view", + ", Олена Петрівна", + {"given": "Олена", "middle": "Петрівна"}, + views=(("patronymic", "Петрівна"),), + locale="ru", classification="fix(#1212)"), + Case("east_slavic_rule_reads_a_ukrainian_ending_without_the_pack", + "Коваленко Олена Петрівна", + {"given": "Олена", "middle": "Петрівна", "family": "Коваленко"}, + views=(("patronymic", "Петрівна"),), + policy=_ES, classification="fix(#1212)", + notes="the rule on the default lexicon, as the RU pack turns it " + "on"), Case("ru_pack_belarusian_ending_is_not_read", "Сокалаў Мікалай Іванавіч", {"given": "Сокалаў", "middle": "Мікалай", "family": "Іванавіч"}, diff --git a/tests/v2/test_locales.py b/tests/v2/test_locales.py index facb50d82..2959a7cdc 100644 --- a/tests/v2/test_locales.py +++ b/tests/v2/test_locales.py @@ -2029,6 +2029,16 @@ def test_tr_az_deviates_reads_a_decomposed_marker() -> None: assert _tr_az.DEVIATES(decomposed), name +def test_ru_deviates_reads_a_decomposed_ending() -> None: + """#1212, as #1316 for TR_AZ: the rule reads an ending NFC-composed, + so the Ukrainian `-ївна` written with і and a combining diaeresis + must declare too, or the non-interference gate misses it.""" + for name in ("Ткачук Ганна Сергіївна", "ТКАЧУК ГАННА СЕРГІЇВНА"): + decomposed = unicodedata.normalize("NFD", name) + assert decomposed != name + assert _ru.DEVIATES(decomposed), name + + def test_locales_unknown_attribute() -> None: with pytest.raises(AttributeError, match="XX"): locales.XX diff --git a/tests/v2/test_match.py b/tests/v2/test_match.py index cdabdcece..e6105399c 100644 --- a/tests/v2/test_match.py +++ b/tests/v2/test_match.py @@ -658,6 +658,21 @@ def test_a_burmese_letter_is_never_an_initial() -> None: is Outcome.INITIAL +def test_a_thai_or_lao_letter_is_never_an_initial() -> None: + """Thai (#1256) and Lao (#1380) write no initials + (decisions/script-properties), so a letter of either, with or without its period, is a whole name that + conflicts with the name it would have stood for; 3.1.0 read the Lao + letter as an initial.""" + for a, b in (("ส. ใจดี", "สมชาย ใจดี"), ("ສ. ໃຈດີ", "ສົມຊາຍ ໃຈດີ"), + ("ສ ໃຈດີ", "ສົມຊາຍ ໃຈດີ")): + for x, y in ((a, b), (b, a)): + r = m.check(x, y) + assert not r.consistent, (x, y) + assert role(r, Role.GIVEN).outcome is Outcome.CONFLICT + r = m.check("ສົມຊາຍ ສ. ໃຈດີ", "ສົມຊາຍ ສີສະຫວາດ ໃຈດີ") + assert role(r, Role.MIDDLE).outcome is Outcome.CONFLICT + + def test_initials_written_apart_agree_with_the_same_initials_joined() -> None: base = parse("John Smith") r = m.check(base.replace(given="J.-P."), base.replace(given="J. P.")) diff --git a/tests/v2/test_script_properties.py b/tests/v2/test_script_properties.py index f04e8abb9..87174c0eb 100644 --- a/tests/v2/test_script_properties.py +++ b/tests/v2/test_script_properties.py @@ -352,7 +352,8 @@ def test_a_georgian_run_ending_the_name_gives_an_initial_per_letter() -> None: ("สมชาย ใจดี", "initials", ""), ("ကြည် ကြည် ဌေး", "initials", ""), # lao writes no initials (#1380), and writes period abbreviations: - # a listed-or-not title written short with a period keeps the shape + # an unlisted title written short with a period (ດຣ.) is still a + # title by H2's shape ("ສົມຊາຍ ໃຈດີ", "initials", ""), ("ດຣ. ສົມຊາຍ ໃຈດີ", "title", "ດຣ."), # the arabic script writes no initials, and a listed letter with a diff --git a/tests/v2/test_suggest.py b/tests/v2/test_suggest.py index d4af28408..f9c8f009e 100644 --- a/tests/v2/test_suggest.py +++ b/tests/v2/test_suggest.py @@ -41,6 +41,13 @@ ("Mary Smith", Signal.GIVEN_NAME, GIVEN_FIRST), ("Иванов Иван Петрович", Signal.PATRONYMIC, PatronymicRule.EAST_SLAVIC), ("Ivan Petrovich Sidorov", Signal.PATRONYMIC, PatronymicRule.EAST_SLAVIC), + # the Ukrainian Cyrillic endings (#1212), a decomposed ї included + ("Коваленко Олена Петрівна", Signal.PATRONYMIC, PatronymicRule.EAST_SLAVIC), + ("Коваленко Олена Петрівна", Signal.PATRONYMIC_POSITION, FAMILY_FIRST), + (unicodedata.normalize("NFD", "Ткачук Ганна Сергіївна"), Signal.PATRONYMIC, + PatronymicRule.EAST_SLAVIC), + ("Мельник Тарас Ілліч", Signal.PATRONYMIC, PatronymicRule.EAST_SLAVIC), + ("Олена Леонтіївна Бондар", Signal.PATRONYMIC_POSITION, GIVEN_FIRST), ("Ziyo Azamat Hamid o‘g‘li", Signal.PATRONYMIC, PatronymicRule.TURKIC), # cased evidence in any script: Cyrillic capitals vote ("ИВАНОВ Иван", Signal.CAPITALS, FAMILY_FIRST), @@ -67,6 +74,13 @@ def test_a_name_casts_its_vote( ("Smith Jean-Pierre", Signal.TRAILING_INITIAL), ("Smith J-", Signal.TRAILING_INITIAL), ("Smith -", Signal.TRAILING_INITIAL), + # a letter of a script that writes no initials is no initial to the + # vote (decisions/group-suggestion): Thai, Burmese (#1256), Arabic + # (#1149) and Lao (#1380) + ("สมชาย ส.", Signal.TRAILING_INITIAL), + ("ကြည် က.", Signal.TRAILING_INITIAL), + ("أحمد ع.", Signal.TRAILING_INITIAL), + ("ສົມຊາຍ ສ.", Signal.TRAILING_INITIAL), ("Smith A.", Signal.SURNAME), ("A. Smith", Signal.SURNAME), ("김민준", Signal.CAPITALS), From 4e66b8d1d512a38878e0201c9e80691b47c85139 Mon Sep 17 00:00:00 2001 From: Derek Gulbranson Date: Fri, 20 Nov 2026 16:13:02 -0800 Subject: [PATCH 5/5] =?UTF-8?q?Say=20why=20the=20suggester's=20decomposed-?= =?UTF-8?q?=D1=97=20row=20passed=20before=20the=20fold=20(#1212)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- tests/v2/test_suggest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/v2/test_suggest.py b/tests/v2/test_suggest.py index f9c8f009e..451dd0998 100644 --- a/tests/v2/test_suggest.py +++ b/tests/v2/test_suggest.py @@ -41,7 +41,8 @@ ("Mary Smith", Signal.GIVEN_NAME, GIVEN_FIRST), ("Иванов Иван Петрович", Signal.PATRONYMIC, PatronymicRule.EAST_SLAVIC), ("Ivan Petrovich Sidorov", Signal.PATRONYMIC, PatronymicRule.EAST_SLAVIC), - # the Ukrainian Cyrillic endings (#1212), a decomposed ї included + # the Ukrainian Cyrillic endings (#1212); a decomposed ї votes too, + # the suggester composing each word before any signal reads it ("Коваленко Олена Петрівна", Signal.PATRONYMIC, PatronymicRule.EAST_SLAVIC), ("Коваленко Олена Петрівна", Signal.PATRONYMIC_POSITION, FAMILY_FIRST), (unicodedata.normalize("NFD", "Ткачук Ганна Сергіївна"), Signal.PATRONYMIC,