Simple Polish declension (cases) API powered by Morfeusz2.
npm install odmieniacz.jsSimple Polish declension (cases) API powered by morfeusz2-node-bindings.
``js
const odm = require("odmieniacz.js");
odm.dative("Marcin"); // "Marcinowi"
odm.vocative("Marcin"); // "Marcinie"
odm.accusative("Marcin"); // "Marcina"
odm.cases("Marcin");
`
- This library is sync-only.
- This package is heavy (native Morfeusz2 + dictionary) and is intended for server-side usage (Node.js), not the browser.
- It inflects single tokens (one word at a time).
- Under the hood it:
1) runs Morfeusz analysis to pick the best interpretation (lemma + tag)nom/gen/dat/acc/inst/loc/voc
2) rewrites the tag case ()generateTagged
3) calls Morfeusz synthesis ()
If you need full control, you can pass opts.lemma/opts.tag, or call analyse() / generateTagged()` directly.