def euclidean_distance(a, b):
    X = (keyboard_cartesian[a]['x'] - keyboard_cartesian[b]['x']) ** 2
Y = (keyboard_cartesian[a]['y'] - keyboard_cartesian[b]['y']) ** 2
Edit distance such as Levenshtein taking into account proximity on keyboard