Here are all the 5 letter words that appear in the application:
fiveLetterWords=Module[{words},words=Select[WordList["KnownWords",IncludeInflectionsTrue],StringLength[#]===5&];words=ToUpperCase/@words;words=Select[words,StringMatchQ[#,LetterCharacter..]&];Union[words]];
There are 7517 of them.
Length[fiveLetterWords]
7517
Here is the ordering of the frequency of English letters for 5 letter words:
orderedLetters=Keys[ReverseSort[Counts[Flatten[Characters/@fiveLetterWords]]]]
{S,A,E,O,R,I,L,T,N,U,D,C,P,M,H,Y,B,G,K,F,W,V,X,Z,J,Q}
So let’s see if there are any words amongst the list of our 5 letter words that match the highest 5 of the frequency sorted letters (making sure that there are no repeated letters in the word):
StringJoin/@Select[Characters/@fiveLetterWords,Sort[Intersection[#,orderedLetters[[;;5]]]]===Sort[orderedLetters[[;;5]]]&]
{AROSE}
Wow, there’s only one! And it takes care of another principle — try to have as many vowels as possible.
So let’s relax the constraint slightly and pull things from the highest nLetters letters in the frequency ordered list, but still make sure that there are no repeating letters.
findWordlePossibities[nLetters_Integer]:=Module[{possibilties},possibilties=Select[Characters/@fiveLetterWords,SubsetQ[orderedLetters[[;;nLetters]],#]&];StringJoin/@Select[possibilties,Length[Union[#]]===5&]]
findWordlePossibities[5]
{AROSE}
findWordlePossibities[6]
{AESIR,ARIES,ARISE,AROSE,OSIER,RAISE}
findWordlePossibities[7]
{AESIR,AISLE,ALOES,ARIES,ARILS,ARISE,ARLES,AROSE,EARLS,ELISA,LAIRS,LASER,LIARS,LOIRE,LOIRS,LORES,LOSER,OILER,ORALS,ORIEL,OSIER,RAILS,RAISE,RALES,RIALS,RIELS,RILES,ROILS,ROLES,SELAR,SLIER,SOLAR,SOLEA,SOLER}