salesforce / ctrl-sum

Resources for the "CTRLsum: Towards Generic Controllable Text Summarization" paper
https://arxiv.org/abs/2012.04281
BSD 3-Clause "New" or "Revised" License
146 stars 24 forks source link

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

Open mdabedr opened 2 years ago

mdabedr commented 2 years ago

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.
jxhe commented 2 years ago

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?