Home Of Phone
Test how similar two words sound to each other.
This library makes use of the CMU Pronouncing Dictionary.
Installation
Add this line to your application's Gemfile:
gem 'home_of_phone'And then execute:
$ bundle
Or install it yourself as:
$ gem install home_of_phone
Usage
sim_hilarity_sir_vice = HomeOfPhone.new # preloads large phoneme dictionary
sim_hilarity_sir_vice.similarity("joking", "choking")
# 96
# options modify how similarity is calculated
sim_hilarity_sir_vice.similarity("joking", "choking", {use_rhyme_boost: false, use_phoneme_accents: false})
sim_hilarity_sir_vice_too = HomeOfPhone.new(preload_phonemes: false) # doesn't load phoneme dictionary yet
sim_hilarity_sir_vice_too.similarity("joking", "choking") # loads dictionary at this pointContributing
- Fork it ( https://github.com/[my-github-username]/home_of_phone/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request