文書Documentation
Comparison
Kotoshu next to hunspell, cspell, and LanguageTool — an honest feature table and guidance on choosing.
Four tools with overlapping names for the job and different centers of gravity. This table is written to be fair.
比較Compare
Feature by feature
| Dimension | Kotoshu | hunspell CLI | cspell | LanguageTool |
|---|---|---|---|---|
| Implementation | Ruby and Rust twins (byte-identical), wasm, native ext | C++ | TypeScript / Node | Java |
| Dictionaries | Hunspell-format, downloaded on demand (~98 staged); local .aff/.dic welcome | System-installed .aff/.dic | Many bundled, plus project dictionaries | Bundled per language |
| Semantic reranking | Yes — FastText-to-ONNX embeddings, opt-in | — | — (case- and code-aware, not semantic) | ML-ranked suggestions; no embedding rerank |
| Grammar rules | Roadmap — rule packs planned | — | — (spelling only) | Yes — thousands of rules, the benchmark |
| Editor integration | LSP server — VS Code, Neovim, Emacs, JetBrains | Whatever your editor bundles | Official VS Code extension; community elsewhere | Extensions for most editors, Office, Google Docs |
| CI & SARIF | SARIF 2.1.0, JSON, stable exit codes, GitHub Action | Text output; wire it yourself | GitHub Action, JSON; SARIF via wrappers | Community actions; SARIF via wrappers |
| HTTP API / SDKs | kotoshu-server, plus Python, JS, Go SDKs | — | — (JS library) | First-class HTTP API, Docker |
| Offline / self-host | Yes — two-stage setup, then KOTOSHU_OFFLINE=1 | Yes, fully local | Yes, local run | Yes — desktop app or self-host server |
| License | BSD-2-Clause (dictionaries vary) | GPL / LGPL / MPL tri-license | Apache-2.0 (dictionaries vary) | LGPL-2.1+ |
| Size on disk | ~5 MB per language; ONNX model optional (~230–460 MB) | A few MB per language | Tens of MB with Node | Hundreds of MB with Java and rule data |
Choosing
Choose Kotoshu if you want provable engine correctness — two independent implementations held to a frozen, CI-enforced conformance contract — on whichever channel fits your stack: a library or CLI in Ruby, an embedded engine through wasm, Python, or Rust, a self-hosted HTTP service, or a GitHub Action with baselines and SARIF. Choose it too if fetching dictionaries, frequency lists, and models on demand beats vendoring them, and if you want suggestions reranked by context.
Choose the incumbents when tooling maturity matters more than semantic ranking: hunspell for the smallest, fastest, most ubiquitous binary, and cspell if committed-in-repository configuration for a polyglot codebase is the deciding factor, which is its strength today.
Choose LanguageTool if grammar breadth is the requirement. Nothing else in this table approaches its rule library, and pretending otherwise would not make it true.
Migrating from any of these? The per-tool notes are in Migrating, and the sixty-second install path is on the install page.