Install & Compatibility
Where this runs
tested against v2.4.417150.4580142 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 34MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 2.2s · import 0.000s · 35MB
35MB installed
● package 35MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
get_path
✓ import pymorphy3_dicts_ru
dict_path = pymorphy3_dicts_ru.get_path()
This is primarily for internal use or advanced custom configurations; direct interaction with the dictionary package is rare.
MorphAnalyzer
✓ from pymorphy3 import MorphAnalyzer
The primary way to use the dictionaries is through the MorphAnalyzer class from the `pymorphy3` library.
This quickstart demonstrates the basic usage of `pymorphy3` which automatically leverages the installed `pymorphy3-dicts-ru` package. It shows how to initialize the `MorphAnalyzer` and parse a Russian word to get its normal form, part-of-speech tag, and grammemes.
import pymorphy3
# Initialize MorphAnalyzer (it automatically finds the installed dictionary)
morph = pymorphy3.MorphAnalyzer()
word = "красивая"
parsed_word = morph.parse(word)[0] # Get the first (most probable) parse
print(f"Original word: {word}")
print(f"Normal form: {parsed_word.normal_form}")
print(f"POS tag: {parsed_word.tag.POS}")
print(f"Grammemes: {', '.join(parsed_word.tag.grammemes)}")
word_not_found = "asasas"
parsed_unknown = morph.parse(word_not_found)
if not parsed_unknown:
print(f"\nWord '{word_not_found}' not found in dictionary.")
else:
print(f"\nParse for '{word_not_found}': {parsed_unknown[0].normal_form}")
Debug
Known issues
breakingThe `pymorphy2` library, which previously used similar dictionaries, is unmaintained. Users should migrate to `pymorphy3` for ongoing support and new features.fixInstall `pymorphy3` and update your code to use `pymorphy3.MorphAnalyzer`. The dictionary package `pymorphy3-dicts-ru` is primarily designed for `pymorphy3`.
affects: <= `pymorphy2` latest
gotchaRepeatedly calling `pymorphy3.MorphAnalyzer()` to create new instances within your application will cause slow performance, especially during startup, as dictionaries are reloaded each time.fixInitialize `pymorphy3.MorphAnalyzer()` once at the beginning of your application or process and reuse the same instance throughout. Dictionaries are large and caching them is essential for performance.
affects: All versions
gotchaThe PyPI description for `pymorphy3-dicts-ru` initially referred to `pymorphy2`, which can be confusing. The package is intended for `pymorphy3`.fixAlways install and use `pymorphy3` with `pymorphy3-dicts-ru` for the most up-to-date and supported functionality. While limited compatibility with `pymorphy2` might exist, it's not the recommended path.
affects: All versions
Upgrade
Version history
2.4.417150.4580142latest on PyPI · released Jan 8, 2022
Audit
Dependencies
pymorphy3requiredProvides the core morphological analysis functionality that uses these dictionaries.