Skip to content

tillkolter/python-yandex-dictionary

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-yandex-dictionary

Python module for Yandex.Dictionary API.

Thanks to tyrannosaurus for well done API concept (https://github.com/tyrannosaurus/python-yandex-translate).

Usage

from yandex_dictionary import YandexDictionary
dictionary = YandexDictionary('Your API key here.')
print('Languages:', dictionary.langs)
print('Dictionary directions:', dictionary.directions)
print('Word translations:', dictionary.lookup('Привет', 'ru', 'en'))  # or just 'en'

This will output:

Languages: {'en', 'el', 'ca', 'it', ..}
Translate directions: '['az-ru', 'be-bg', 'be-cs', ..]'
Translate: '{"head":{},"def":[{"text":"hello","pos":"noun","ts":"ˈheˈləʊ","tr":[{"text":"привет","pos":"существительное","syn":[{"text":"приветствие","pos":"существительное","gen":"ср"}],"mean":[{"text":"hi"},{"text":"greeting"}]}]},{"text":"hello","pos":"verb","ts":"ˈheˈləʊ","tr":[{"text":"поздороваться","pos":"глагол","asp":"сов","syn":[{"text":"здороваться","pos":"глагол","asp":"несов"}],"mean":[{"text":"salute"}]}]}]}'

License

WTFPL (Public Domain)

About

Python module for Yandex.Dictionary API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%