Quantcast
Channel: Levenshtein distance with back tracing in PHP - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by kainaw for Levenshtein distance with back tracing in PHP

This is not to be nit-picky, but to help you find the answers you want (and improve your implementation).The algorithm you are using is the Wagner-Fischer algorithm, not the Levenshtein algorithm....

View Article



Answer by Quuxplusone for Levenshtein distance with back tracing in PHP

I think your bug is exactly what you say in your question that it is: you stop as soon as i==0, instead of going all the way to i==0 && j==0. Simply replace this condition:while($i > 0...

View Article

Levenshtein distance with back tracing in PHP

I'm trying to align strings in PHP using Levenshtein distance algorithm. The problem is that my back tracing code does not work properly for all cases. For example when the second array has inserted...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images