Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

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


Release history Release notifications

This version
History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pylexicon-1.0.4.tar.gz (2.8 kB) Copy SHA256 hash SHA256 Source None Mar 9, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page