Lindera
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.
Documentation
[dependencies]
lindera = "5.0"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.
Performance
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.
Python Bindings
Lindera also provides Python bindings. You can install it via pip:
pip install lindera-pythonFor more details, see the lindera-python directory.
WebAssembly Bindings
Lindera also provides WebAssembly bindings. You can install it via npm:
npm install lindera-wasmFor more details and a demo application, see the lindera-wasm directory.
License
MIT