Skip to main content

To fetch the thesaurus of an input word

Project description

Description

This package gets you the thesaurus of an inputted word from the best dictionary sites available online.

Why you need this package?

Though python provides lexical resources like WordNet, the variety it can provide is poor. The rich content the dictionary.com or the thesaurus.com provides will help the user to enhance their approaches when he/she is dealing with text mining, NLP techniques and much more.

How to install?

Use basic pip install to install this library.

pip install py_thesaurus

Release Notes

Version 1.0 (2017-12-31)

  • Sometimes you need to disagree in life, we added a feature to get antonyms of an inputted word.

  • Synonyms are not a pile of related words anymore. You want synonyms of ‘love’ as a ‘noun’, you get synonyms of ‘love’ as a ‘noun’. Period.

  • We love everyone being one of a kind, there will not be any duplicates in output lists anymore.

  • Output lists are more refined and ordered by relevance since disciplined is new sexy.

  • 0.95 is a decimal but 0.9.5 has a meaning in software development. We got it late, but happily adapted to Semantic Versioning.

  • Several other bugs are brutally killed during the development of this package. No prayers.

How to use PyThesaurus?

1. From python shell

from py_thesaurus import Thesaurus

input_word = "dream"

new_instance = Thesaurus(input_word)

# Get the synonyms according to part of speech
# Default part of speech is noun

print(new_instance.get_synonym())

print(new_instance.get_synonym(pos='verb'))

print(new_instance.get_synonym(pos='adjective'))

# Get the definitions

print(new_instance.get_definition())

# Get the antonyms

print(new_instance.get_antonym())

2. From command line

Positional arguments

word --> Word to get definition/synonym/antonym for

Optional arguments

-h or --help       Show this help message and exit
-d                 get definition
-s {noun,verb,adj} get POS specific synonyms
-a                 get antonyms

Command

py_thesaurus [-h] [-d] [-s {noun,verb,adj}] [-a] word

py_thesaurus -d -s verb -a dream

Contact

Bitbucket: https://redpillscoder@bitbucket.org/redpills01/py_thesaurus.git .

email: redpillsworkspace@gmail.com


Made with Love by Redpills :)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_thesaurus-1.0.1.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file py_thesaurus-1.0.1.tar.gz.

File metadata

File hashes

Hashes for py_thesaurus-1.0.1.tar.gz
Algorithm Hash digest
SHA256 76d5a2af3dbdad5ee2a26ef99dfce3caa0d354461b65eb565592680fe8018045
MD5 5ccb9d64b4c42a85e2b8dcb27a23b5ba
BLAKE2b-256 176ebff77341b7aab27deae72063da9911fe02801a273feb556fe732a148e180

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page