AmitMY commited on
Commit
db2ce77
·
1 Parent(s): 1613346
Files changed (2) hide show
  1. debug_eval.json +0 -0
  2. signwriting_similarity.py +2 -7
debug_eval.json ADDED
The diff for this file is too large to render. See raw diff
 
signwriting_similarity.py CHANGED
@@ -134,13 +134,8 @@ class SignWritingSimilarity(evaluate.Metric):
134
  )
135
 
136
  def _compute(self, predictions, references):
137
- # if only one reference is provided make sure we still use list of lists
138
- if isinstance(references[0], str):
139
- references = [references]
140
- # else:
141
- # # transpose references, to be array of arrays
142
- # # the internal array is as long as the predictions, the external one is for multiple references.
143
- # references = list(zip(*references))
144
 
145
  score = self.metric.corpus_score(predictions, references)
146
 
 
134
  )
135
 
136
  def _compute(self, predictions, references):
137
+ # the internal array is as long as the predictions, the external one is for multiple references.
138
+ references = list(zip(*references))
 
 
 
 
 
139
 
140
  score = self.metric.corpus_score(predictions, references)
141