Tag Info

New answers tagged

6

I think you'll find this considerably faster... Intersection @@ (DictionaryLookup["*" <> # <> "*"] & /@Characters["aeiouy"]) and getting sneaky with letter probabilities, about five times as fast as above: Fold[Pick[#, StringFreeQ[#, #2], False] &, DictionaryLookup["*" <> First@Characters["yuioae"] <> "*"], ...


9

DictionaryLookup for each case, combined with string patterns involving ___ can be very slow. It would be faster to do it in one pass over all the words in the dictionary: With[{words = DictionaryLookup[], letters = Characters["aeiouy"]}, Select[words, Intersection[Characters[#], letters] == letters &]] This takes ~0.35 seconds on my laptop, ...


1

How about: Cases[DictionaryLookup["*"], x_ /; SubsetQ[Characters[x], {"a", "e", "i", "o", "u", "y"}]]



Top 50 recent answers are included