From 165ef60aa6255dee2f10ee499c8b9c76ca7e76b1 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 25 Jan 2021 11:51:38 +1100 Subject: [PATCH] Fix cat scoring (?) --- spacy/scorer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/scorer.py b/spacy/scorer.py index dd0cde77b..cd693cf91 100644 --- a/spacy/scorer.py +++ b/spacy/scorer.py @@ -461,7 +461,7 @@ class Scorer: if gold_score is not None and gold_score > 0: f_per_type[gold_label].fn += 1 elif pred_cats: - pred_label, pred_score = max(pred_cats, key=lambda it: it[1]) + pred_label, pred_score = max(pred_cats.items(), key=lambda it: it[1]) if pred_score >= threshold: f_per_type[pred_label].fp += 1 micro_prf = PRFScore()