Coder Social home page Coder Social logo

IndexError: list index out of range about nqg HOT 2 OPEN

xinyadu avatar xinyadu commented on May 25, 2024
IndexError: list index out of range

from nqg.

Comments (2)

Binathi avatar Binathi commented on May 25, 2024

Please check the source file, predicted text, output file you are passing as arguments.
It might happen that you are passing the pred.txt file generated using src-dev.txt but the default source file for eval.py is src-test.txt. This might be the reason for index mismatch.
Also, check where you saved the pred.txt generated using the previous command and pass the correct path.
I ran the command as follows:
python2 eval.py -out ../sentence/pred.txt -src ../data/processed/src-dev.txt -tgt ../data/processed/tgt-dev.txt

It worked for me

from nqg.

ant28 avatar ant28 commented on May 25, 2024

I met the same error when I run preprocess_embedding.sh, how can I fix it.
Traceback (most recent call last):
File "preprocess_embedding.py", line 76, in
main()
File "preprocess_embedding.py", line 49, in main
word2embedding[line[0]] = np.asarray(map(float, line[1 : ]))
IndexError: list index out of range
Traceback (most recent call last):
File "preprocess_embedding.py", line 76, in
main()
File "preprocess_embedding.py", line 49, in main
word2embedding[line[0]] = np.asarray(map(float, line[1 : ]))
IndexError: list index out of range
Traceback (most recent call last):
File "preprocess_embedding.py", line 76, in
main()
File "preprocess_embedding.py", line 49, in main
word2embedding[line[0]] = np.asarray(map(float, line[1 : ]))
IndexError: list index out of range

from nqg.

Related Issues (20)

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.