odmieniacz.js
v0.1.0
Published
Simple Polish declension (cases) API powered by Morfeusz2.
Maintainers
Readme
odmieniacz.js
Simple Polish declension (cases) API powered by morfeusz2-node-bindings.
Usage
const odm = require("odmieniacz.js");
odm.dative("Marcin"); // "Marcinowi"
odm.vocative("Marcin"); // "Marcinie"
odm.accusative("Marcin"); // "Marcina"
odm.cases("Marcin");Notes
- 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:
- runs Morfeusz analysis to pick the best interpretation (
lemma+tag) - rewrites the tag case (
nom/gen/dat/acc/inst/loc/voc) - calls Morfeusz synthesis (
generateTagged)
- runs Morfeusz analysis to pick the best interpretation (
If you need full control, you can pass opts.lemma/opts.tag, or call analyse() / generateTagged() directly.
