Dictionary module
Project description
py-dictionary
returns meaning, synonyms, antonyms for a word (scraping dictionary.com) limit the no of results also get meaning, synonyms and antonyms in different color
This module uses requests, bs4 and string-color modules and scraps dictionary.com
How to use it
Install it
pip install Py-Dictionary
to update it
pip install Py-Dictionary --upgrade
Use
from pydictionary import Dictionary
dict = Dictionary("fix")
enter the word you want to search here e.g. I used the word "fix"
To get the result as list do following (you can use them in your programs)
meanings_list = dict.meanings()
synonyms_list = dict.synonyms()
antonyms_list = dict.antonyms()
To print the results do following:
dict.print_meanings()
dict.print_synonyms()
dict.print_antonyms()
This will print maximum 5 results with text having white color
If you want to increase or decrease maximum results do this
dict = Dictionary("fix",10)
now maximum 10 results will be shown
To change the color of text
dict.print_meanings("red")
dict.print_synonyms("green")
dict.print_antonyms("blue")
#To get more color look up string-color module or type string-color in your terminal
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Py-Dictionary-4.1.3.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for Py_Dictionary-4.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e6af9b7e28cbda1abe64d50a965bc401dd32c57d93a76a314cac4989ae9ad1d |
|
MD5 | 5ea911d3937ba5ad1248c0aa22b4afb7 |
|
BLAKE2b-256 | c1ef8b66df8fb4077772880031266f8c6ff3580b5138359b982a0f374e930d1a |