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

IndexError: tuple index out of range #19

Open
wasiahmad opened this issue Jun 4, 2018 · 3 comments
Open

IndexError: tuple index out of range #19

wasiahmad opened this issue Jun 4, 2018 · 3 comments

Comments

@wasiahmad
Copy link

Getting the following error. Any suggestion to solve it?

2018-06-04 02:49:35,663 [MainThread ] [INFO ] Writing summaries.
2018-06-04 02:49:35,664 [MainThread ] [INFO ] Processing summaries. Saving system files to /tmp/tmp2x4ur084/system and model files to /tmp/tmp2x4ur084/model.
2018-06-04 02:49:35,664 [MainThread ] [INFO ] Processing files in ./data/system_summaries.
2018-06-04 02:49:35,664 [MainThread ] [INFO ] Processing test.txt.tgt.tagged.
2018-06-04 02:49:35,717 [MainThread ] [INFO ] Saved processed files to /tmp/tmp2x4ur084/system.
2018-06-04 02:49:35,718 [MainThread ] [INFO ] Processing files in ./data/model_summaries.
2018-06-04 02:49:35,718 [MainThread ] [INFO ] Processing predicted_summary.txt.
2018-06-04 02:49:35,777 [MainThread ] [INFO ] Saved processed files to /tmp/tmp2x4ur084/model.
Traceback (most recent call last):
File "seq_ats/test_pyrouge.py", line 9, in
output = r.convert_and_evaluate()
File "/home/wasiahmad/software/anaconda3/lib/python3.6/site-packages/pyrouge-0.1.3-py3.6.egg/pyrouge/Rouge155.py", line 367, in convert_and_evaluate
rouge_output = self.evaluate(system_id, rouge_args)
File "/home/wasiahmad/software/anaconda3/lib/python3.6/site-packages/pyrouge-0.1.3-py3.6.egg/pyrouge/Rouge155.py", line 334, in evaluate
self.write_config(system_id=system_id)
File "/home/wasiahmad/software/anaconda3/lib/python3.6/site-packages/pyrouge-0.1.3-py3.6.egg/pyrouge/Rouge155.py", line 318, in write_config
self._config_file, system_id)
File "/home/wasiahmad/software/anaconda3/lib/python3.6/site-packages/pyrouge-0.1.3-py3.6.egg/pyrouge/Rouge155.py", line 271, in write_config_static
id = match.groups(0)[0]
IndexError: tuple index out of range

@bheinzerling
Copy link
Owner

This error means that pyrouge cannot find document IDs in your file names when trying to match system and gold summaries. Your filenames should follow a pattern as explained here:

https://github.com/bheinzerling/pyrouge#i-have-summaries-in-plain-text-format-and-want-to-get-the-rouge-scores

@wasiahmad
Copy link
Author

What is document id? Do you mean we need to provide each document/summary in separate files? I have all the summaries in one file and all the gold summaries in another file. Isn't it enough?

@bheinzerling
Copy link
Owner

Do you mean we need to provide each document/summary in separate files?

yes

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

No branches or pull requests

2 participants