{"id":13501987,"url":"https://github.com/tasdikrahman/vocabulary","last_synced_at":"2025-03-29T10:32:38.873Z","repository":{"id":62587751,"uuid":"47144923","full_name":"tasdikrahman/vocabulary","owner":"tasdikrahman","description":"[Not Maintained anymore] Python Module to get Meanings, Synonyms and what not for a given word","archived":true,"fork":false,"pushed_at":"2019-11-04T04:42:35.000Z","size":570,"stargazers_count":556,"open_issues_count":15,"forks_count":75,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-05-20T21:19:53.799Z","etag":null,"topics":["antonym","api","dictionary","glosbe","nlp","pronunciation","python","synonyms","wordnik"],"latest_commit_sha":null,"homepage":"https://vocabulary.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tasdikrahman.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-30T20:45:03.000Z","updated_at":"2024-05-20T21:19:53.800Z","dependencies_parsed_at":"2022-11-03T22:10:08.854Z","dependency_job_id":null,"html_url":"https://github.com/tasdikrahman/vocabulary","commit_stats":null,"previous_names":["prodicus/vocabulary"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasdikrahman%2Fvocabulary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasdikrahman%2Fvocabulary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasdikrahman%2Fvocabulary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasdikrahman%2Fvocabulary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tasdikrahman","download_url":"https://codeload.github.com/tasdikrahman/vocabulary/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246174200,"owners_count":20735406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antonym","api","dictionary","glosbe","nlp","pronunciation","python","synonyms","wordnik"],"created_at":"2024-07-31T22:01:57.552Z","updated_at":"2025-03-29T10:32:38.448Z","avatar_url":"https://github.com/tasdikrahman.png","language":"Python","funding_links":["https://www.paypal.me/tasdik","https://www.patreon.com/tasdikrahman/"],"categories":["Python"],"sub_categories":[],"readme":".. figure:: http://i.imgur.com/ddxYie4.jpg\n   :alt:\n\nVocabulary\n==========\n\n|PyPI version| |License| |Python Versions| |Build Status| |Requirements Status| |Gitter chat|\n\nA dictionary magician in the form of a module!\n\n:Author: Tasdik Rahman\n\n.. contents::\n    :backlinks: none\n\n.. sectnum::\n\nWhat is it\n----------\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\nFor a given word, using ``Vocabulary``, you can get its\n\n-  **Meaning**\n-  **Synonyms**\n-  **Antonyms**\n-  **Part of speech** : whether the word is a ``noun``, ``interjection``\n   or an ``adverb`` et el\n-  **Translate** : Translate a phrase from a source language to the desired language.\n-  **Usage example** : a quick example on how to use the word in a\n   sentence\n-  **Pronunciation**\n-  **Hyphenation** : shows the particular stress points(if any)\n\nFeatures\n--------\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\n-  Written in uncomplicated ``Python``\n-  Returns ``JSON`` objects, ``PYTHON`` dictionaries and lists\n-  Minimum dependencies ( just uses `requests \u003chttps://github.com/kennethreitz/requests\u003e`__ module )\n-  Easy to\n   `install \u003chttps://github.com/tasdikrahman/vocabulary#installation\u003e`__\n-  A decent substitute to ``Wordnet``\\ (well almost!) Wanna see? Here is\n   a `small comparison \u003c#wordnet-comparison\u003e`__\n-  Stupidly `easy to\n   use \u003chttps://github.com/tasdikrahman/vocabulary#usage\u003e`__\n-  Fast!\n-  Supports\n\n   -  both, ``python2.*`` and ``python3.*``\n   -  Works on Mac, Linux and Windows\n\nWhy should I use Vocabulary\n---------------------------\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\n``Wordnet`` is a great resource. No doubt about it! So why should you\nuse ``Vocabulary`` when we already have ``Wordnet`` out there?\n\nWordnet Comparison\n~~~~~~~~~~~~~~~~~~\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\nLet's say you want to find out the synonyms for the word ``car``.\n\n-  Using ``Wordnet``\n\n.. code:: python\n\n    \u003e\u003e\u003e from nltk.corpus import wordnet\n    \u003e\u003e\u003e syns = wordnet.synsets('car')\n    \u003e\u003e\u003e syns[0].lemmas[0].name\n    'car'\n    \u003e\u003e\u003e [s.lemmas[0].name for s in syns]\n    ['car', 'car', 'car', 'car', 'cable_car']\n\n    \u003e\u003e\u003e [l.name for s in syns for l in s.lemmas]\n    ['car', 'auto', 'automobile', 'machine', 'motorcar', 'car', 'railcar', 'railway_car', 'railroad_car', 'car', 'gondola', 'car', 'elevator_car', 'cable_car', 'car']\n\n-  Doing the same using ``Vocabulary``\n\n.. code:: python\n\n    \u003e\u003e\u003e from vocabulary.vocabulary import Vocabulary as vb\n    \u003e\u003e\u003e vb.synonym(\"car\")\n    '[{\n      \"seq\": 0,\n      \"text\": \"automobile\"\n    }, {\n      \"seq\": 1,\n      \"text\": \"cart\"\n    }, {\n      \"seq\": 2,\n      \"text\": \"automotive\"\n    }, {\n      \"seq\": 3,\n      \"text\": \"wagon\"\n    }, {\n      \"seq\": 4,\n      \"text\": \"motor\"\n    }]'\n    \u003e\u003e\u003e ## load the json data\n    \u003e\u003e\u003e car_synonyms = json.loads(vb.synonym(\"car\"))\n    \u003e\u003e\u003e type(car_synonyms)\n    \u003cclass 'list'\u003e\n    \u003e\u003e\u003e\n\nSo there you go. You get the data in an easy ``JSON`` format.\n\nYou can go on comparing for the other methods too.\n\nInstallation\n------------\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\nOption 1: installing through `pip \u003chttps://pypi.python.org/pypi/vocabulary\u003e`__ (Suggested way)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n`pypi package link \u003chttps://pypi.python.org/pypi/vocabulary\u003e`__\n\n``$ pip install vocabulary``\n\nIf you are behind a proxy\n\n``$ pip --proxy [username:password@]domain_name:port install vocabulary``\n\n**Note:** If you get ``command not found`` then\n``$ sudo apt-get install python-pip`` should fix that\n\nOption 2: Installing from source (Only if you must)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: bash\n\n    $ git clone https://github.com/tasdikrahman/vocabulary.git\n    $ cd vocabulary/\n    $ pip install -r requirements.txt\n    $ python setup.py install\n\n\nDemo\n~~~~\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\n.. figure:: https://raw.githubusercontent.com/tasdikrahman/vocabulary/master/assets/usage.gif\n   :alt: Demo link\n\n.. figure:: https://raw.githubusercontent.com/tasdikrahman/vocabulary/master/assets/usage-format.gif\n    :alt: Demo link\n\nDocumentation\n-------------\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\nFor a detailed usage example, refer the `documentation at Read the Docs \u003chttp://vocabulary.readthedocs.org/en/latest/\u003e`__\n\nContributing\n------------\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\nPlease refer `Contributing page for details \u003chttps://github.com/tasdikrahman/vocabulary/blob/master/CONTRIBUTING.rst\u003e`__\n\n\nDiscuss\n~~~~~~~\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\nJoin us on our `Gitter channel \u003chttps://gitter.im/tasdikrahman/vocabulary\u003e`__\nif you want to chat or if you have any questions in your mind.\n\nContributers\n~~~~~~~~~~~~\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\n-  Huge shoutout to `@tenorz007 \u003chttps://github.com/tenorz007\u003e`__ for adding the ability to return the API response as different data structures.\n-  Thanks to `Anton Relin \u003chttps://github.com/relisher\u003e`__ for adding the `translate \u003chttps://github.com/tasdikrahman/vocabulary/blob/master/vocabulary/vocabulary.py#L218\u003e`__ module.\n- And a big shout out to all the `contributers \u003chttps://github.com/tasdikrahman/vocabulary/graphs/contributors\u003e`__ for their contributions\n\nChangelog\n---------\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\nPlease refer `Changelog page for details \u003chttps://github.com/tasdikrahman/vocabulary/blob/master/CHANGELOG.rst\u003e`__\n\nBugs\n----\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\nPlease report the bugs at the `issue\ntracker \u003chttps://github.com/tasdikrahman/vocabulary/issues\u003e`__\n\nSimilar\n-------\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\nOther similar software inspired by `Vocabulary \u003chttps://github.com/tasdikrahman/vocabulary\u003e`__\n\n-  `Vocabulary \u003chttps://github.com/karan/vocabulary\u003e`__ : The ``Go lang`` port of this ``python`` counterpart\n-  `woordy \u003chttps://github.com/alephmelo/woordy\u003e`__ : Gives back word translations\n-  `guile-words \u003chttp://pasoev.github.io/words/\u003e`__ : The ``Guile Scheme`` port of this ``python`` counterpart\n\nKnown Issues\n~~~~~~~~~~~~\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\n-  In **python2**, when using the method **Vocabulary.synonym()** or **Vocabulary.pronunciation()**\n\n.. code:: python\n\n    \u003e\u003e\u003e vb.synonym(\"car\")\n    [{\n      \"seq\": 0,\n      \"text\": \"automotive\"\n    }, {\n      \"seq\": 1,\n      \"text\": \"motor\"\n    }, {\n      \"seq\": 2,\n      \"text\": \"wagon\"\n    }, {\n      \"seq\": 3,\n      \"text\": \"cart\"\n    }, {\n      \"seq\": 4,\n      \"text\": \"automobile\"\n    }]\n    \u003e\u003e\u003e type(vb.pronunciation(\"hippopotamus\"))\n    \u003cclass 'list'\u003e\n    \u003e\u003e\u003e json.dumps(vb.pronunciation(\"hippopotamus\"))\n    '[{\"raw\": \"(h\\\\u012dp\\\\u02cc\\\\u0259-p\\\\u014ft\\\\u02c8\\\\u0259-m\\\\u0259s)\", \"rawType\": \"ahd-legacy\", \"seq\": 0}, {\"raw\": \"HH IH2 P AH0 P AA1 T AH0 M AH0 S\", \"rawType\": \"arpabet\", \"seq\": 1}]'\n    \u003e\u003e\u003e\n\nYou are being returned a ``list`` object instead of a ``JSON`` object.\nWhen returning the latter, there are some ``unicode`` issues. A fix for\nthis will be released soon.\n\nI may suggest `python-ftfy \u003chttps://github.com/LuminosoInsight/python-ftfy\u003e`__ which can help you in this matter.\n\n\nLicense :\n---------\n`[back to top] \u003chttps://github.com/tasdikrahman/vocabulary#vocabulary\u003e`__\n\nBuilt with ♥ by `Tasdik Rahman \u003chttp://tasdikrahman.me/\u003e`__ under the `MIT License \u003chttp://prodicus.mit-license.org/\u003e`__ ©\n\nYou can find a copy of the License at http://prodicus.mit-license.org/\n\nDonation\n--------\n\n|Paypal badge|\n\n|Instamojo|\n\n|gratipay|\n\n|patreon|\n\n.. |PyPI version| image:: https://img.shields.io/pypi/v/Vocabulary.svg\n   :target: https://pypi.python.org/pypi/Vocabulary/1.0.2\n.. |License| image:: https://img.shields.io/pypi/l/vocabulary.svg\n   :target: https://github.com/tasdikrahman/vocabulary/blob/master/LICENSE\n.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/Vocabulary.svg\n.. |Build Status| image:: https://travis-ci.org/tasdikrahman/vocabulary.svg?branch=master\n   :target: https://travis-ci.org/tasdikrahman/vocabulary\n.. |Gitter chat| image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg\n   :alt: Join the chat at https://gitter.im/prodicus/vocabulary\n   :target: https://gitter.im/prodicus/vocabulary?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\n.. |Requirements Status| image:: https://requires.io/github/tasdikrahman/vocabulary/requirements.svg?branch=master\n   :target: https://requires.io/github/tasdikrahman/vocabulary/requirements/?branch=master\n.. |Paypal badge| image:: https://www.paypalobjects.com/webstatic/mktg/logo/AM_mc_vs_dc_ae.jpg\n   :target: https://www.paypal.me/tasdik\n.. |gratipay| image:: https://cdn.rawgit.com/gratipay/gratipay-badge/2.3.0/dist/gratipay.png\n   :target: https://gratipay.com/tasdikrahman/\n.. |Instamojo| image:: https://www.soldermall.com/images/pic-online-payment.jpg\n   :target: https://www.instamojo.com/@tasdikrahman\n.. |patreon| image:: http://i.imgur.com/ICWPFOs.png\n   :target: https://www.patreon.com/tasdikrahman/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftasdikrahman%2Fvocabulary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftasdikrahman%2Fvocabulary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftasdikrahman%2Fvocabulary/lists"}