Interface for Yandex dictionary.
More...
|
def | __init__ (self, settings, lang='ru-ru', timeout=5000) |
|
def | prepare_request_url (self, word) |
| Constructs the search URL given a search word. More...
|
|
def | get_short_defs (self, word, exact_match=True, partsofspeech=None, bad_pos='UNKNOWN') |
| Returns the abridged definition for the given entry. More...
|
|
def | get_definitions (self, word, method='json') |
| Returns full definitions for 'word' in JSON (python object) or raw text format. More...
|
|
◆ __init__()
def pycross.utils.onlineservices.YandexDict.__init__ |
( |
|
self, |
|
|
|
settings, |
|
|
|
url_template = 'ru-ru' , |
|
|
|
timeout = 5000 |
|
) |
| |
◆ get_short_defs()
def pycross.utils.onlineservices.YandexDict.get_short_defs |
( |
|
self, |
|
|
|
word, |
|
|
|
exact_match = True , |
|
|
|
partsofspeech = None , |
|
|
|
bad_pos = 'UNKNOWN' |
|
) |
| |
Returns the abridged definition for the given entry.
- Parameters
-
word | str the word query |
exact_match | bool if True , only defitions for the exact word given by word will be returned |
partsofspeech | list |tuple parts of speech to get definitions for (None = all available) |
bad_pos | str substitution for part of speech if unavailable |
- Returns
list
list of short definitions in the format: [('word', 'part of speech', [list of defs], 'url'), ...]
Reimplemented from pycross.utils.onlineservices.OnlineDictionary.
◆ prepare_request_url()
def pycross.utils.onlineservices.YandexDict.prepare_request_url |
( |
|
self, |
|
|
|
word |
|
) |
| |
◆ lang
pycross.utils.onlineservices.YandexDict.lang |
The documentation for this class was generated from the following file: