<img src=“https://codeclimate.com/github/kalenkov/rhymes.png” />
Rhymes looks up perfect and identical rhymes using precompiled version of the Carnegie Mellon Pronouncing Dictionary.
gem install rhymes
ruby > require 'rhymes' => true ruby > Rhymes.rhyme('ruby') => ["BOOBY", "DUBHI", "DUBY", "HRUBY", "KUBY", "LOOBY", "LUBY", "NEWBY", "RUBEY", "RUBI", "RUBIE", "SCOOBY", "TRUBEY", "TRUBY"]
Class method will load dictionary on each call. Use instance method to front-load the expense
ruby > require 'rhymes' => true ruby > rhymes = Rhymes.new; rhymes.rhyme('ruby') => ["BOOBY", "DUBHI", "DUBY", "HRUBY", "KUBY", "LOOBY", "LUBY", "NEWBY", "RUBEY", "RUBI", "RUBIE", "SCOOBY", "TRUBEY", "TRUBY"]