pymorphy3-dicts-uk

raw JSON →
2.4.1.1.1663094765 verified Fri May 01 auth: no python

Ukrainian morphological dictionary data for the pymorphy3 morphological analyzer. Version 2.4.1.1.1663094765 provides dictionaries for Ukrainian language analysis (part of speech tagging, lemma generation, inflection). Released sporadically.

pip install pymorphy3-dicts-uk
error Failed to load dictionary for language 'uk'
cause The pymorphy3-dicts-uk package is not installed or the dictionary data is not found.
fix
pip install pymorphy3-dicts-uk
error Unknown dictionary format version
cause Mismatch between pymorphy3 version and dictionary version (e.g., pymorphy3 2.4+ with an older dict).
fix
pip install --upgrade pymorphy3 pymorphy3-dicts-uk
error ModuleNotFoundError: No module named 'pymorphy2'
cause Trying to import pymorphy2 instead of pymorphy3.
fix
Use: from pymorphy3 import MorphAnalyzer
gotcha The dictionary package pymorphy3-dicts-uk must be installed separately; it is NOT automatically pulled by pymorphy3. Forgetting to install it results in a RuntimeError: ``Failed to load dictionary for language 'uk'``.
fix Run 'pip install pymorphy3-dicts-uk'.
deprecated Versions prior to 2.4 use an older dictionary format. pymorphy3 2.x requires dictionary version matching the library. If you get import errors or 'Unknown format version', upgrade both.
fix Upgrade: pip install --upgrade pymorphy3 pymorphy3-dicts-uk
gotcha Loading an analyzer with lang='uk' without first verifying the dictionary is installed does not raise an error until parsing is attempted. This can mislead users into thinking setup succeeded.
fix After creating MorphAnalyzer(lang='uk'), call morph.word_is_known('тест') to confirm dictionaries are loaded.

Parses a Ukrainian word to get its normal form and part of speech tag.

"""
Basic usage of pymorphy3 with Ukrainian dictionaries.
"""
import pymorphy3
from pymorphy3 import MorphAnalyzer

# Initialize analyzer with Ukrainian dictionary (automatically uses the installed dict)
morph = MorphAnalyzer(lang='uk')

# Parse a word
parse = morph.parse('кицька')
if parse:
    word = parse[0]
    print(f"Normal form: {word.normal_form}")
    print(f"Part of speech: {word.tag.POS}")
else:
    print("Word not recognized.")