https://github.com/dedinc/ruslingua
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.
https://github.com/dedinc/ruslingua
antonims cognate ruslingua sinonyms word-associations word-definition
Last synced: about 1 year ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/dedinc/ruslingua
- Owner: DedInc
- License: mit
- Created: 2021-08-22T12:41:01.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-10T15:53:53.000Z (over 2 years ago)
- Last Synced: 2025-03-08T02:08:42.422Z (about 1 year ago)
- Topics: antonims, cognate, ruslingua, sinonyms, word-associations, word-definition
- Language: Python
- Homepage: https://pypi.org/project/ruslingua
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# 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
```python
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:
```python
from ruslingua import RusLingua
ruslingua = RusLingua()
```
Then call the methods with a word to get the linguistic information:
```python
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:
- [jeck.ru](https://jeck.ru) - synonyms 👥
- [razbiraem-slovo.ru](https://razbiraem-slovo.ru) - antonyms 👎 and cognate words 🌳
- [wordassociations.net](https://wordassociations.net) - word associations ðŸ’
- [gramota.ru](https://gramota.ru) - definitions 📖