Coder Social home page Coder Social logo

It's slow to evaluate about m2scorer HOT 7 OPEN

liujiqiang999 avatar liujiqiang999 commented on July 1, 2024 1
It's slow to evaluate

from m2scorer.

Comments (7)

YovaKem avatar YovaKem commented on July 1, 2024 1

I found that in my case, the reason for the "never-ending" computation of the metric were some bad predictions where the same ngram was repeated multiple times at the end of a sentence.

from m2scorer.

craggy-otake avatar craggy-otake commented on July 1, 2024 1

As nymwa said, in this case, Bellman-Ford algorithm seems to be too slow.
Given the nature of this graph, there is no negative closed path, and the Dijkstra algorithm is sufficient. At any rate, I rewrote the code to Dijkstra. The code is available here.
https://github.com/craggy-otake/m2scorer_python3_fast

Please let me know if you need to delete my repository.

from m2scorer.

kouhonglady avatar kouhonglady commented on July 1, 2024

Hi,
Sometimes, it is very slow to evalute using m2scorer. How to fix it? And Could I evaluate scores of each errror types separately? How to achieve this function? Thank you very much.

Have you solved this problem? i just run on the 2014 conll GEC dataset,only 1313 sentences,it takes more than 5 hours but not gives out the result.

from m2scorer.

liujiqiang999 avatar liujiqiang999 commented on July 1, 2024

@kouhonglady
Hi,
It is a good way to cut long sentences into some short ones in the CoNLL14 test-set.

from m2scorer.

Yusuke196 avatar Yusuke196 commented on July 1, 2024

In order to find which sentence is causing a trouble, -v option of m2scorer helped for me.

from m2scorer.

nymwa avatar nymwa commented on July 1, 2024

I think the edit lattice of M2 scorer is DAG. So it is topological sortable. If the graph is topological sorted, the shortest path can be calculated by O(V + E). And topological sort can be done by O(V + E). Therefore, the total calculation is O(V + E). This is faster than Bellman-Ford algorithm with O(V×E). This can be one solution of this problem.

from m2scorer.

shotakoyama avatar shotakoyama commented on July 1, 2024

It seems that transitive_args() of levenshtein.py is very time-consuming.
https://github.com/nusnlp/m2scorer/blob/version3.2/scripts/levenshtein.py#L649

These 3 for loops of adding transitive arcs may be replaced with a more efficient algorithm.

from m2scorer.

Related Issues (7)

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.