Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "levenshtein"
-
Dynamic Programming vs Divide-and-Conquer
👉🏻 https://trekhleb.dev/blog/2018/...
In this article, I’m trying to figure out the difference/similarities between dynamic programming and divide and conquer approaches based on two examples - binary search and minimum edit distance (Levenshtein distance).
The DP concept is still a subject to learn for me, but I hope the article will be helpful for those who are also in the process of learning. -
The levenshtein function in PHP. Because the string function names have to kept as inconsistent as possible.2
-
Does anyone know a good source for learning the Damerau-Levenshtein distance(i'm trying to implement a simple spell corrector) and i haven't really found anything detailed on google yet. And also how does Damerau-Levenshtein distance fair to Levenshtein distance in terms of memory or time cost?1
-
Since Google is failing me...
Given a user input (string query) and a list of larger strings (like email bodies or something), what's the best way to search and rank the list of strings against the user input.
So far I have implemented levenshtein distance but it doesn't really seem to do extremely well. (Short strings rank very well against each other, whereas long strings **containing** exact matches will go lower in the list)
Should I be splitting the input and the list by word and then averaging the distances?
The only thing I have tried is removing complete non-matches from the list by not including them if the distance is equal to the length of the largest string17