Drunper commited on
Commit
7c8a71c
1 Parent(s): 7cf284e
Files changed (1) hide show
  1. metrica_tesi.py +3 -2
metrica_tesi.py CHANGED
@@ -107,6 +107,7 @@ class MetricaTesi(evaluate.Metric):
107
  if prediction == reference:
108
  score += 1
109
  score /= support
110
- results[f"support_{i}"] = support
111
- results[f"score_{i}"] = score
 
112
  return results
 
107
  if prediction == reference:
108
  score += 1
109
  score /= support
110
+ if support != 0:
111
+ results[f"support_{i}"] = support
112
+ results[f"score_{i}"] = score
113
  return results