Answer the question
In order to leave comments, you need to log in
Hashing a word with a tolerance for typing and/or spelling errors. How to do?
Hello.
For example, the task is to hash the word: " space "
so that for any 2 errors in the spelling of the word (incorrect 1-2 letters and/or 1-2 missing letters) so that the hash does not change and remains constant.
Anyone have any ideas on how to do this? => hash:kgtsbrjnpmdl
Thanks in advance for all your help.
Answer the question
In order to leave comments, you need to log in
Here is an example of such a hash:
int hash(string s) {
return 42;
}
perhaps the graphs are better suited, then if you have an error, you can try other options for one of the nodes (letters).
What you are looking for is called "fuzzy search".
Here is a good article on this topic:
https://m.habrahabr.ru/post/114997/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question