How to check whether a substirng is inside a string with specific edit distance tolerance. For example:
str = 'Python is a multi-paradigm, dynamically typed, multipurpose programming language, designed to be quick (to learn, to use, and to understand), and to enforce a clean and uniform syntax.'
substr1 = 'ython'
substr2 = 'thon'
substr3 = 'cython'
edit_distance_tolerance = 1
substr_in_str(str, substr1, edit_distance_tolerance)
>> True
substr_in_str(str, substr2, edit_distance_tolerance)
>> False
substr_in_str(str, substr3, edit_distance_tolerance)
>> True
What I tried: I tried to break the string in words and remove the special characters then do comparisons one by one but the performance(in terms of speed and accuracy) is not quite good.