Giter Club home page Giter Club logo

wer-in-python's Introduction

#WER calculation in python

This file is written in python3.7

  • Module Needed:
    • numpy
  • Usage:
    python wer.py reference.txt hypothesis.txt
  • Example:
    result

wer-in-python's People

Contributors

fanskyer avatar jhoelzl avatar zszyellow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wer-in-python's Issues

If used to test Chinese, the marked position of EVA was misplaced.

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%

memory overflow when the text is long

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 ?

List index out of range error

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.

memory overflow

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?

index out of bounds

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.