CancelReport This Post

Please fill out the form below with your name, e-mail address and the reason(s) you wish to report this post.

 

Crossword Help Forum
Forum Rules

miawilson

31st August 2021, 21:23
Hiya all!I am trying to build a basic anagram solver that looks through all possibilities for words, check weather they are true, and acts accordingly.Imput = "TAE"Word(1) = "TEA"Word(2) = "ATE"Word(3) = "AET"Word(4) = "ETA"Word(5) = "EAT"For i = 1 to 5If isRealWord(Word(i)) Then Ans(i) = TrueElse Ans(i) = FalseEnd IfNext' RESULTAns(1) = True 'Tea is a real wordAns(2) = True 'Ate is a real wordAns(3) = False 'Aet is NOT a real wordAns(4) = False 'Eta is NOT a real wordAns(5) = True 'Eat is a real word' OUTPUTAnagrams:TeaAteEatI need to have a function (isRealWord) that can check a wrod inside an external dictionary.If there is a downloadable dictionar DLL I can get hold of, please tell me, or how I could contenct to a Microsoft Word dictionary WITHOUT opening Word.

1 of 3  -   Report This Post

paradigmshifter

31st August 2021, 22:51
There's a scrabble dictionary with an API here apparently

https://www.wordgamedictionary.com/sowpods/

which is probably a better start than rolling your own.

If you do roll your own you probably want to look at efficient searches by building some kind of tree sorted on first letters etc. and for finding the combinations use something like C++ std::next_permutation or equivalent algorithm.
2 of 3  -   Report This Post

miawilson

1st September 2021, 20:13
is this helpful for you
3 of 3  -   Report This Post