AlhitawiMohammed22 commited on
Commit
1fcde11
β€’
1 Parent(s): 928ee9c

correct script

Browse files
Files changed (1) hide show
  1. eval_wer.py +1 -1
eval_wer.py CHANGED
@@ -81,12 +81,12 @@ class WER(evaluate.Metric):
81
  if concatenate_texts:
82
  return compute_measures(references, predictions)["wer"]
83
  total = 0
 
84
  for prediction, reference in zip(predictions, references):
85
  measures = compute_measures(reference, prediction)
86
  incorrect += measures["substitutions"] + measures["deletions"] + measures["insertions"]
87
  total += measures["substitutions"] + measures["deletions"] + measures["hits"]
88
  return incorrect / total
89
-
90
  # else:
91
  # incorrect = 0
92
  # total = 0
 
81
  if concatenate_texts:
82
  return compute_measures(references, predictions)["wer"]
83
  total = 0
84
+ incorrect = 0
85
  for prediction, reference in zip(predictions, references):
86
  measures = compute_measures(reference, prediction)
87
  incorrect += measures["substitutions"] + measures["deletions"] + measures["insertions"]
88
  total += measures["substitutions"] + measures["deletions"] + measures["hits"]
89
  return incorrect / total
 
90
  # else:
91
  # incorrect = 0
92
  # total = 0