@classmethod
def edit_distance(cls, s1, s2):
    """
        Simple algorithm to calculate the distance between two str

        :param s1: string 1
        :param s2: string 2
        :return: distance number
        """
    len1 = len(s1)
    len2 = len(s2)
    if len1 <= 0 or len2 <= 0:
        result = len1 or len2
    row_n = len1 + 1
    col_n = len2 + 1
    f_table = map(lambda x: [0] * col_n, range(row_n))
    for i in range(row_n):
        f_table[i][0] = i
    for i in range(col_n):
        f_table[0][i] = i
    for i in range(1, row_n):
        for j in range(1, col_n):
            if s1[i - 1] == s2[j - 1]:
                f_table[i][j] = f_table[i - 1][j - 1]
            else:
                f_table[i][j] = min([f_table[i - 1][j] + 1, f_table[i][j - 
                    1] + 1, f_table[i - 1][j - 1] + 1])
    return f_table[row_n - 1][col_n - 1]
