Registry / ai-ml / pymorphy3

pymorphy3

JSON →
library2.0.6pypypiunverified

PyMorphy3 is a morphological analyzer (POS tagger + inflection engine) for the Russian language. It provides tools for parsing words, getting normal forms, and inflecting words into various grammatical forms. The current version is 2.0.6, and the library is actively maintained with frequent minor releases to support new Python versions and address issues.

pip install pymorphy3 pymorphy3-dicts-ru
INSTALL
IMPORT
SIG · PYMORPHY3
P
pymorphy3
ai-mlpythonv2.0.6
Install
2.3s avg
Import
87ms
Disk
41MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.6 · 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
musl
py 3.103.940 runs
installs and imports cleanly · install 0.0s · import 0.089s · 40.7MB
glibc
py 3.103.940 runs
installs and imports cleanly · install 2.3s · import 0.085s · 39MB
41MB installed
● package 41MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MorphAnalyzer
from pymorphy3 import MorphAnalyzer
from pymorphy3.analyzer import MorphAnalyzer
The MorphAnalyzer class is now directly available at the top-level package for simplicity.

Initializes the MorphAnalyzer and demonstrates parsing a word to get its grammatical tag and normal form, then inflecting it to a different case.

import pymorphy3 morph = pymorphy3.MorphAnalyzer() # Parse a word word_analysis = morph.parse('стали')[0] print(f"Word: {word_analysis.word}") print(f"Tag: {word_analysis.tag}") print(f"Normal form: {word_analysis.normal_form}") # Inflect a word to a different form inflected_word = word_analysis.inflect({'sing', 'datv'}) if inflected_word: print(f"Inflected form (singular, dative): {inflected_word.word}")
Debug
Known issues
breakingSupport for Python 2 and Python 3.5 was officially dropped in version 2.0.0. If you are using these Python versions, you must stick to `pymorphy3 < 2.0.0` or upgrade your Python environment.
fix
Upgrade your Python interpreter to 3.6 or higher, or pin `pymorphy3` to `<2.0.0`.
affects: >=2.0.0
breakingThe `restore_word_case` function was removed in version 2.0.5 due to cleanup and deprecation. Code relying on this function will fail.
fix
Remove calls to `restore_word_case`. You may need to handle word casing manually or derive it from the `lexeme` property of a `Parse` object if applicable.
affects: >=2.0.5
gotchaFor improved performance, especially with large texts, PyMorphy3 offers C-extension based 'fast' extras. These require Python 3.9+ and installing with `pymorphy3[fast]`.
fix
Install with `pip install 'pymorphy3[fast]' pymorphy3-dicts-ru` to enable C-extensions for faster processing on supported Python versions.
affects: >=2.0.3
gotchaThe command-line interface (CLI) dependency was switched from `docopt` to `Click` in version 1.3.0, making `Click` an optional dependency. If you use `pymorphy3` from the command line, you might encounter issues if `Click` is not installed.
fix
Ensure `Click` is installed if you use the CLI tools: `pip install pymorphy3[cli]` (or `pip install Click`).
affects: >=1.3.0
Upgrade
Version history
2.0.6latest on PyPI · released Oct 9, 2025
Audit
Dependencies
pymorphy3-dicts-rurequiredEssential dictionary package for Russian language analysis.
ClickoptionalRequired for command-line interface (CLI) tools.
Agent activity
18 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources
pymorphy3 — pip install pymorphy3 · libregistry