1
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ opposite of this reference.wolfram.com/language/ref/WordData.html $\endgroup$
    – William
    Oct 18, 2022 at 10:17
  • $\begingroup$ Aahhh, you mean that you have the pronunciation of a word and you want to search for the words with similar pronunciation! Yes, I think you should probably make your own dictionary. Failing that, search the online Wolfram documentation for "homophones" (and similar terms) you might find something useful in the resource repository. $\endgroup$ Oct 18, 2022 at 16:04
  • $\begingroup$ Are you looking to search for words using the IPA as inputs? $\endgroup$ Nov 1, 2022 at 16:39

1 Answer 1

3
$\begingroup$

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")

Examples


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"}


$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.