報せNews
2026-09-07 報 release. 7 September 2026
The Damerau sweep ranks the right word first in @kotoshu/wasm 0.3.0
The Damerau edit sweep and model-generated candidates reach the browser: Teh now suggests The first, definately suggests definitely, and the playground shows every load and inference step.
- The engine-side fix changes the suggestion sweep to enumerate adjacent transpositions at cost 1, substitutions and insertions over the aff TRY string, and deletions, each validated through affix-aware lookup so that dictionary forms like
definite/IYVPsurface with their surface spelling. The root causes fixed were that the sweep had only ever enumerated stems, so suffixed words likedefinitelycould not appear at any distance; that the INITCAP formThewas lookup-valid but charged case plus transposition as two steps; and that the phonetic and keyboard strategies carried private edit-distance copies that still charged swaps double. Acceptance on full en_US, byte-identical across both engines:TehtoTheat rank 1,definatelytodefinitelyat rank 1, withrecievetoreceiveandwroldtoworldunregressed. semanticSuggest(model, word, k)joins the wasm surface: the int8 tier embeds an out-of-vocabulary word through its character n-grams and returns the nearest vocabulary words — candidate generation the edit-distance sweep cannot produce. The playground merges those neighbors into suggestion lists ahead of its context rerank, labeled with their cosine.- The playground itself grew instrumentation: every artifact download — engine, dictionary, the optional semantic tier — reports a phase-labeled byte bar, checking reports the busy dot and elapsed milliseconds, the misspellings pane sweeps with per-word spinners and a done-of-total count, and the suggestion popover closes with a sweep and rerank timing footer. 2630 conformance vectors regenerated for the new sweep, zero divergence between the Ruby and Rust engines.
see also @kotoshu/wasm on npm gem PR #146 — the Damerau sweep kotoshu-rs PR #19 — the Rust port Playground