Skip to content
Kotoshu Kotoshu 言修
Kotoshu

ko·to·shu n.

The fixing and embellishing of words.

Kotoshu checks spelling and grammar in the terminal, the editor, and CI. The engine is pure Ruby, and the checker detects the language of the text before it resolves the dictionary and the language model that the text needs; it downloads nothing without an explicit setup action.

Client + wasm engine

npm install @kotoshu/client @kotoshu/wasm

See it work

The checker surfaces misspellings and offers a fix in place

The demo runs the same engine that the editor extension and the CLI run against a full installation.

3 misspelled
Thequietwasfullofwords.

Click a wavy word to see ranked suggestions, then a chip to apply the fix.

The playground runs this engine in the browser, and it can connect to a self-hosted server instead.

Grammar models

Grammar correction for 16 languages, measured on held-out benchmarks

Each language ships one fp16 ONNX artifact, decoded from the shipped file and scored on the fixed held-out benchmark that its earlier weights measured on. The scorecard records both numbers, so every comparison names its data.

0.5458

English · CoNLL-14

official M² scorer — 3.4× LanguageTool

0.9803

French · held-out

strict span scorer, fp16 weights

0.5558

Korean · held-out

recall 2.3× its earlier weights

0.8035

Italian · held-out

the largest gain: +115% on the same benchmark

The full scorecard — protocols, artifacts, and platform verification →

Language support

36 languages are fully featured, and 98 more have dictionaries staged

A fully featured language carries spelling with affixes, semantic reranking, and keyboard-aware suggestions; frequency ranking accompanies the languages for which Kelly data exists.

辞書 dictionary of supported languages

ca Català n. — full feature affixes · semantic · Catalan-QWERTY cs Čeština n. — full feature affixes · semantic · Czech-QWERTZ da Dansk n. — full feature affixes · semantic · Danish-QWERTY de Deutsch n. — full feature affixes · semantic · QWERTZ el Ελληνικά n. — full feature affixes · frequency · semantic · Greek-Phonetic en English n. — full feature affixes · frequency · semantic · QWERTY es Español n. — full feature affixes · semantic · QWERTY fr Français n. — full feature affixes · semantic · AZERTY hu Magyar n. — full feature affixes · semantic · Hungarian-QWERTZ it Italiano n. — full feature affixes · frequency · semantic · Italian-QWERTY nb Norsk bokmål n. — full feature affixes · semantic · Norwegian-QWERTY nl Nederlands n. — full feature affixes · semantic · Dutch-QWERTY pl Polski n. — full feature affixes · semantic · Polish-QWERTY pt Português n. — full feature affixes · semantic · QWERTY ro Română n. — full feature affixes · semantic · Romanian-QWERTY ru Русский n. — full feature affixes · frequency · semantic · JCUKEN sv Svenska n. — full feature affixes · frequency · semantic · Swedish-QWERTY tr Türkçe n. — full feature affixes · semantic · Turkish-Q uk Українська n. — full feature affixes · semantic · Ukrainian-JCUKEN vi Tiếng Việt n. — full feature affixes · semantic · Vietnamese-QWERTY ar العربية n. — full feature affixes · frequency · semantic · Arabic-101 bg Български n. — full feature affixes · semantic · Bulgarian-BDS et Eesti n. — full feature affixes · semantic · Estonian-QWERTY fa فارسی n. — full feature affixes · semantic · Persian-ISIRI-9147 he עברית n. — full feature affixes · semantic · Hebrew-SI-1452 hr Hrvatski n. — full feature affixes · semantic · Croatian-QWERTZ id Bahasa Indonesia n. — full feature affixes · semantic · Indonesian-QWERTY lt Lietuvių n. — full feature affixes · semantic · Lithuanian-QWERTY lv Latviešu n. — full feature affixes · semantic · Latvian-QWERTY sk Slovenčina n. — full feature affixes · semantic · Slovak-QWERTZ sl Slovenščina n. — full feature affixes · semantic · Slovenian-QWERTZ sr Српски n. — full feature affixes · semantic · Serbian-Cyrillic sr-Latn Srpski n. — full feature affixes · semantic · Croatian-QWERTZ ko 한국어 n. — full feature affixes · semantic · Dubeolsik-2Set ne नेपाली n. — full feature affixes · semantic · Devanagari-InScript nn Norsk nynorsk n. — full feature affixes · semantic · Norwegian-QWERTY

see also zh — frequency tiers only

36

full feature

98

dictionaries staged

176

auto-detected

The full support matrix →

Principles

How Kotoshu is built

Pure Ruby

No shelling out to hunspell or aspell. The only native dependency is the optional onnxruntime — everything else is Ruby that ships in the gem.

Two-stage resources

Setup is explicit and downloads once; the hot path is cache-only and raises instead of ever touching the network. Metered and air-gapped hosts are safe.

Semantic when you want it

FastText embeddings via ONNX rerank candidates by context and rescue out-of-vocabulary words. Install onnxruntime to enable; everything works without it.

Every language, on demand

Given any text, Kotoshu detects the language and resolves the dictionary, frequency list, and model it needs — cached, verified, with TTLs.

始めましょう

Install the checker, or try it in the browser first.