Repository navigation
Add locales.MN, a Mongolian pack reading a Cyrillic name's father's name as the family (#1237) - #1365
Merged
Merged
Conversation
…ily (#1237) A plain choice of mn with mn.toml's [rules] order, family first with the given name last, so the father's name a Mongolian name writes first is the family, as #1253's decision states. The genitive is not read into the patronymic view, and the choice of mn changes no reading. The default does not move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hoice From review: the glued initial is divided by script_segment (rules/T8), not tokenize; the traditional-script example holds its U+202F; the JRC and ORCID figures name the population each recipe classifies; the Russian-name cost of the given-last order is recorded; contributing.rst and decisions/deviates-registry name the inert choice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the round-2 review of f0bfd08: O1 stands down under either declared order; the view is empty because R9's East Slavic rule reads a middle word, and FAMILY_FIRST_GIVEN_LAST puts the patronymic in given. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he in suggest_measure local_parliaments.DATASETS gains mn_parliament (126 members, each in Cyrillic, father's name first), so #1237's pack is measured from the cache. suggest_measure.py read each local corpus's raw.jsonl directly, which skipped local_corpora.load's checks and kept running on a parliaments cache fetched from fewer datasets; it now reads through load, and a stale or edited corpus stops the run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…script that settles none (#1237) Decided in coordination: the pack reads a name written wholly in Cyrillic family first with the given name last, and leaves a romanized name to the caller's order, since Mongolians mostly write their names given-first in Latin letters (65 of 87 two-word ORCID credits). Script.CYRILLIC joins the enum and the script table; the readers that mean the East Asian scripts (rules/T3's interpunct flank, the two-family-names run count, the segmenter's neighbour test) read _EAST_ASIAN_SCRIPTS, so a parser without the pack reads every name as before (the snapshot and the 16 local corpora match master). A Cyrillic word with a hyphen or apostrophe inside it classifies too. PolicyPatch.script_orders composes by script, so the pack adds its entry without erasing a caller's own; parser_for warns where two packs set one script differently. The entry orders a name and settles no lone word (rules/O5). rules/W4 gains the pack's Except, decisions/W4 the entry, and root AGENTS.md says Cyrillic does not mean family-first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n change, and spare Latin the Cyrillic frame From review of the rework: apply_patch's by-script merge lets an unhashable key reach Policy's curated message; the composition change reaches a caller's own PolicyPatch, so the release log carries it as a Change and the PolicyPatch, Policy.patched and parser_for docstrings say it; _classify asks the Cyrillic matcher only of a word opening with a Cyrillic letter. rules/W4 states the pack's order in When and Then; by_script's docstrings say it is East Asian; decisions text corrected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ing says From the review of 33efcf5: listed in segment_scripts, CYRILLIC made a Cyrillic word a site a configured segmenter divided, and the construction warning asked for that segmenter. A Cyrillic word is now no site, and the warning leaves CYRILLIC out. _effective_order's citation quotes both clauses of rules/W4's Then. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eview found stale From the rework's test review: rules/T3's flank and the two-family-names count read the East Asian scripts (a Cyrillic punt volat and a Cyrillic run are pinned), the segmenter's neighbour test reads _EAST_ASIAN_SCRIPTS and a Cyrillic neighbour no longer blocks the consult (pinned), the per-script warning credits a pack only with the scripts it set (pinned), and the joiner edges are pinned. Comments on the Cyrillic range, EffectiveOrder, the joiners and build.py's EAST_ASIAN_RANGES corrected; glued initials and a stress mark recorded as accepted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… blank lines Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…golian-pack # Conflicts: # AGENTS.md
…e pack's matching and composition costs _assign._effective_order now returns the declared order at the first word whose script, outside the kana license, has no script_orders entry: such a script resolves alone to itself or beside any other to None, so the answer cannot change. The default parser no longer classifies every word of a Cyrillic name (Иван Петров 242 -> 233 frames, Иванов Иван Иванович 370 -> 353, master's counts); tests/v2/test_benchmark.py pins one call a name with its negative control, and decisions/W4's frame line says what holds. docs/languages.rst shows that a father's initial reads family-initial under the pack and the accept that restores it; docs/locales.rst says a script order takes a Cyrillic name before the patronymic rotations, with Сидоров Иван Петрович under MN + RU. The #1237 entry records the matching cost, a Latin homoglyph that leaves a name to the caller's order, and Доктор and гуай as vocabulary candidates. A test holds that the default keys no order to Cyrillic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…golian-pack Keeps both sides' release-log bullets, case rows and suggest_measure tests; corpus_rules.jsonl regenerated with build_rules_corpus.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1237. Refs #1253.
Adds
locales.MN, a Mongolian pack. It reads a name written wholly in Cyrillic with the father's name first, so the father's name is thefamily, as #1253's first statement has it. A romanized name keeps the caller's order.1.4.0 through 3.0.1, and the default still, read
Батын Сүхээas givenБатын, familyСүхээ.Changed since the first push (decided in coordination, 2026-11-12)
The first version declared
FAMILY_FIRST_GIVEN_LASTfor every name. Its own gate found that Mongolians write their own romanized names mostly given-first (65 of 87 two-word ORCID credits), so the order is now keyed to Cyrillic.What the pack is
mn, plus ascript_ordersentry forScript.CYRILLIC, set toFAMILY_FIRST_GIVEN_LAST._INERT_CHOICESexempts MN from the two tests that expect a choice to change a word.Боржигин Батын Сүхээ) leaves the given name in place. The clan name itself is not read as one.Ц.Сандаг-Очир(Should a Mongolian choice read a glued father's initial as the family? (Ц.Сандаг-Очирgives given 'Ц.', family 'Сандаг-Очир') #1306), which rules/T8 already divides: familyЦ., givenСандаг-Очир;What the Cyrillic order needed
Script.CYRILLICjoins the enum and_policy._SCRIPT_RANGES: the Cyrillic block, plus Supplement and Extended-A, -B and -C._EAST_ASIAN_SCRIPTS:_classified_char);DEFAULT_SCRIPT_ORDERSand_NO_INITIALSgain no entry._classifyasks the Cyrillic matcher only of a word that opens with a Cyrillic letter, so a non-ASCII Latin word costs nothing extra._assign._effective_orderreturns the declared order at the first word whose script, outside the kana licence, has noscript_ordersentry. Such a script resolves alone to itself or, beside any other, to None, so the answer cannot change. Under the default parser a Cyrillic name therefore costs what it did on master:Иван Петров233 frames andИванов Иван Иванович353 (242 and 370 before this return), andJohn Smith126 on both. A guard in tests/v2/test_benchmark.py pins oneeffective_scriptcall per name from that walk.effective_scriptreads a Cyrillic word with a hyphen or an apostrophe inside it (Оюун-Эрдэнэ,Мар'яна) as Cyrillic. The table stays letters only.PolicyPatch.script_orderscomposes by script, where it was a scalar override.Policy(script_orders=())with MN keeps only the Cyrillic entry.parser_forwarns where two packs set one script to different orders.PolicyPatch, not only MN's, so the release log carries it as a Change. In 2.1.0 through 3.0.1,Policy().patched(PolicyPatch(script_orders={Script.HAN: GIVEN_FIRST}))kept the Han entry alone; now it keeps the Hangul and hiragana entries too.Policy(script_orders=())on the base parser.Policy's curated messages, an unhashable key included.script_ordersbefore, which is why_policy.py's comment had said to revisit this when a pack needed it.EffectiveOrder.by_scriptis set for an East Asian script alone. SoСүхээunder MN reads given and reportsgiven-or-family. A caller's own katakana entry still settles a lone word, as Han's does; a test pins both.[rules]table. The table's keys are scalarPolicyfields, and a mapping keyed byScriptwould need a value type thatRULE_KEYSand_locale._RULE_VALUESlack. The pack carries its patch in code, as ZH and JA carrysegment_scripts.Measured (2026-11-12, master 2b39f23)
FAMILY_FIRSTmn_parliament, from the cache)mnsample renderings (all Cyrillic, rendered in every order) read 19 of 24 by default and 15 of 24 under the pack.snapshot.pyreports no moves; the snapshot only gains rows for the new rules examples.snapshot.py --local <each> --base <master checkout>reports "matches the base" for all 16 local corpora.initials()and warnings were identical.Pack unions (asked for plainly)
The pack reads every wholly-Cyrillic name its way, Russian, Kazakh and Kyrgyz ones included.
MN+RUMN+TR_AZИван СидоровИванИванСидоров Иван ПетровичПетрович, middleИван, no patronymicПетровичНурсултан Абишевич НазарбаевНурсултан, patronymicАбишевичНурсултанБекмырза Чолпонбай уулууулууулу, patronymicЧолпонбай уулуProposed precedence, not built: a patronymic shape the active rule reads (an O1 ending, an O2 marker) keeps its name from a pack's script order. None of the Khural's 126 members carries either, so the pack would lose nothing there. It is recorded in decisions/W4's
Open:.Decisions for the maintainer
family.Ухнаагийн Хүрэлсүхgives given 'Ухнаагийн', family 'Хүрэлсүх') #1237 counted 515 Wikidata labels with the genitive on the first word against 1 on the second.Mervyn King,Carolyn Porco,Kathryn Gustafson).PatronymicRuleand aPolicychange.FAMILY_FIRST_GIVEN_LASTagainst plainFAMILY_FIRST. Given-last protects the clan-name shape. It costs a three-word Russian name written family first:Сидоров Иван Петровичreads givenПетрович. Neither shape is measured.Сүхээ Б.reads familyСүхээ.Ноён(Mr.) is no listed title, and neither areДокторand the honorificгуай: vocabulary candidates, not filed.Cүхээ Батын, U+0043) leaves the name to the caller's order.Батын Сүхээ/Б. Сүхээ), is the family under the pack. So the pair readsfamily-initialand conflicts. The default matcher calls it consistent, but only by reading the father's name as the given name. Acceptingfamily-initialrestores it; docs/languages.rst shows the accept as a doctest.Script.CYRILLICdoes not load in earlier releases.Also in this PR
tools/differential/suggest_measure.pyreads each local corpus throughlocal_corpora.load's checks, so a stale or edited corpus stops the run (with tests).mn_parliamentwas added to the parliaments tool here first, then split out as Add Mongolia's Khural to opensanctions-parliaments #1368 so every checkout could read the refreshed shared cache. Add Mongolia's Khural to opensanctions-parliaments #1368 is merged, and master is merged in here (e944bb3), so the duplicate is no longer in this diff.Checks
uv run pytestwith thejaextra, on the head (1743756): 46,080 passed;-m serial35;sphinx-build -b doctest840. On the rework commit: withoutja, 46,034 passed; on Python 3.15 in its own environment, 46,034 passed.pytest -n0 -m serial: 35 passed.mypy,ruffandtools/vocab/build.py --check: clean.sphinx-build -b doctestand-W -b html: clean.Reviews
Each review ran as a subagent in its own detached worktree, on the pushed head of its round, with a read-only master checkout beside it.
Enkhtaivan Erdenecited as written family-first, though its boxes say given-first. #1237's option 1 misquoted (it namedfamily-first). The JRC "9 of 9" and "Latin and Greek" overstated what the recipe classifies. "Three in four" taken from the wrong population. The spaced-initial and population counts did not reproduce (8, not 6). The traditional-script example had lost its U+202F.given. Everything else re-verified (ORCID and JRC counts over the stated filters, the U+202F, T8's division, the snapshot row, the doctest and prose, the new tests' mutations).Parser()or any shipped pack, but three problems. A caller's ownPolicyPatch(script_orders=…)now composes differently, with no Change bullet. An unhashable malformed key lostPolicy's curated message. The Cyrillic matcher cost a frame per non-ASCII Latin word.by_scriptdocstrings contradicted the code. The katakana vs Cyrillic lone-word asymmetry was undecided. Stale autodoc docstrings.segment_scriptsaccepted CYRILLIC with no word on what it does there._BY_SCRIPTconstant with a test, rewritten docstrings, a test pinning the katakana and Cyrillic rows, and asegment_scriptsnote.[rules]. The snapshot gains three rows, not one. O1 says nothing of the pack.Гал·ла Ивановаwould split) and the segmenter neighbour test (山田太郎 Иванwould stop dividing). The per-script warning's filter was untested, and so were the joiner edges. An unreachable empty check. Stale comments: the Cyrillic range, EffectiveOrder on katakana, the joiners, build.py. Glued initials (Б.Б.) and stress marks escape the pack's order._EAST_ASIAN_SCRIPTSas decisions/W4 says, the empty check dropped in 33efcf5, the comments corrected, and the two escapes recorded as accepted.José García177 as on master), the release-log claim against 2.1.0, 2.8.2 and 3.0.1, and W4's citation.is not Noneon 46 tokens, Cyrillic aside; every new test fails under its mutation; the decisions sentence holds when run. Cosmetic: two stray blank lines, andeffective_script's docstring missing the joiner path.mn. Also: no direct test that the default keys no Cyrillic order; a homoglyph escape and two honorifics to record.🤖 Generated with Claude Code