Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Could not find or load main class edu.stanford.nlp.process.PTBTokenizer #13

Open
mdabedr opened this issue Dec 20, 2021 · 1 comment
Labels
question Further information is requested

Comments

@mdabedr
Copy link

mdabedr commented Dec 20, 2021

I am trying to run the test_bart.sh code to get the rouge score for my own dataset and I get the following:

`Traceback (most recent call last):
File "/home/mdabed/anaconda3/envs/myPython3.7/bin/files2rouge", line 33, in
sys.exit(load_entry_point('files2rouge==2.1.0', 'console_scripts', 'files2rouge')())
File "/home/mdabed/anaconda3/envs/myPython3.7/lib/python3.7/site-packages/files2rouge-2.1.0-py3.7.egg/files2rouge/files2rouge.py", line 141, in main
stemming=not args.no_stemming)
File "/home/mdabed/anaconda3/envs/myPython3.7/lib/python3.7/site-packages/files2rouge-2.1.0-py3.7.egg/files2rouge/files2rouge.py", line 65, in run
ignore_empty_summary=ignore_empty_summary)
File "/home/mdabed/anaconda3/envs/myPython3.7/lib/python3.7/site-packages/files2rouge-2.1.0-py3.7.egg/files2rouge/utils.py", line 40, in split_files
model_count = line_count(model_path)
File "/home/mdabed/anaconda3/envs/myPython3.7/lib/python3.7/site-packages/files2rouge-2.1.0-py3.7.egg/files2rouge/utils.py", line 19, in line_count
n = i + 1Traceback (most recent call last):
File "/home/mdabed/anaconda3/envs/myPython3.7/bin/files2rouge", line 33, in
sys.exit(load_entry_point('files2rouge==2.1.0', 'console_scripts', 'files2rouge')())
File "/home/mdabed/anaconda3/envs/myPython3.7/lib/python3.7/site-packages/files2rouge-2.1.0-py3.7.egg/files2rouge/files2rouge.py", line 141, in main
stemming=not args.no_stemming)
File "/home/mdabed/anaconda3/envs/myPython3.7/lib/python3.7/site-packages/files2rouge-2.1.0-py3.7.egg/files2rouge/files2rouge.py", line 65, in run
ignore_empty_summary=ignore_empty_summary)
File "/home/mdabed/anaconda3/envs/myPython3.7/lib/python3.7/site-packages/files2rouge-2.1.0-py3.7.egg/files2rouge/utils.py", line 40, in split_files
model_count = line_count(model_path)
File "/home/mdabed/anaconda3/envs/myPython3.7/lib/python3.7/site-packages/files2rouge-2.1.0-py3.7.egg/files2rouge/utils.py", line 19, in line_count
n = i + 1
UnboundLocalError: local variable 'i' referenced before assignment

UnboundLocalError: local variable 'i' referenced before assignment
`

What have you tried?

I tried adding the classpath variables for the core NLP as most stack overflow tells me to do. Also, I have tried checking the tokenization command manually.

@mdabedr mdabedr added the question Further information is requested label Dec 20, 2021
@jxhe
Copy link
Collaborator

jxhe commented Dec 21, 2021

Hi,

This seems to be an issue with the files2rouge package instead of our code, can you share a sample of ground-truth/predicted summaries so that I can reproduce this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants