-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve rhyme function #3
Comments
I just found a really interesting article that's related. Anything useful here? |
@oscardssmith Thanks, that looks really useful. I'll be thinking about it over the next few days, and also happy to review and merge a patch if you want to try implementing it. |
I found that the rhyme function did not work for me until I changed it from level=2 to level=1 |
The rhymes function compares the last x phonemes of the word. So for monosyllabic words, like "show" and "low", it may only report a rhyme if you use level 1. Maybe level 1 is a better default setting to use than level 2, but I think it was too permissive. A system like RhymeBrain which scores rhymes on a scale is probably what we need. |
At the moment, the rhyme function compares whether the final two syllables from the CMU dictionary are equal. This works for the majority of words, but many cause problems. For instance:
fire ->
[[u'F', u'AY1', u'ER0'], [u'F', u'AY1', u'R']]
admire ->
[[u'AE0', u'D', u'M', u'AY1', u'R']]
desire ->
[[u'D', u'IH0', u'Z', u'AY1', u'ER0']]
Fire matches both admire and desire, but admire doesn't rhyme with desire...
Furthermore, for two syllable words, checking only the last syllable would probably improve things.
The text was updated successfully, but these errors were encountered: