Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.
This repository was archived by the owner on May 1, 2025. It is now read-only.

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

@mdabedr

Description

@mdabedr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions