khalidalt commited on
Commit
1307b89
1 Parent(s): 6d4c7c7

Update tydiqa-goldp.py

Browse files
Files changed (1) hide show
  1. tydiqa-goldp.py +2 -2
tydiqa-goldp.py CHANGED
@@ -102,13 +102,13 @@ class tydiqa_GoldP(datasets.GeneratorBasedBuilder):
102
  # TODO(tydiqa): Yields (key, example) tuples from the dataset
103
 
104
  with open(filepath, encoding="utf-8") as f:
105
- for row in f:
106
  data = json.loads(row)
107
 
108
  #print(data)
109
  #assert False
110
 
111
- _id = row["id"]
112
  yield _id, data
113
  #assert False
114
  #data = json.load(f)
 
102
  # TODO(tydiqa): Yields (key, example) tuples from the dataset
103
 
104
  with open(filepath, encoding="utf-8") as f:
105
+ for _id,row in enumerate(f):
106
  data = json.loads(row)
107
 
108
  #print(data)
109
  #assert False
110
 
111
+ #_id = row["id"]
112
  yield _id, data
113
  #assert False
114
  #data = json.load(f)