pycrossword
0.4
Pure-Python implementation of a crossword puzzle generator and editor
|
Interface for Merriam-Webster Collegiate dictionary. More...
Public Member Functions | |
def | __init__ (self, settings, 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 | __init__ (self, settings, url_template='', timeout=5000) |
def | get_definitions (self, word, method='json') |
Returns full definitions for 'word' in JSON (python object) or raw text format. More... | |
Additional Inherited Members | |
![]() | |
url | |
str‘ search URL template with placeholders (’{}') for parameters More... | |
timeout | |
int network request timeout (in msec.) More... | |
settings | |
dict stored pointer to app global settings More... | |
Interface for Merriam-Webster Collegiate dictionary.
def pycross.utils.onlineservices.MWDict.__init__ | ( | self, | |
settings, | |||
timeout = 5000 |
|||
) |
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.
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 |
list
list of short definitions in the format: Reimplemented from pycross.utils.onlineservices.OnlineDictionary.
def pycross.utils.onlineservices.MWDict.prepare_request_url | ( | self, | |
word | |||
) |
Constructs the search URL given a search word.
word | str search word |
str
prepared search URL Reimplemented from pycross.utils.onlineservices.OnlineDictionary.