ctrl-sum icon indicating copy to clipboard operation
ctrl-sum copied to clipboard

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

Open mdabedr opened this issue 4 years ago • 1 comments

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 avatar Dec 20 '21 06:12 mdabedr

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?

jxhe avatar Dec 21 '21 17:12 jxhe