RESTful Rhyme Dictionary Web Service

Advertisement:

POWERED by FUSION

For a side project, I needed a simple rhyming web service. Pass in a word, and have it spit out that word’s rhymes. A quick scan of the internet showed the impossible — it didn’t exist! 30 minutes of Python hacking later and the problem was rectified.

http://azarask.in/services/rhyme

The service can take two paramaters: q and callback. The former specifies the word to be rhymed with (self-rhymes excluded), and the later wraps the results in a function callback in JSONP-style. Data is returned in JSON format.

Here are two examples to get you started:

http://azarask.in/services/rhyme/?q=world

["curled", "hurled", "swirled", "twirled", "neworld", "transworld", "unfurled"]

http://azarask.in/services/rhyme/?q=world&callback=hello

hello(["curled", "hurled", "swirled", "twirled", "neworld", "transworld", "unfurled"])

The results are ordered by number of syllables and then alphabetically. If you make something cool, let me know! (I’m thinking about uses for the new canvas-based text APIs).

Easter egg: If you don’t specify any arguments then the service returns the rhymes of a very special word.