tf.edit_distance(hypothesis, truth, normalize=True, name='edit_distance')
Computes the Levenshtein distance between sequences.
This operation takes variable-length sequences (hypothesis and truth), each provided as a SparseTensor, and computes the Levenshtein distance. You can normalize the edit distance by length of truth by setting normalize to true.
For example, given the following input:
# 'hypothesis' is a tensor of shape `[2, 1]` with variable-length values:
# (0,0) = ["a"]
# (1,0) =