Registry / ai-ml / pymorphy3-dicts-ru

pymorphy3-dicts-ru

JSON →
library2.4.417150.4580142pypypiunverified

pymorphy3-dicts-ru provides Russian morphological dictionaries primarily for the `pymorphy3` library. `pymorphy3` is an active morphological analyzer (POS tagger + inflection engine) for Russian and Ukrainian languages, serving as the continuation of the unmaintained `pymorphy2` project. While these dictionaries can be configured for `pymorphy2`, their main use case is with `pymorphy3`. The dictionary package is updated as needed, with the last release on January 8, 2022, complementing the more frequently updated `pymorphy3` library.

pip install pymorphy3-dicts-ru pymorphy3
INSTALL
IMPORT
SIG · PYMORPHY3-DICTS-RU
P
pymorphy3-dicts-ru
ai-mlpythonv2.4.417150.4580142
Install
2.2s avg
Import
Disk
35MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 34MB
glibc
py 3.103.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.
fix
Install `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.
fix
Initialize `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`.
fix
Always 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.
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
pymorphy3-dicts-ru — pip install pymorphy3-dicts-ru · libregistry