Answer the question
In order to leave comments, you need to log in
How to implement a search for words with typos or minor discrepancies?
There is a corpus of words, for each of which you need to find inexact matches in the text, with the possibility of typos or differences in one or two characters. For example: color - colour, gray - gray, etc. For long words, there may be more differences.
Thanks in advance for your reply!
Answer the question
In order to leave comments, you need to log in
Count consecutive correct letters and mismatch letters (missing, any extra, another instead of the right one), remember the distances for all erroneous chains.
Then subtract all error distances from the minimum line length and divide by the length of this minimum line. Get the coefficient of mismatch. Multiplying it by 100 will give you the percentage of string mismatch.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question