@staticmethod
def _editdistance(a, b):
    """ Simple unweighted Levenshtein distance """
    r0 = range(0, len(b) + 1)
    r1 = [0] * (len(b) + 1)
    for i in range(0, len(a)):
        r1[0] = i + 1
        for j in range(0, len(b)):
            c = 0 if a[i] is b[j] else 1
            r1[j + 1] = min(r1[j] + 1, r0[j + 1] + 1, r0[j] + c)
        r0 = r1[:]
    return r1[len(b)]
