crystina-z xiyanghu commited on
Commit
bec23fc
1 Parent(s): 0a9bdc2

Update mr-tydi.py (#1)

Browse files

- Update mr-tydi.py (a05d7f0bf105cb974d293c1d782938074de8d419)


Co-authored-by: Xiyang Hu <xiyanghu@users.noreply.huggingface.co>

Files changed (1) hide show
  1. mr-tydi.py +1 -1
mr-tydi.py CHANGED
@@ -133,7 +133,7 @@ class MrTyDi(datasets.GeneratorBasedBuilder):
133
 
134
  def _generate_examples(self, filepath):
135
  lang = self.config.name
136
- with open(filepath) as f:
137
  for i, line in enumerate(f):
138
  data = json.loads(line)
139
  qid = data['query_id'] if lang != 'combined' else f'fake-{i}'
 
133
 
134
  def _generate_examples(self, filepath):
135
  lang = self.config.name
136
+ with open(filepath, encoding="utf-8") as f:
137
  for i, line in enumerate(f):
138
  data = json.loads(line)
139
  qid = data['query_id'] if lang != 'combined' else f'fake-{i}'