I will provide you with a dictionary file: it contains all English words in format of one word per line, including the word's frequency (i.e. how common the word is). Basically, the file looks like:
word1:frequency
word2:frequency
etc...
The file will have about 200 000 words.
Your job is to create in Delphi 10.3 (or compatible) a non visual code that will basically take as an input an English word (string) and return suggestions what are the closest matching words found in the dictionary.
Notice: You cannot simply iterate the entire word list and check which sound the closest (e.g. Levenshtein distance) on every input, as comparing the input word with 200 000 words on every input would be very slow. Instead, do something like [login to view URL]
This is for English, so there is no need for unicode (or even non A to Z) support.
This is a "proof of concept" sort of work. I do not need any UI or anything that is perfect and complete system. I am mostly just looking for some sample code (e.g. functions and/or classes) which I can use as the basis of development. For easier testing, your code should come with some sample app, though.