Wordnik Gem

Posted: 12 March 2010 in Uncategorized
Tags: , , , , ,

Erin McKean

I’ve had my eye on Wordnik for a while, since finding out the excellent lexicographer Erin McKean co-founded it.  Wordnik is the most comprehensive dictionary in the known universe.  Srsly!

They released an API a few months ago and I quickly threw together a gem wrapping it, based on HTTParty.  Tonight I updated the gem for version 3 of the API and simplified it to just a single class with the bare essentials.  You can perform pretty much all of the API calls and get a hash of the results.  It’s nothing major, but will give you a chance to play around with the Wordnik API with almost no work on your part (aside from getting yourself a key).  This change breaks backwards compatibility completely, sorry.

Example usage:

w = Wordnik.new("YOUR_API_KEY")
w.define('gem') # => big hash with all the definitions
w.examples('gem') # => example sentences using "gem"

You can grab the gem off of RubyGems or you can take a look at the source on github.  As always, please let me know if you encounter any problems.

About these ads
Comments
  1. [...] sincerely thank Martin Marcher and Vince Spicer for their contributions to the Python library, and Jason Adams for inspiring the Ruby work. We’re currently working on a full-fledged PHP library, and plan [...]

  2. […] for their contributions to the Python library, and Jason Adams for inspiring the Ruby work. We’re currently working on a full-fledged PHP library, and plan […]

  3. […] sincerely thank Martin Marcher and Vince Spicer for their contributions to the Python library, and Jason Adams for inspiring the Ruby work. We’re currently working on a full-fledged PHP library, and plan […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s