All Projects → tasdikrahman → Vocabulary

tasdikrahman / Vocabulary

Licence: mit
[Not Maintained anymore] Python Module to get Meanings, Synonyms and what not for a given word

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Vocabulary

Twitchlib
C# Twitch Chat, Whisper, API and PubSub Library. Allows for chatting, whispering, stream event subscription and channel/account modification. Supports .NET Core 2.0
Stars: ✭ 519 (-4.77%)
Mutual labels:  api
Zdict
The last online dictionary framework you need. (?)
Stars: ✭ 531 (-2.57%)
Mutual labels:  dictionary
Hprose Java
Hprose is a cross-language RPC. This project is Hprose 2.0 for Java
Stars: ✭ 542 (-0.55%)
Mutual labels:  api
Dorita980
Unofficial iRobot Roomba and Braava (i7/i7+, 980, 960, 900, e5, 690, 675, m6, etc) node.js library (SDK) to control your robot
Stars: ✭ 523 (-4.04%)
Mutual labels:  api
Googledictionaryapi
Google does not provide Google Dictionary API so I created one.
Stars: ✭ 528 (-3.12%)
Mutual labels:  api
Openscoring
REST web service for the true real-time scoring (<1 ms) of Scikit-Learn, R and Apache Spark models
Stars: ✭ 536 (-1.65%)
Mutual labels:  api
Yandex Php Library
PHP библиотека к API Яндекса
Stars: ✭ 517 (-5.14%)
Mutual labels:  api
Ecommerce Open Api
果酱小店:基于 Laravel + swoole + 小程序的开源电商系统,优雅与性能兼顾 : )
Stars: ✭ 546 (+0.18%)
Mutual labels:  api
Eos Go
EOS.IO Go API library
Stars: ✭ 531 (-2.57%)
Mutual labels:  api
Sweetest
小而美的自动化测试解决方案,支持 Web UI 测试,Http 接口测试,DB 操作测试,App 测试,小程序测试,Windows GUI 测试,文件操作
Stars: ✭ 542 (-0.55%)
Mutual labels:  api
Miniprogram Demo
微信小程序组件 / API / 云开发示例
Stars: ✭ 5,207 (+855.41%)
Mutual labels:  api
Video Transcoding Api
Agnostic API to transcode media assets across different cloud services.
Stars: ✭ 530 (-2.75%)
Mutual labels:  api
Twilio Csharp
Twilio C#/.NET Helper Library for .NET Framework 3.5+ and supported .NET Core versions
Stars: ✭ 541 (-0.73%)
Mutual labels:  api
Fuzzapi
Fuzzapi is a tool used for REST API pentesting and uses API_Fuzzer gem
Stars: ✭ 521 (-4.4%)
Mutual labels:  api
Notykt
📒 NotyKT is a complete 💎Kotlin-stack (Backend + Android) 📱 application built to demonstrate the use of Modern development tools with best practices implementation🦸.
Stars: ✭ 543 (-0.37%)
Mutual labels:  api
Api Pack
A Symfony pack for API Platform
Stars: ✭ 520 (-4.59%)
Mutual labels:  api
Jikan
Unofficial MyAnimeList PHP+REST API which provides functions other than the official API
Stars: ✭ 531 (-2.57%)
Mutual labels:  api
Scantron
A distributed nmap / masscan scanning framework complete with an API client for automation workflows
Stars: ✭ 542 (-0.55%)
Mutual labels:  api
Rick And Morty Api
The Rick and Morty API
Stars: ✭ 542 (-0.55%)
Mutual labels:  api
Resize Observer
Polyfills the ResizeObserver API.
Stars: ✭ 540 (-0.92%)
Mutual labels:  api

.. figure:: http://i.imgur.com/ddxYie4.jpg :alt:

Vocabulary

|PyPI version| |License| |Python Versions| |Build Status| |Requirements Status| |Gitter chat|

A dictionary magician in the form of a module!

:Author: Tasdik Rahman

.. contents:: :backlinks: none

.. sectnum::

What is it

