Updated string similarity functions.