I notice if I make a typo in Google search bar, it is very likely to correct it for me.
Like, if I type "incerdible", it will suggest "incredible", or for "stackovflow", it will be "stackoverflow".
What is the core idea of such algorithm?
Here is an explanation, and some more links with further details:
http://norvig.com/spell-correct.html
There are many algorithms to solve that problem. The core algorithm is to calculate the difference between two words. You can take a look at Levenshtein distance, this is a great algorithm to do that.
If you want to use something like that, you can use some npm package like this:
https://www.npmjs.com/package/typo-correction
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With