Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A JSON webservice that dishes out rhymes using ARPABET transcription matching.

branch: master
README.md

ARPABET

This is a rails webservice that finds rhymes by matching Arpabet transcriptions.

arpabet.heroku.com

Query Params

:limit      -> defaults to 50
:skip       -> defaults to 0
:full       -> defaults to false. set any value to get back arpabet transcriptions in response objects
:delimited  -> defaults to false. set any value to get back a semicolon-delimited string of words

Example Queries

Spec Output

WordsController
  pagination
    defaults to 50 words per_page
    defaults to :page 1
    honors :limit param alone
    honors :limit param in conjunction with :skip param

SearchPattern
  treats 'foo*' as a 'begins with' query
  treats '*able' as an 'ends with' query
  treats 'dog' as a 'contains' query

Word
  finds rhymes
  validation
    can be validated
    requires spelling
    requires arpabet_transcription
    before_save
      downcases spelling
      replaces underscores in spelling with spaces
      removes all non-word characters
  Word.transcribe(spelling)
    takes a spelling and gives back a transcription
  Word.find_by_transcription_pattern(pattern)
    returns all words with transcriptions that match the given pattern

Developer Setup

bundle
cp config/database.yml.example config/database.yml # postgres by default
rake db:create:all
heroku db:pull
rake

Credit

I got the ARPABET data from the CMU Pronouncing Dictionary.

Something went wrong with that request. Please try again.