我能从Rouge中调出一部分结果return吗?

What can I call out a portion of the result return from Rouge?

这里是需要帮助的初学者!

尝试谷歌搜索但信息不多

只想return只想要rouge-l的那组数字怎么办?

enter image description here

我不认为 rouge 包允许它,但你可以格式化输出:

formatted_scores = [{key: {k: "{0:.2f}".format(v) for k, v in value.items()} for key, value in s.items()} for s in scores]
print(formatted_scores)

[{'rouge-1': {'f': '0.67', 'p': '0.67', 'r': '0.67'}, 'rouge-2': {'f': '0.50', 'p': '0.50', 'r': '0.50'}, 'rouge-l': {'f': '0.67', 'p': '0.67', 'r': '0.67'}}]