|
def | __init__ (self, settings, timeout=5000) |
|
def | prepare_request_url (self, word) |
|
def | get_short_defs (self, word, exact_match=True, partsofspeech=None, bad_pos='UNKNOWN') |
|
def | __init__ (self, settings, url_template='', timeout=5000) |
|
def | get_definitions (self, word, method='json') |
|
◆ __init__()
def pycross.utils.onlineservices.MWDict.__init__ |
( |
|
self, |
|
|
|
settings, |
|
|
|
timeout = 5000 |
|
) |
| |
◆ get_short_defs()
def pycross.utils.onlineservices.MWDict.get_short_defs |
( |
|
self, |
|
|
|
word, |
|
|
|
exact_match = True , |
|
|
|
partsofspeech = None , |
|
|
|
bad_pos = 'UNKNOWN' |
|
) |
| |
Returns the abridged definition for the given entry.
Params:
- word [str]: the word query
- exact_match [bool]: if True, only defitions for the exact word given by 'word' will be returned
- partsofspeech [list or tuple]: parts of speech to get definitions for
(None = all available)
- bad_pos [str]: substitution for part of speech if unavailable
Returns:
- 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.MWDict.prepare_request_url |
( |
|
self, |
|
|
|
word |
|
) |
| |
The documentation for this class was generated from the following file: