summaryrefslogtreecommitdiff
path: root/README.md
blob: 0bcf0439e037404903d998bbabf6c1733fff7c88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
bladictionary2
==============

About
-----

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.

Usage
-----

./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.

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


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.

Libraries
---------

lxml

MySQLdb