Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 1.66 KB

README.MD

File metadata and controls

68 lines (48 loc) · 1.66 KB

RusLingua 📚

RusLingua is a Python library for retrieving various linguistic information about Russian words. It provides a simple API to get synonyms, antonyms, word associations, cognate words, and definitions.

Features

  • Get synonyms of a word 👥
  • Get antonyms of a word 👎
  • Get word associations 💭
  • Get cognate words (words with a common root) 🌳
  • Get definitions from dictionaries 📖

Quickstart

from ruslingua import RusLingua

ruslingua = RusLingua()

synonyms = ruslingua.get_synonyms('дом')
antonyms = ruslingua.get_antonyms('дом')
associations = ruslingua.get_associations('дом')
cognates = ruslingua.get_cognate_words('дом')  
definition = ruslingua.get_definition('дом')

print(synonyms)  
print(antonyms)
print(associations)
print(cognates)
print(definition)

Installation

pip install ruslingua

Usage

Import the RusLingua class and instantiate it:

from ruslingua import RusLingua

ruslingua = RusLingua()

Then call the methods with a word to get the linguistic information:

synonyms = ruslingua.get_synonyms('дом')
antonyms = ruslingua.get_antonyms('дом')
associations = ruslingua.get_associations('дом')
cognates = ruslingua.get_cognate_words('дом')
definition = ruslingua.get_definition('дом') 

The methods return lists of strings.

Credits

RusLingua retrieves data from various sources: