A morphological analysis library in Rust. This project is forked from kuromoji-rs.
Lindera aims to build a library which is easy to install and provides concise APIs for various Rust applications.
[dependencies]
lindera = "5"Note: Upgrading from v4? See the migration guide for details.
Pre-built dictionaries are available from GitHub Releases.
Download a dictionary archive (e.g. lindera-ipadic-*.zip) and specify the path when loading.
When using the CLI, lindera download ipadic downloads and installs a dictionary automatically.
Lindera tokenizes Japanese text (IPADIC) at roughly 10-20 MB/s single-threaded, depending on hardware and whether the Viterbi lattice is reused across calls. Run make bench to reproduce the benchmark suite (lindera/benches/) on your own machine; see #875 for detailed methodology and comparison numbers.
Lindera also provides Python bindings. You can install it via pip:
pip install linderaFor more details, see the lindera-python directory.
Lindera also provides Node.js bindings. You can install it via npm:
npm install linderaFor more details, see the lindera-nodejs directory.
Lindera also provides Ruby bindings. They are not yet published to RubyGems — build from source; see the lindera-ruby directory for instructions.
Lindera also provides PHP bindings. They are not yet published to Packagist — build from source; see the lindera-php directory for instructions.
Lindera also provides WebAssembly bindings. You can install it via npm:
npm install lindera-wasmThe package is built with wasm-pack's web target and works in browsers
natively as well as with modern bundlers (Vite, Webpack 5).
For more details and a demo application, see the lindera-wasm directory.
MIT