Measure edit distance between strings