This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

1   Vocabulary

A dictionary magician in the form of a module!

Author:Tasdik Rahman

1.1   What is it

For a given word, using Vocabulary, you can get it’s

  • 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)

1.2   Features

  • Written in uncomplicated Python
  • Returns JSON objects
  • Minimum dependencies ( just uses requests module )
  • Easy to install
  • A decent substitute to Wordnet(well almost!) Wanna see? Here is a small comparison
  • Stupidly easy to use
  • Fast!
  • Supports
    • both, python2.* and python3.*
    • Works on Mac, Linux and Windows

1.3   Why should I use Vocabulary

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

1.3.1   Wordnet Comparison

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

  • Using Wordnet
>>> 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
>>> from vocabulary import Vocabulary as vb
>>> vb.synonym("car")
'[{"seq": 0, "text": "automotive"}, {"seq": 1, "text": "motor"}, {"seq": 2, "text": "wagon"}, {"seq": 3, "text": "cart"}, {"seq": 4, "text": "automobile"}]'
>>> ## 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.

1.4   Installation

1.4.1   Option 1: installing through pip (Suggested way)

pypi package link

$ pip install vocabulary

If you are behind a proxy

$ pip --proxy [username:password@]domain_name:port install vocabulary

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

1.4.2   Option 2: Installing from source

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

1.4.3   Demo

1.5   Documentation

For a detailed usage example, refer the documentation

1.6   Contributing

Please refer Contributing page for details

1.6.1   Discuss

Join us on our Gitter channel if you want to chat or if you have any questions in your mind.

1.6.2   Contributers

1.7   Changelog

Please refer Changelog page for details

1.8   Bugs

Please report the bugs at the issue tracker

1.8.1   Known Issues

  • When using the method
>>> vb.pronunciation("hippopotamus")
[{'raw': '(hĭpˌə-pŏtˈə-məs)', 'rawType': 'ahd-legacy', 'seq': 0}, {'raw': 'HH IH2 P AH0 P AA1 T AH0 M AH0 S', 'rawType': 'arpabet', 'seq': 0}]
>>> 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": 0}]'
>>>

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.

1.9   License :

MIT License © Tasdik Rahman

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

Release History

Release History

0.0.5

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Vocabulary-0.0.5.tar.gz (11.5 kB) Copy SHA256 Checksum SHA256 Source Dec 7, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting