ckb commited on
Commit
e1f597a
1 Parent(s): c0f684d

this should work now

Browse files
Files changed (1) hide show
  1. 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"""