edit_distance#

montreal_forced_aligner.helper.edit_distance(x, y)[source]#

Compute edit distance between two sets of labels

See also

https://gist.github.com/kylebgorman/8034009

For a more expressive version of this function

Parameters:
  • x (list[str]) – First sequence to compare

  • y (list[str]) – Second sequence to compare

Returns:

Edit distance

Return type:

int