LANG_NAME morphology
Quick start
1) Ensure dependencies are installed
If imports fail or this is the first run in the session, install UralicNLP:
python -m pip install -r scripts/requirements.txt
2) Use the CLI helper for deterministic results
All commands output JSON.
- Morphological analysis:
python scripts/uralic_cli.py analyze --word mieʹcc
- Lemmatize:
python scripts/uralic_cli.py lemmatize --word mieʹcen
- Generate/inflect from a full analysis string:
python scripts/uralic_cli.py generate --inflection mieʹcc+N+Sg+Gen
- Translate a lemma:
python scripts/uralic_cli.py translate --lemma mieʹcc
How to respond to users
Inputs to request (only when missing)
- word or inflection string
- lemma for translations
- The language is fixed to LANG_NAME (
__LANG_ISO__); do not ask the user to choose another language.
Output conventions
- Prefer returning:
- analysis as a list of strings like
mieʹcc+N+Sg+Nom - lemmatization as a list of lemmas
- translation as the JSON value returned by the translation lookup
- generation as a list of surface forms
- analysis as a list of strings like
- If the CLI returns
{ "error": ... }, explain what went wrong and suggest the next action, usually installing deps or checking that the bundled HFST-OL files are present. - This skill works offline by using the bundled HFST-OL files in
scripts/. Do not rely on UralicNLP downloading models.
Script reference
scripts/uralic_cli.py: main entrypoint. Use it instead of rewriting code in-chat.scripts/analyser-gt-desc.hfstol: bundled LANG_NAME analyzer model.scripts/dict1.hfstol: first bundled LANG_NAME translation dictionary.scripts/dict2.hfstol: second bundled LANG_NAME translation dictionary.scripts/generator-gt-norm.hfstol: bundled LANG_NAME generator model.scripts/requirements.txt: dependency list.
Source: mikahama/uralicNLP — distributed by TomeVault.