Repository navigation
Add a Speed and testing section to the README - #1147
Merged
Merged
Conversation
Per-parse cost measured over the committed corpus snapshot, the no-dependency and reuse-one-Parser notes, and how the test suite holds readings in place (snapshot, doctests, rules with deviates: markers). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pts included A strict choice keeps mul.toml's readings and native-script ones whatever file holds them (strict_kept), so JOHN SMITH MBA, John Smith Junior and JOHN SMITH ING still read by the count and report under strict nl, hi or de. customize.rst's two strict sentences and docs/AGENTS.md's Claims rule said it kept only the chosen files; the rule now also says readings_of() leaves out readings off by default (es lady given) and adds a both-in-mul word to the layouts to test. strict_pool's docstring said native-script vocabulary where it keeps native-script name readings too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of aa001cc: strict_kept tests whether the WORD is native script, so a non-Latin file's readings of a Latin word leave too (ar.toml's bin: strict nl reads Ahmed bin Ali middle bin). The mul clause now names the file's readings rather than whole words (i has a mul reading beside ca's and pl's), the both-in-mul case joins customize.rst's unsettled forks, and strict_pool's docstring states its three sources unambiguously. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of 3c1fe54: the measurement moves into the speed bullet and names the tree; the linear claim is stated for the 32 shapes the scaling tests repeat; the snapshot count names its 6,897 distinct names; the ja extra brings namedivider's numeric stack, and its segmenter does not pickle; building a locale parser costs about twenty parses (a default Parser() costs less than one, so the reuse reason is stated for a locale); the CI bullet says which jobs run which tests; known gaps only carry deviates: markers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README: the reason to reuse a parser is the first build of a language choice (tens of ms for ES, over a hundred parses; a repeat about 1 ms); 25 tests need the ja extra and skip in the build matrix; the scaling bound is stated (more than six times, repeated part four times as long); namedivider's dependencies named; the tree dated as the one that became 3.0. Strict wording: customize.rst's premise names mul and its clause says whose readings are dropped; AGENTS.md files bin under the vocabulary half and states the script predicate (a letter, no Latin one); locales.rst's strict paragraph now speaks reading by reading (Catalan's and Polish's i leave though mul holds the numeral). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README: the first build of a language choice is mostly the one-time reading-index load (tens of ms); another choice after it costs a few ms. The tree is the 3.0 development tree again (no tag yet). customize.rst's strict clause keeps the chosen files' readings explicitly. locales.rst and AGENTS.md wording fixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks done
derek73
added a commit
that referenced
this pull request
Nov 8, 2026
* Say what a strict choice keeps of a native-script word A strict choice keeps a native-script word's readings, name readings included, exactly as a plain choice of the same languages keeps them: a reading written default = false stays off unless its file is chosen (strict pt reads गुरु प्रसाद शर्मा title गुरु). Seven sites said "native-script vocabulary", leaving the name readings unsaid (Lexicon.strict, parser_for and its refusal, the UNCHOOSABLE comment, AGENTS.md, mechanisms.md, decisions/vocabulary-model's Standing summary, the RFC), and #1146/#1147's customize.rst and docs/AGENTS.md said a word in another script keeps "every file's" readings. Also from the post-merge review of af7431c: the README's first-build cost of a choice includes the reading index only unless a parse has already loaded it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Record the native-script clarification, and fix the review findings A dated decisions entry (2026-11-07 #1148) states what a strict choice keeps of a native-script word, with head notes on the 2026-10-30 file-strict and 2026-11-02 #1005 entries and the Standing lines pointing at it, so a Standing line no longer says what no entry says. The RFC's overview, its strict-hu and strict-ko sentences, its no-language refusal sentence and its operations-table row now say native-script words' readings; its File-strict paragraph's verb agrees again. The README's first-build sentence loads, not compiles, the reading index. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Write the native-script entry as a partial supersession decisions/README.md allows four kinds of edit to an entry, and "clarified by" is none of them; the 2026-10-30 entry's item 1 also says name readings leave. So the new entry SUPERSEDES both clauses in part, and the two heads say so in the sanctioned form. The entry names the filter as it was at 3j (strict_pool's) and since #1001 (strict_kept). The RFC's Status paragraph and phasing row get the same parenthetical as its overview, and strict hu's readings are the default's, a plain hu choice being refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Mark the 3j head's native-script wording superseded by #1148 too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Restore the comma in the #1148 entry's SUPERSEDES list Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- 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.
Adds a short Speed and testing section to
README.rst(the PyPI project page), right after "How well it reads names". It also carries, in a commit of its own (aa001cc, then amended by the review rounds), four doc fixes from a post-merge review of #1146: what a strict language choice keeps, stated reading by reading (docs/customize.rst,docs/AGENTS.md's Claims rule,docs/locales.rst's strict paragraph,strict_pool's docstring).Where each figure comes from
All measured 2026-11-07 on this branch (master at 83e499d plus this PR's docs-only commits), Apple M3 Pro, Python 3.11.17.
Per-parse cost: about 90 µs a name, about 11,000 names a second. One default
Parser(), parsing every non-emptynameintools/differential/snapshot.jsonl(7,106 entries, 6,897 distinct names; 209 entries repeat a name under anothername_order, and the recipe ignores the order). One warm-up pass, then the median of seven timed passes. Runs: 89.4, 91.4 and 91.2 µs; reviewers measured 92.5–97.1 µs on a loaded machine. The same script on 3.14.7 gave 83.1 µs. The corpus includes CLDR's fictional renderings, so this is a timing workload and makes no accuracy claim.Parser build cost: in a fresh process, after one
parse():parser_forof a language choice (index load plus compile)compile_choiceis cached)Parser()The first row is mostly the one-time
index()load, which a reviewer measured at 27.5 ms.Tests: 40,256 collected (
uv run pytest --collect-only -q -n0 | grep -c ::); 39,652 undertests/v2/. A full run without the extra gave 40,162 passed, 29 skipped and 5 xfailed. Of the 29 skips, 25 need thejaextra; the other 4 aretest_parser.py:2045rows that skip everywhere.Scaling shapes: 32 clock-timed shapes,
len(_SHAPES) + len(_PREFIXED_SHAPES) + len(_POLICY_SHAPES)= 23 + 7 + 2, timed atbaseandbase * _FACTOR(4), and failing when the ratio is not below_MAX_RATIO = 6.0.Other claims, checked against the tree
pyproject.tomlhasdependencies = []. Per uv.lock, thejaextra's namedivider-python brings numpy, pandas, scipy, lightgbm, regex and typer.docs/concepts.rst"Parsers are values" and customize.rst. Pickling: round-trips ofParser(),parser_for(locales.ES)andparser_for(locales.ZH)checked.ja_segmenter()returns a nested closure, so it cannot pickle.buildmatrix (3.11–3.15) runs the parallel pass, then the serial pass.ja-extra(3.11, 3.15) runstests/v2/.source-treeruns from agit archiveexport without nameparser installed.>>>example runs: CI runssphinx-build -b doctest docsandpython -m doctest README.rst. Every>>>underdocs/sits in a.. doctest::block.deviates:: perdocs/design/rules/README.md, the runner asserts today's output. No rule carries a marker today, so the README gives no count.parser_for(Locale(code=..., lexicon=Lexicon.empty(), languages=frozenset({...})), strict=...):JOHN SMITH MBA,INGandJohn Smith Junior(allmul) still read as suffix and report under strict nl, hi and de.JOHN SMITH MAas familyMAandAhmed bin Alias middlebin;ar.tomlis a non-Latin file whose Latin-letter readings strict drops.JAN I SMITHunreported; plain nl reportsconjunction-or-initial.Do Smithas familyDo Smith.गुरु.Checks:
python -m doctest README.rst, PyPI'sreadme_renderer,sphinx-build -b doctestand-b htmlall clean;tests/v2/test_doc_citations.pypasses.Reviews
pr-review-toolkit:code-reviewerandpr-review-toolkit:comment-analyzer.jaextra pulls a numeric stack, and its segmenter does not pickle.pr-review-toolkit:comment-analyzer. Strict tests the word's script, not the file's (ar'sbin);mulkeeps readings, not words (i); the both-in-mul case was missing; thestrict_pooldocstring was ambiguous. Fixed in a151952.pr-review-toolkit:comment-analyzer.binwas filed under name readings.mul.locales.rst's strict paragraph described a word at a time. Fixing it was a sweep this PR had missed.pr-review-toolkit:comment-analyzer.Follow-up, not in this PR: "native-script vocabulary", which leaves native-script name readings unsaid, also appears in
Lexicon.strict's docstring (_lexicon.py),parser_for's docstring (_parser.py), root AGENTS.md, theUNCHOOSABLEcomment,mechanisms.md, the vocabulary-model RFC and decisions/vocabulary-model's Standing summary. None of these is false about vocabulary.🤖 Generated with Claude Code