{"library":"pymorphy2","title":"PyMorphy2","description":"PyMorphy2 (version 0.9.1) is a morphological analyzer and inflection engine for the Russian and Ukrainian languages. It provides functionalities for POS tagging, word inflection, and normalization using OpenCorpora.org dictionaries and heuristic algorithms for unknown words. The project's release cadence is infrequent, with the last significant update in September 2020.","language":"python","status":"abandoned","last_verified":"Thu Apr 16","install":{"commands":["pip install pymorphy2","pip install pymorphy2 pymorphy2-dicts"],"cli":null},"imports":["from pymorphy2 import MorphAnalyzer"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pymorphy2\n\nmorph = pymorphy2.MorphAnalyzer()\nword = 'стекло'\n\n# Analyze a word\nparsed_word = morph.parse(word)[0]\nprint(f\"Original word: {word}\")\nprint(f\"Normal form: {parsed_word.normal_form}\")\nprint(f\"Part of speech: {parsed_word.tag.POS}\")\nprint(f\"All tags: {parsed_word.tag}\")\n\n# Inflect a word\ninflected = parsed_word.inflect({'gent'})\nif inflected: # Check if inflection was successful\n    print(f\"Inflected to genitive: {inflected.word}\")\nelse:\n    print(f\"Could not inflect '{word}' to genitive.\")","lang":"python","description":"Initializes the MorphAnalyzer and demonstrates basic usage: parsing a word to find its normal form and part of speech, and inflecting it to a different grammatical form. The `pymorphy2-dicts` package must be installed for dictionaries to be found.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}