zorazrw commited on
Commit
f7a9211
1 Parent(s): 1a7904f

Update mconala.py

Browse files
Files changed (1) hide show
  1. mconala.py +3 -5
mconala.py CHANGED
@@ -68,8 +68,6 @@ class MCoNaLa(datasets.GeneratorBasedBuilder):
68
 
69
 
70
  def _generate_examples(self, filepath, split):
71
- key = 0
72
- for line in open(filepath, encoding="utf-8"):
73
- line = json.loads(line)
74
- yield key, line
75
- key += 1
68
 
69
 
70
  def _generate_examples(self, filepath, split):
71
+ dataset = json.load(open(filepath, encoding="utf-8"))
72
+ for key, line in enumerate(dataset):
73
+ yield key, line