I have a dict_items called results which contains the following:
dict_items([('rouge-1', {'r': 1.0, 'p': 1.0, 'f': 0.999999995}), ('rouge-2', {'r': 1.0, 'p': 1.0, 'f': 0.999999995}), ('rouge-l', {'r': 1.0, 'p': 1.0, 'f': 0.999999995})])
What I want to do is to extract the values of f from all items rouge-1, rouge-2 and rouge-l
How can I do it?
>Solution :
Try:
results = get_scores() # <-- the results contains your dict_item(...)
for k, v in results:
print(k, v["f"])