Skip to content

Commit 70c5a65

Browse files
authored
Merge pull request #10 from cheezer/master
fix bug in outputing XML
2 parents 0051b5b + 05c221b commit 70c5a65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pythonrouge/pythonrouge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def setting(self, files=True, summary_path="./", reference_path="./", summary=[]
104104
xml_file = open("{}".format(xml_path), "w")
105105
xml_file.write('<ROUGE-EVAL version="1.0">\n')
106106
for n, sys in enumerate(glob.glob("{}/*".format(summary_path))):
107-
file_name = os.path.splitext(os.path.basename(path))[0]
107+
file_name = os.path.splitext(os.path.basename(sys))[0]
108108
refs = glob.glob("{}/{}*".format(reference_path, file_name))
109109
xml_file.write('<EVAL ID="{}">\n'.format(n+1))
110110
xml_file.write("<MODEL-ROOT>{}</MODEL-ROOT>\n".format(reference_path))

0 commit comments

Comments
 (0)