![slapdash rhyme slapdash rhyme](https://i1.wp.com/www.slaphappylarry.com/wp-content/uploads/2021/02/The-Giant-Jam-Sandwich-Story-Pictures-by-John-Vernon-Lord-Verses-by-Janet-Burroway-first-published-by-Jonathan-Cape-Ltd-in-1972-this-edition-by-Piper-Books-Pan-Books-London-1988-4.jpg)
Print as an output in my R console with ‘::’ as a word separator. This gave me the 3,635 words I wanted to find IPA for, which is much more manageable than the 29,874 individual lines or the 211,430 words. Select only the unique words at the end of a lyric line. Through trial and error with phonetizer on a small subset of words this looked like the best bet.
![slapdash rhyme slapdash rhyme](https://4.bp.blogspot.com/-UUeRmDNUCeE/VctkzWpM1GI/AAAAAAAB6_M/OuoP6s8wkjc/s1600/Screen%2BShot%2B2015-08-12%2Bat%2B11.20.47%2BAM.png)
Strip words of all non-alphanumeric characters except for apostrophes.
#Slapdash rhyme code#
I did some real code bodging at this step (for a bodging explanation see this Tom Scott video - yes I am aware I have referenced him twice now). Good for them, I guess.Īs an alternative to an IPA API, I found this site phonetizer which has a user interface for inputting english and outputting IPA. It’s one of the services the big Dictionary companies provide now. It turns out if you want a good API, so you can send an English word and it will return the IPA, you have to spend money. As an aside, I wonder if the reason the Co-Op dropped their slogan “good with food” is because it reads like it should rhyme, but doesn’t.Īha! The international phonetic alphabet (IPA)! It tells you how words sound, which is what we’re after really. My first thought was to try matching the end of words, but then the english language isn’t that straight-forward - we would miss that “time” and “rhyme” don’t rhyme, and incorrectly assert that “food” and “good” do rhyme.