You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to reproduce the rouge results in model_annotations.aligned.scored.jsonl, and here is my script:
#coding:utf-8
import sys
import json
import argparse
from summ_eval.rouge_metric import RougeMetric
def get_rouge():
rouge = RougeMetric()
pred = [
"paul merson was brought on with only seven minutes remaining in his team 's 0-0 draw with burnley . andros townsend scored the tottenham midfielder in the 89th minute . paul merson had another dig at andros townsend after his appearance . the midfielder had been brought on to the england squad last week . click here for all the latest arsenal news news .",
"paul merson has restarted his row with andros townsend . the tottenham midfielder was brought on with only seven minutes remaining in his team 's 0-0 draw with burnley . andros townsend scores england 's equaliser in their 1-1 friendly draw with italy in turin ."
]
refs = [
["Andros Townsend an 83rd minute sub in Tottenham's draw with Burnley. He was unable to find a winner as the game ended without a goal. Townsend had clashed with Paul Merson last week over England call-up. "],
["Andros Townsend an 83rd minute sub in Tottenham's draw with Burnley. He was unable to find a winner as the game ended without a goal. Townsend had clashed with Paul Merson last week over England call-up. "]
]
for i in range(2):
rouge_dict = rouge.evaluate_example(pred[i], refs[i])
#print(rouge_dict)
data = rouge_dict["rouge"]["rouge_1_f_score"]
print(data)
def main():
get_rouge()
if __name__ == "__main__":
main()
And preds and refs are from model_annotations.aligned.scored.jsonl which are the first two results. And the result from this script are:
0.40404
0.36145
But the rouge_1_f_score in model_annotations.aligned.scored.jsonl is
0.40404
0.38554
So, the first sentence get the same result and the second one is not. The other results are also some the same and some different. How can I reproduce the result?
The text was updated successfully, but these errors were encountered:
I try to reproduce the rouge results in
model_annotations.aligned.scored.jsonl
, and here is my script:And preds and refs are from
model_annotations.aligned.scored.jsonl
which are the first two results. And the result from this script are:But the
rouge_1_f_score
inmodel_annotations.aligned.scored.jsonl
isSo, the first sentence get the same result and the second one is not. The other results are also some the same and some different. How can I reproduce the result?
The text was updated successfully, but these errors were encountered: