14 lines
374 B
Plaintext
14 lines
374 B
Plaintext
![]() |
https://pymorphy2.readthedocs.io/en/stable/user/index.html
|
||
|
|
||
|
======= install ========
|
||
|
pip install pymorphy2
|
||
|
pip install -U pymorphy2-dicts-ru
|
||
|
pip install -U pymorphy2-dicts-uk
|
||
|
|
||
|
========= config ============
|
||
|
import pymorphy2
|
||
|
parser = pymorphy2.MorphAnalyzer()
|
||
|
|
||
|
=========== use =============
|
||
|
parser.parse("слон")
|
||
|
parser.parse("слона")[0].inflect({'sing', 'nomn'}).word
|