keinontolibrary
A fast, embeddable Rust library that declines Finnish nouns. Give it a noun lemma and a case; it returns the inflected form(s).
decline("hevonen", Number::Plural, Case::Inessive) -> ["hevosissa"]
It is data-backed — precomputed forms from a reference corpus collected over three years and labeled with Voikko — with a rule-based fallback over the Kotus declension classes (taivutustyypit 1–49 with consonant gradation). It covers 100% of declinable Kotus 2024 nominal rows; verbs and the indeclinable tn 99/100 classes are out of scope.
These guides are task-oriented — pick the one that matches what you want to do:
- Embed in a Rust program — add the crate and decline words in your own code.
- Decline from the command line — look up forms from a terminal or script.
- Run the HTTP service — stand up the declension service / container.
- Build the data artifact — rebuild the packed data from sources.
- Fix a wrong declension — the right way to correct a form.
For background on how compounds are handled, see Compound nouns.
The source lives on GitHub. If you’d rather browse declensions than embed them, try humalapaikallissija.com, a toy built on this library.