I use the following code to solve Wordle(https://www.powerlanguage.co.uk/wordle/).
The variable f contains the pattern for the non-existing letters. Select function filters the words which must contain the letter in the word. After every try, I change the variable f to include the new letters that should not exist and also add more pipelines of the Select function to filter the words.
f = "[^wodnastjuic]"
DictionaryLookup[RegularExpression[StringJoin[f, "e", f, f, "y"]]] // Select[StringContainsQ["r"]] // Select[StringContainsQ["p"]]
There are some minor inconveniences with this code
- Multiple Select pipelines are required for every letter
- If in a given position a letter is misplaced then using pattern variable f is not optimal, since it does not filter the words that contain the misplaced letter at that position. This can be addressed by providing a new pattern for that position.
Given that the UI will be external how to solve this efficiently?
WordCloudfunction. There used to be a site called "wordle.net" (can't remember exactly) that used to make word-clouds but it does not exist anymore. – Syed Jan 29 '22 at 18:53