Update tydiqa-goldp.py
Browse files- 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
|
106 |
data = json.loads(row)
|
107 |
|
108 |
#print(data)
|
109 |
#assert False
|
110 |
|
111 |
-
|
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 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)
|