Dictionary API or Library

Dictionary API or Library

Does anyone know of a good dictionary API or ruby library to lookup the definitions of words?

I'm thinking it should work something like:

  1. I call get_definition(word)
  2. It returns the definition for that word (ideally in some way to easily format the definition for display.


How do you list the currently available objects in the current scope in ruby?


How do I set the socket timeout in Ruby?
Ruby-WordNet sounds like it does what you're looking for:.
Has Object Prevalance (Prevayler, Madeleine) been used in a Production System?
Ruby-WordNet is a Ruby interface to the WordNet® Lexical Database.

Unable to cat Ruby blocks to files
WordNet is an online lexical reference system whose design is inspired by current psycholinguistic theories of human lexical memory.

Is it acceptable practice to patch Ruby's base classes, such as Fixnum?
English nouns, verbs, adjectives and adverbs are organized into synonym sets, each representing one underlying lexical concept.

How to compare Floats with delta?
Different relations link the synonym sets..
Why does Ruby seem to have fewer projects than other programming languages?

How do I make a POST request with open-uri?


Wordnik.com has several word-info APIs, including a definitions API.

More info is here: http://developer.wordnik.com/. [I work for Wordnik.

We will have more APIs soon, let us know what you want!].


I discovered a webservice for this yesterday.. Go to the British Council homepage and double click on any word (that isn't already a hyperlink).. This should open a popup window with a Cambridge Dictionary definition in it.

The API is relatively simple (and it is a public API, I checked it yesterday):.
For reference, here's the code they use to launch this on double-click:.
/* BC double-click pop-up dictionary */ var NS = (navigator.appName == "Netscape" || navigator.product == 'Gecko') ? 1 : 0; if (NS) document.captureEvents(Event.DBLCLICK); document.ondblclick = dict; var dictvar;  function dict() {     if (NS) {         t = document.getSelection();         pass_to_dictionary(t);     } else {         t = document.selection.createRange();         if(document.selection.type == 'Text' && t.text != '') {             document.selection.empty();             pass_to_dictionary(t.text);         }     } }  function pass_to_dictionary(text) {     //alert(text);     if (text > '') {         window.open('http://dictionary.cambridge.org/learnenglish/results.asp?searchword='+text+ '&dict=L', 'dict_win', 'width=650,height=400,resizable=yes,scrollbars=yes');     } } 


94 out of 100 based on 54 user ratings 1054 reviews