Is there an implementation of edit distance to calculate wer?

Is there edit_distance function in pytorch to calculate wer/ler? Its levenshtein distance. There is a pip package but its a bit buggy. If there is none in pytorch, why?


Hi, why it is buggy? It works fine for me.

It does’t work when device=cuda:1 or above. The example code assume that we use only cuda:0 (.cuda()), which is not true in general especially when you are training your models in a server.