Quantcast
Channel: Active questions tagged string-manipulation - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 186

Finding anagrams of given length from DictionaryLookup

$
0
0

What I'm trying to find are the 4 letter words in the Mathematica dictionary that have the most anagrams and the amount of anagrams these have each.

But I can't seem to find all the 4 letter words in the Mathematica dictionary. My output only results in 3-8 letter words. Input is below

 wordperms =Flatten[Map[DictionaryLookup,Map[StringJoin, Permutations[Characters[#]]]]] &; words = DictionaryLookup[]; sorted = Sort[Map[Sort, Map[Characters, words]]]; Part[Select[Tally@sorted, Part[#, 2] > 4 &], All, 1]; found = Part[Select[Tally@sorted, Part[#, 2] > 4 &], All, 1]; Map[wordperms, found]

Viewing all articles
Browse latest Browse all 186

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>