Determines whether two words rhyme with each other
Uses the cmu-pronouncing-dictionary
(~1MB) to determine if two words rhyme.
This has the advantage of being much more accurate than algorithmic methods, but the drawback is that the dictionary contains ~130,000 words, so the results may be limited.
npm install rhymes-with
import rhymesWith from 'rhymes-with';
rhymesWith('cat', 'hat');
//=> true
rhymesWith('bonnie', 'irani');
//=> true
rhymesWith('aigner', 'ama');
//=> false
rhymesWith('aigner', 'ama', {allPronounciations: true});
//=> true
// words not in dictionary
rhymesWith('pooper', 'scooper');
//=> false
Returns false if either word is not in the dictionary.
Type: string
Words to check if they rhyme.
Type: object
Type: bool
Default: false
Whether to check alternative pronounciations of the words to see if there's a rhyme.