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 https://pypi.org/project/torch-edit-distance/ but its a bit buggy. If there is none in pytorch, why?

cheers

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.