this should work now
Browse files- unigram.py +1 -1
unigram.py
CHANGED
@@ -92,7 +92,7 @@ class unigram(evaluate.Metric):
|
|
92 |
precision = 1.0 * num_same / len(pred_items)
|
93 |
recall = 1.0 * num_same / len(gold_items)
|
94 |
f1 = (2 * precision * recall) / (precision + recall)
|
95 |
-
return np.array(precision, recall, f1)
|
96 |
|
97 |
def _compute(self, predictions, references):
|
98 |
"""Returns the scores"""
|
|
|
92 |
precision = 1.0 * num_same / len(pred_items)
|
93 |
recall = 1.0 * num_same / len(gold_items)
|
94 |
f1 = (2 * precision * recall) / (precision + recall)
|
95 |
+
return np.array([precision, recall, f1])
|
96 |
|
97 |
def _compute(self, predictions, references):
|
98 |
"""Returns the scores"""
|