README.md 1.84 KB
Newer Older
Joe Robinson's avatar
Joe Robinson committed
bladictionary2
==============

Joe Robinson's avatar
Joe Robinson committed
About
-----

Joe Robinson's avatar
Joe Robinson committed
Python script for finding dictionary definitions.

Dictionary definitions are provided by http://services.aonaware.com/

This is a rewrite of the original bladictionary, which was written in 
Java 4 years ago, quite badly.

The purpose of the rewrite is to learn Python, clean up some long 
standing bugs with the old version, and add some more advanced options.

Joe Robinson's avatar
Joe Robinson committed
Usage
-----

Joe Robinson's avatar
Joe Robinson committed
./bladictionary.py [word] [type] [dictionary]

Type is the word type, eg noun, verb, adjective, adverb. If none is 
specified, all will be printed
Dictionaries available at the moment are wn (WordNet) and oed (Oxford 
English Dictionary). Default is wn.

Joe Robinson's avatar
Joe Robinson committed
This script designed to be used in IRC with a specific bot, but should 
work fine from the command line using stdin or args (once that's done).


Joe Robinson's avatar
Joe Robinson committed
Sources
-------

bladictionary2 can get definitions from a number of sources

WordNet - Dictionary of English words created by Princeton University
Website - http://wordnet.princeton.edu/
SQL Database of words from http://wnsql.sourceforge.net/
License: http://wordnet.princeton.edu/wordnet/license/ 

Urban Dictionary - Online dictionary of slang and colloqual words
Website - http://www.urbandictionary.com/
Unofficial API - http://urbanscraper.herokuapp.com/
Note: Urban Dictionary currently provides no API for accessing its 
content programatically, and the urbanscraper API uses screen scraping 
to obtain data. This is not explicitly forbidden by Urban Dictionary's 
terms of service at this time, but is also not officially supported.

Oxford English Dictionary - English Dictionary published by Oxford University Press
Source - https://github.com/sujithps/Dictionary/
Note: No license or copyright information was given with the copy of OED 
used here and is provided as is, please contact me if it violates 
either.

Joe Robinson's avatar
Joe Robinson committed
Libraries
Joe Robinson's avatar
Joe Robinson committed
---------
Joe Robinson's avatar
Joe Robinson committed

lxml
Joe Robinson's avatar
Joe Robinson committed

Joe Robinson's avatar
Joe Robinson committed
MySQLdb