Skip to main content

A python module to get meanings, synonyms and antonyms of words

Project description

PyLexicon: A Dictionary Module for Python
======================================

PyLexicon is an updated and streamlined dictionary module for Python 3 to
get meanings, synonyms, antonyms, and translations. It uses `WordNet`_
for definitions, `Thesaurus.com`_ for synonyms and antonyms, and `Google
Translate`_ for translations.

This module uses ``requests`` and ``BeautifulSoup4`` as dependencies.

Installation
------------

``pip install PyLexicon``

Usage
-----

PyLexicon is designed with simplicity in mind, which makes it easy to use.

PyLexicon has only three functions: ``define``, ``synonym`` ,and
``antonym``

Define:
~~~~~~~

.. code:: python

>>> print(PyLexicon.define('hello'))
{'Noun': ['an expression of greeting']}

Synonym:
~~~~~~~~

.. code:: python

>>> print(PyLexicon.synonym('happy'))
['cheerful', 'contented', 'overjoyed', 'ecstatic', 'elated']

Antonym:
~~~~~~~~

.. code:: python

>>> print(PyLexicon.antonym('happy'))
['melancholy', 'upset', 'disappointed', 'sorrowful', 'unfriendly']

.. _WordNet: https://wordnet.princeton.edu/
.. _Thesaurus.com: http://www.thesaurus.com/
.. _Google Translate: https://translate.google.com/

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

pylexicon-1.0.4.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file pylexicon-1.0.4.tar.gz.

File metadata

  • Download URL: pylexicon-1.0.4.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pylexicon-1.0.4.tar.gz
Algorithm Hash digest
SHA256 5f7a086b32a4fc7a7ae53ecff18d1f86f10d08ade94bfd9da37562d629404591
MD5 d7aa6df23960ff717c0aebb7acb394bc
BLAKE2b-256 0f64d5a9fc8c4802c9a4446ac3b329d42239aef7e4e484278bc3e66bd34385fd

See more details on using hashes here.

Supported by

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