Skip to content

pikaliov/python_kaldi_edit_distance

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python kaldi edit distance

python wrappers of the edit_distance functions of Kaldi-ASR: https://github.com/kaldi-asr/kaldi/

Usage

>>> import kaldi_edit_distance as ked
>>> ked.levenshtein_edit_distance([1,2,3], [0,1,1,2,0,3])
3
>>> ked.levenshtein_edit_distance([1,2,3], [0,1,1,2,0,3], detail=True)
ErrorStats(total_cost=3, ins_num=3, del_num=0, sub_num=0)
>>> total, aligned1, aligned2 = ked.levenshtein_alignment([1,2,3], [0,1,1,2,0,3], -1)
>>> total, aligned1, aligned2
(3, [-1, -1, 1, 2, -1, 3], [0, 1, 1, 2, 0, 3])

TODO

  • Add test codes

About

python wrappers of the edit_distance functions of Kaldi-ASR

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 57.0%
  • C++ 43.0%