简体   繁体   English

我可以从 Rouge 中调出一部分结果返回吗?

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

Beginner here that needs help!这里需要帮助的初学者!

Tried googling but not much info尝试谷歌搜索但没有太多信息

What should i do if I only want to return only the set of digits in rouge-l?如果我只想返回rouge-l中的一组数字,我该怎么办?

enter image description here在此处输入图片说明

I don't think rouge package allows it but you can just format the output:我不认为 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'}}] [{'rouge-1':{'f':'0.67','p':'0.67','r':'0.67'},'rouge-2':{'f':'0.50',' p':'0.50','r':'0.50'},'胭脂-l':{'f':'0.67','p':'0.67','r':'0.67'}}]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM