Word edit distance calculator