You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplify: hoist the JA union, merge factory closures, trim duplicated prose
* Hoist _JA_SCRIPTS into _policy.py beside _SCRIPT_RANGES: the union
was defined twice (_pipeline/_vocab.py frozenset, locales/ja.py
tuple) with nothing pinning their membership equality -- the same
drift class this branch already deleted at span level. One tuple
now serves the kana license, the ja pack's DEVIATES, and the
adapter's repertoire guard; the katakana rationale moves onto the
ja predicates it explains, and _vocab's naming-defense comment
(guarding a constraint that never existed) goes away.
* Merge _script_matcher's twin closures: one compiled [cls]+ pattern
with the bound method chosen by `whole` -- search over [cls]+ is
exactly contains-any, so the second pattern and closure bought
nothing.
* Reorder ja adapter guards: the O(1) length check now leads the
chain, so routine one-char tokens from spaced input ("林 太郎") no
longer pay the regex fullmatch and the 〆 scan (measured 4x) before
being declined. All guards return the same None, so behavior is
unchanged.
* Trim four prose duplications: the 〆 paragraph's copy of the 々
closer in _policy's table comment (plus an orphan line wrap), the
triple-stated ordering point on _SCRIPT_MATCHERS, locales.rst's
restatement of the marker-classification contract the factory
docstring already carries, and the twice-narrated namedivider
mis-cut measurement in test_locales.py (the authoritative account
stays at ja.py's decline comment).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments