Closed MarinusVanDijk closed 3 years ago
We now give suggestions by a very simple string distance algorithm, see https://github.com/Felienne/hedy/blob/master/hedy.py lines 9-32.
For now it is fine I think, the goal is to be better than "command not found"
But if you are interested to improve it, as the comment also says "could be more sophisticated MACHINE LEARNING!" :)
Feel free to improve!
Here is my improvement (I do not have access to make branches).
We can in future introduce a phonetic compare function.
In that case spelling errors children make can be better dealt with.
Nice error message when typing askquestion without space:
But then when typing askechoquestion without space:
Error message suggestion preference is the command echo.
I expect a suggestion for the ask command, because the command line starts with ask command?
And perhaps also give a suggestion for the echo command?