yzha commited on
Commit
e09d677
·
1 Parent(s): 98cab56
Files changed (1) hide show
  1. ctc_eval.py +2 -3
ctc_eval.py CHANGED
@@ -90,9 +90,8 @@ class CTC_Eval(evaluate.EvaluationModule):
90
  def _compute(self, predictions, references):
91
  """Returns the scores"""
92
  # TODO: Compute the different scores of the module
93
- print(predictions)
94
- print(references)
95
- ctc_score = self.scorer.score(doc=references, refs=[], hypo=predictions, aspect='consistency')
96
  return {
97
  "ctc_score": ctc_score,
98
  }
 
90
  def _compute(self, predictions, references):
91
  """Returns the scores"""
92
  # TODO: Compute the different scores of the module
93
+ assert len(predictions) == len(references)
94
+ ctc_score = self.scorer.score(doc=references[0], refs=[], hypo=predictions[0], aspect='consistency')
 
95
  return {
96
  "ctc_score": ctc_score,
97
  }