[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>__

For a given word, using Vocabulary, you can get its

  • Meaning
  • Synonyms
  • Antonyms
  • Part of speech : whether the word is a noun, interjection or an adverb et el
  • Translate : Translate a phrase from a source language to the desired language.
  • Usage example : a quick example on how to use the word in a sentence
  • Pronunciation
  • Hyphenation : shows the particular stress points(if any)

Features

[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>__

  • Written in uncomplicated Python

  • Returns JSON objects, PYTHON dictionaries and lists

  • Minimum dependencies ( just uses requests <https://github.com/kennethreitz/requests>__ module )

  • Easy to install <https://github.com/tasdikrahman/vocabulary#installation>__

  • A decent substitute to Wordnet\ (well almost!) Wanna see? Here is a small comparison <#wordnet-comparison>__

  • Stupidly easy to use <https://github.com/tasdikrahman/vocabulary#usage>__

  • Fast!

  • Supports

    • both, python2.* and python3.*
    • Works on Mac, Linux and Windows

Why should I use Vocabulary

[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>__

Wordnet is a great resource. No doubt about it! So why should you use Vocabulary when we already have Wordnet out there?

Wordnet Comparison

`[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>`__

Let's say you want to find out the synonyms for the word ``car``.

-  Using ``Wordnet``

.. code:: python

    >>> from nltk.corpus import wordnet
    >>> syns = wordnet.synsets('car')
    >>> syns[0].lemmas[0].name
    'car'
    >>> [s.lemmas[0].name for s in syns]
    ['car', 'car', 'car', 'car', 'cable_car']

    >>> [l.name for s in syns for l in s.lemmas]
    ['car', 'auto', 'automobile', 'machine', 'motorcar', 'car', 'railcar', 'railway_car', 'railroad_car', 'car', 'gondola', 'car', 'elevator_car', 'cable_car', 'car']

-  Doing the same using ``Vocabulary``

.. code:: python

    >>> from vocabulary.vocabulary import Vocabulary as vb
    >>> vb.synonym("car")
    '[{
      "seq": 0,
      "text": "automobile"
    }, {
      "seq": 1,
      "text": "cart"
    }, {
      "seq": 2,
      "text": "automotive"
    }, {
      "seq": 3,
      "text": "wagon"
    }, {
      "seq": 4,
      "text": "motor"
    }]'
    >>> ## load the json data
    >>> car_synonyms = json.loads(vb.synonym("car"))
    >>> type(car_synonyms)
    <class 'list'>
    >>>

So there you go. You get the data in an easy ``JSON`` format.

You can go on comparing for the other methods too.

Installation
------------
`[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>`__

Option 1: installing through `pip <https://pypi.python.org/pypi/vocabulary>`__ (Suggested way)

pypi package link <https://pypi.python.org/pypi/vocabulary>__

$ pip install vocabulary

If you are behind a proxy

$ pip --proxy [username:[email protected]]domain_name:port install vocabulary

Note: If you get command not found then $ sudo apt-get install python-pip should fix that

Option 2: Installing from source (Only if you must)


.. code:: bash

    $ git clone https://github.com/tasdikrahman/vocabulary.git
    $ cd vocabulary/
    $ pip install -r requirements.txt
    $ python setup.py install


Demo
~~~~
`[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>`__

.. figure:: https://raw.githubusercontent.com/tasdikrahman/vocabulary/master/assets/usage.gif
   :alt: Demo link

.. figure:: https://raw.githubusercontent.com/tasdikrahman/vocabulary/master/assets/usage-format.gif
    :alt: Demo link

Documentation
-------------
`[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>`__

For a detailed usage example, refer the `documentation at Read the Docs <http://vocabulary.readthedocs.org/en/latest/>`__

Contributing
------------
`[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>`__

Please refer `Contributing page for details <https://github.com/tasdikrahman/vocabulary/blob/master/CONTRIBUTING.rst>`__


Discuss
~~~~~~~
`[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>`__

Join us on our `Gitter channel <https://gitter.im/tasdikrahman/vocabulary>`__
if you want to chat or if you have any questions in your mind.

Contributers
~~~~~~~~~~~~
`[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>`__

-  Huge shoutout to `@tenorz007 <https://github.com/tenorz007>`__ for adding the ability to return the API response as different data structures.
-  Thanks to `Anton Relin <https://github.com/relisher>`__ for adding the `translate <https://github.com/tasdikrahman/vocabulary/blob/master/vocabulary/vocabulary.py#L218>`__ module.
- And a big shout out to all the `contributers <https://github.com/tasdikrahman/vocabulary/graphs/contributors>`__ for their contributions

Changelog
---------
`[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>`__

Please refer `Changelog page for details <https://github.com/tasdikrahman/vocabulary/blob/master/CHANGELOG.rst>`__

Bugs
----
`[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>`__

Please report the bugs at the `issue
tracker <https://github.com/tasdikrahman/vocabulary/issues>`__

Similar
-------
`[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>`__

Other similar software inspired by `Vocabulary <https://github.com/tasdikrahman/vocabulary>`__

-  `Vocabulary <https://github.com/karan/vocabulary>`__ : The ``Go lang`` port of this ``python`` counterpart
-  `woordy <https://github.com/alephmelo/woordy>`__ : Gives back word translations
-  `guile-words <http://pasoev.github.io/words/>`__ : The ``Guile Scheme`` port of this ``python`` counterpart

Known Issues
~~~~~~~~~~~~
`[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>`__

-  In **python2**, when using the method **Vocabulary.synonym()** or **Vocabulary.pronunciation()**

.. code:: python

    >>> vb.synonym("car")
    [{
      "seq": 0,
      "text": "automotive"
    }, {
      "seq": 1,
      "text": "motor"
    }, {
      "seq": 2,
      "text": "wagon"
    }, {
      "seq": 3,
      "text": "cart"
    }, {
      "seq": 4,
      "text": "automobile"
    }]
    >>> type(vb.pronunciation("hippopotamus"))
    <class 'list'>
    >>> json.dumps(vb.pronunciation("hippopotamus"))
    '[{"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}]'
    >>>

You are being returned a ``list`` object instead of a ``JSON`` object.
When returning the latter, there are some ``unicode`` issues. A fix for
this will be released soon.

I may suggest `python-ftfy <https://github.com/LuminosoInsight/python-ftfy>`__ which can help you in this matter.


License :
---------
`[back to top] <https://github.com/tasdikrahman/vocabulary#vocabulary>`__

Built with ♥ by `Tasdik Rahman <http://tasdikrahman.me/>`__ under the `MIT License <http://prodicus.mit-license.org/>`__ ©

You can find a copy of the License at http://prodicus.mit-license.org/

Donation
--------

|Paypal badge|

|Instamojo|

|gratipay|

|patreon|

.. |PyPI version| image:: https://img.shields.io/pypi/v/Vocabulary.svg
   :target: https://pypi.python.org/pypi/Vocabulary/1.0.2
.. |License| image:: https://img.shields.io/pypi/l/vocabulary.svg
   :target: https://github.com/tasdikrahman/vocabulary/blob/master/LICENSE
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/Vocabulary.svg
.. |Build Status| image:: https://travis-ci.org/tasdikrahman/vocabulary.svg?branch=master
   :target: https://travis-ci.org/tasdikrahman/vocabulary
.. |Gitter chat| image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg
   :alt: Join the chat at https://gitter.im/prodicus/vocabulary
   :target: https://gitter.im/prodicus/vocabulary?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
.. |Requirements Status| image:: https://requires.io/github/tasdikrahman/vocabulary/requirements.svg?branch=master
   :target: https://requires.io/github/tasdikrahman/vocabulary/requirements/?branch=master
.. |Paypal badge| image:: https://www.paypalobjects.com/webstatic/mktg/logo/AM_mc_vs_dc_ae.jpg
   :target: https://www.paypal.me/tasdik
.. |gratipay| image:: https://cdn.rawgit.com/gratipay/gratipay-badge/2.3.0/dist/gratipay.png
   :target: https://gratipay.com/tasdikrahman/
.. |Instamojo| image:: https://www.soldermall.com/images/pic-online-payment.jpg
   :target: https://www.instamojo.com/@tasdikrahman
.. |patreon| image:: http://i.imgur.com/ICWPFOs.png
   :target: https://www.patreon.com/tasdikrahman/
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].