#WER calculation in python
This file is written in python3.7
This program calculates the word error rate of hypothesis in ASR and print the aligned result.
License: MIT License
Would you be willing to license this under MIT license? Its a great simple tool for wer and I'd like to contribute.
https://choosealicense.com/licenses/mit/#
thanks for your script!
I used to test Chinese, the result was right, but the marked position of EVA was misplaced.
REF: 沉 吟 放 拨 插 弦 中 整 顿 衣 裳 起 敛 容 的 HYP: 沈 营 放 拨 插 全 中 整 顿 衣 裳 起 脸 容 得 EVA: S S S S S WER: 27.78%
I am trying to calculate a wer for a long text( around 2000 words), I run it on a linux server that's memory is 32G, but it does't return the result. instead of throwing a memory issue. Do you have any way that can improve it ?
The display of aligned text is very useful.
There is no issue with the WER computation. However, I encountered an error message when the Reference.txt word count is more than double of that Hypothesis.txt. A fix for this error will be highly appreciated.
My reference has 430 words and the hypothesis has 498 words.
I have already figured out the following:
In the getStepList method, x and y never reach 0 at the same time. If x = 0 then y ~ 250 and if y = 0 then x is way below 0.
Then an infinite number of "d" are appended until the memory overflows but there is no error massage.
How can I fix this problem?
Line 17 in acefbfc
It would be good to mention in README that the library supports computing WER for sequences up to 256 words. Otherwise, the users need to make the change accordingly.
Traceback (most recent call last): File "WER-in-python/wer.py", line 203, in <module> wer(r, h) File "WER-in-python/wer.py", line 191, in wer list = getStepList(r, h, d) File "WER-in-python/wer.py", line 49, in getStepList elif d[x][y] == d[x-1][y-1] and r[x-1] == h[y-1] and x >= 1 and y >= 1: IndexError: index -1054 is out of bounds for axis 0 with size 1053
just tried to run this out of the box and got this
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.