Damerau - Levenstein distance function for node