Repository navigation
Add locales.VI, a Vietnamese pack (#1108) - #1112
Merged
Merged
Conversation
Route A: a plain vi choice, vi.toml's [rules] family-first-given-last order, and a lexicon fragment removing the particle and connective readings of Vietnamese syllables. Titles provisional; decisions figures pending the Vietnamese corpora. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…le-pack-4787d7 # Conflicts: # tests/v2/rules_budget.json
…ons (#1108) - the fragment also removes the credential readings of do, ba, chi and ma, which took the given name of a name in one case (NGUYEN VAN DO, NGUYEN LINH CHI) - a test puts each removal back in turn and checks its own row moves; rows for each syllable between name words, the one-case credentials, the comma shapes with titles, the head titles and the trailing stacked title - config_diff.py diff --spelling (stripped, upper, lower), so the romanized and one-case views recompute from the repository - decisions: head notes on decision 6 and the Standing lines; the CLDR lone-word cost is 2 renderings, not 6; PGS.TS.BS. reads whole; the credential measurement and its recipe - stale text: README's available(), the --locale help, AGENTS.md's [rules] list, the vocabulary RFC - nameparser/vocab/AGENTS.md: a reading taken out leaves the word's next reading to act Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tin marks (#1108) - ma keeps its credential reading (gained no corpus name, cost one); TRAN THI MA pinned as the known gap - the credential and comma-name costs recorded and pinned: DO, BA, CHI after a Vietnamese name with or without a comma, dotted, bracketed, behind another credential; Beethoven, Ludwig van and Smith, John Do after a family comma, where the order reads nothing differently - the per-removal test gains a positive control and builds its packs with dataclasses.replace; a mixed-case credential syllable is held to the report the removal drops - config_diff.py --spelling stripped drops only the marks on Latin letters and composes again (Hangul, kana); README notes the option - decisions: exact credential counts per corpus with the comparator, the declined positional rule, the trailing PGS.TS. count, a recipe that runs; decision 15's note names the credentials - locales.rst, the release log, vi.py and test comments corrected Co-Authored-By: Claude Opus 5.5 <[email protected]>
After a comma the capitals shape (rules/C6) keeps a three-letter word in capitals a suffix whatever its readings, so Nguyen Van Anh, CHI keeps suffix 'CHI'. The prose said otherwise; the boundary is pinned. Co-Authored-By: Claude Opus 5.5 <[email protected]>
derek73
added a commit
that referenced
this pull request
Nov 6, 2026
The VI pack (#1112) reads Nguyen Van Anh family-first and removes the Dutch particle reading, so the hand-built strict vi Locale goes. The strict choice keeps an example: ES strict drops the English title phrase Lady Justice. Co-Authored-By: Claude Opus 5.5 <[email protected]>
derek73
added a commit
that referenced
this pull request
Nov 6, 2026
…1106) * README: show 3.0's Spanish, Russian and output-view readings The lead example now parses a Spanish name both ways: the default reading and parser_for(locales.ES)'s two family names, with the surname1/surname2 and generation views and the two_given_names switch. More shapes: a title run, a listing form with generation and credentials split, an ambiguity report, Reading.languages, the honorifics and patronymic views, and the RU pack's patronymic beside the default reading. The announcement links "by reading" to customize.html#configuring-by-reading. Co-Authored-By: Claude Opus 5.5 <[email protected]> * README: say what the van and Arabic examples show, per review Name what Reading.languages holds, show the Arabic family keeps the patronymic's words, and describe the default as positional rather than English. Co-Authored-By: Claude Opus 5.5 <[email protected]> * README: add a Dutch particles-last listing and a title-phrase title Co-Authored-By: Claude Opus 5.5 <[email protected]> * README: show a language choice preferring its reading, and a strict choice Lady reads as a title by default and a given name under ES; a strict vi choice keeps Dutch van out of Nguyen Van Anh. Co-Authored-By: Claude Opus 5.5 <[email protected]> * README: say a choice turns Lady's given reading on, and what strict keeps Per review: es holds a default-off given reading of lady rather than dropping the title, and a strict choice keeps non-Latin-script words. Co-Authored-By: Claude Opus 5.5 <[email protected]> * README: add a measured accuracy section after Learn more Figures from the 2026-11-05 agreement measurement against filed name boxes (PatentsView, UK PSC, Czech candidates, ORCID per country). Co-Authored-By: Claude Opus 5.5 <[email protected]> * README: show an Arabic name of God completing عبد (rules/P12) Co-Authored-By: Claude Opus 5.5 <[email protected]> * README: show how to adjust readings with a Lexicon and a Policy Co-Authored-By: Claude Opus 5.5 <[email protected]> * README: use locales.VI for the Vietnamese example, strict on ES The VI pack (#1112) reads Nguyen Van Anh family-first and removes the Dutch particle reading, so the hand-built strict vi Locale goes. The strict choice keeps an example: ES strict drops the English title phrase Lady Justice. Co-Authored-By: Claude Opus 5.5 <[email protected]> * README: name the VI parser vietnamese, as the other packs' parsers are named Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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 #1108.
Adds
locales.VI, a Vietnamese pack:1.4.0 through 2.8.0, and the default, read
Nguyen Van Anhas givenNguyen, familyVan Anh.What the pack is
A plain choice of
vi, with no strict mode. Its order comes from vi.toml's new[rules]table (name_order = "family-first-given-last").Titles vi.toml turns on, each
default = false: the academic titles written before a name (ts,ths,gs,pgs, which also read the stackedPGS.TS.andGS.TS.) and the officeđbqhwith its ASCII spellingdbqh.bsis excluded, because preferred under the choice it evicted en.toml's credentialBS.A lexicon fragment that removes the readings other files give Vietnamese syllables:
van le do du di la tho da santhe ydo ba chiThis is the one pack fragment that removes. Should
parser_for(locales.VI)readNguyen Van Anhas family Nguyen, middle Van, given Anh, andLe Van Anhas family Le? #1108 assumed agivenreading in vi.toml would win over the Dutchvan, butchooseprefers only by a vocabulary reading, and a name reading never settles a clash (decision 15). The pack therefore bends decisions 6 and 15 for this one pack: its order already commits a caller to Vietnamese names.mechanisms.md#LOCALE-PACKS-PURE-DATA's contract names the exception.The default parse does not move.
_compiled.pyandsnapshot.jsonlare unchanged.Measured
On the local corpora #1110 added, scoring each record's parts derived from its order. Columns are default / the order alone /
VI/ strictVI.parser_for(locales.VI)readNguyen Van Anhas family Nguyen, middle Van, given Anh, andLe Van Anhas family Le? #1108 entry.Accepted costs, each pinned by a test row:
Anh→ familyAnh, under rules/O5 (the lone name word's convention). Should a lone name word read as the given name under a family-first pack, soparser_for(locales.VI).parse("Anh")gives givenAnh? #1111 asks for aPolicysetting for this.DOorBAafter a Vietnamese name reads as a name word, with a comma or without (Nguyen Van Anh, DO→ givenDO), andCHIwithout a comma. That is 4DOand 1BAamong ctgov and FEC names with a Vietnamese surname, each written given-first, which VI misreads anyway.Beethoven, Ludwig van→ middlevan.Nguyen Van Anh PGS.TS.). No corpus writes one; all 16 found are leading.Kept: after a family comma, the given part reads given-first. FEC's Vietnamese-surname donors write the given part Western-style 69 to 12 in native order.
CLDR's per-pack view: vi reads 16 of 24 renderings by default and 10 of 24 with the pack.
Also in this PR
config_diff.py diff --spelling stripped,upper,lowerrewrites every name before it is read, so the romanized and one-case views recompute from the repository.vias the stock file with no readings now usehu._surface_deviates(tests/v2/test_locales.py) matches a title phrase of two adjacent words. VI's office makes the first phrases a choice changes (chief đbqh).Reviews
available()doctest missingvi(a CI failure);NGUYEN VAN DOreading suffixDOunder the pack, which led to the credential removals after measurement; thePGS.TS.BS.claim; the recipe not in the repository; stale--localehelp, AGENTS.md and RFC text. All fixed.held. Applied.--spelling strippedbroke Hangul and kana. Both measured and fixed (only marks on Latin letters are dropped).mawas measured at 0 gained and 1 cost, and is left out.đand Hangul rows added.Ynote corrected; the stacked-title comment now quotes H5.dataclasses.replacefor the control pack applied. The_unmarkedreuse was superseded by the Latin-only fix.CHIafter a comma stays a suffix: the capitals shape (rules/C6) takes any three-letter word in capitals there, whatever the vocabulary. The prose now saysCHIreads as a name word only without a comma, and a test row pins the boundary. Everything else verified, including every row and the recipe's figures.Checks:
uv run pytest,-n0 -m serial, Python 3.15 in its own environment,mypy,ruff check,tools/vocab/build.py --check,sphinx-build -b doctest docs,python -m doctest README.rst.🤖 Generated with Claude Code