Basically the opposite of the following Find a word's linguistic pronunciation
I had thought of forming my own dictionary but it doesn't seem ideal.
Basically the opposite of the following Find a word's linguistic pronunciation
I had thought of forming my own dictionary but it doesn't seem ideal.
Here is one approach that does not rely on the International Phonetic Alphabet or building a dictionary and makes use of built-in functions
wordSoundsLike[wordPronounciation_String] :=
Module[
{
wordSpokenPronounciation = SpeechSynthesize[wordPronounciation],
closestWordFunction = Nearest[DictionaryLookup[]],
wordApproximation
},
wordApproximation = SpeechRecognize[wordSpokenPronounciation];
closestWordFunction[wordApproximation]
];
It works suprisingly well. On my limited test set SpeechRecognize is the weak point as SpeechSynthesize does a pretty good job. (eg AudioPlay@SpeechSynthesize@"wustersher saws")
On "easy" words:
wordSoundsLike["eksplane"] (*Explain*)
{"explain"}
wordSoundsLike["kohmodeetea"] (*Commodity*)
{"commodity"}
On "ambiguous" words
wordSoundsLike["fewsha"] (*Fuchsia*)
{"Asia", "curia", "fascia", "fuchsia", "fuse", "fused", "fusee",
"fuses", "fusing", "fusion", "fuss", "fussy", "fustian", "fusty",
"Julia", "Lucia", "Luria", "Musial", "music", "Nubia", "Russia",
"Susie"}
wordSoundsLike["indite"] (*Indict*)
{"indict", "indie", "indite", "innit"}
On "impossible" words ;)
wordSoundsLike["wustersher saws"] (*Worcestershire Sauce*)
{"high-pressure", "statuesque", "thirstiness"}
wordSoundsLike["lester"] (*Leicester*)
{"lest"}