Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 791 Bytes

README.md

File metadata and controls

27 lines (20 loc) · 791 Bytes

WER-in-cpp

  • Based on WER-in-python and kaldi's compute-wer.cc implementation of computing word-error-rate (WER) using edit distance dynamic programming. I port the algorithm into C++ with new features:
    • Support multi-line reference and hypothesis
    • Improve the runtime and feasibility when aligning long sentences

build

git clone https://github.com/dangkhoadl/WER-in-cpp.git
cd WER-in-cpp
make build

Usage

chmod +x compute-wer
./compute-wer [Reference] [Hypothesis]

Examples

  • Reference samples/ref
  • Hypothesis samples/hyp
  • Result: ./compute-wer samples/ref samples/hyp