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