Find a name in the list if the name is spelled incorrectly

I have a list of names that some code checks to see if a person exists, and if so, do something ...

My problem is that I want to handle the case of an incorrect name entry. Ie I have a list of names

Bob
Frank
Tom
Tim
John

If I type in Joohn, I want him to ask me if I mean John. If I type Tm, they will ask me if I mean Tim, if I say no, he asks if I mean Tom .. Etc ..

Has anyone done something like this before?

+3
source share
3 answers
+6

, , , . Levenshtein . , .

+1

Source: https://habr.com/ru/post/1741727/


All Articles