Datasets:
anjalyjayakrishnan
commited on
Commit
·
91099c4
1
Parent(s):
75474dd
error fix
Browse files
test.py
CHANGED
@@ -144,15 +144,18 @@ class Test(datasets.GeneratorBasedBuilder):
|
|
144 |
|
145 |
def _generate_examples(self, filepath):
|
146 |
print("**********", filepath)
|
147 |
-
with open(filepath
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
|
|
|
|
|
|
158 |
|
|
|
144 |
|
145 |
def _generate_examples(self, filepath):
|
146 |
print("**********", filepath)
|
147 |
+
with open(filepath) as f:
|
148 |
+
data = json.load(f)
|
149 |
+
print(data)
|
150 |
+
# with open(filepath, encoding="utf-8") as f:
|
151 |
+
# for key, row in enumerate(f):
|
152 |
+
# print("---------------------------------")
|
153 |
+
# print(key, type(key))
|
154 |
+
# print(row, type(row))
|
155 |
+
# data = json.loads(row)
|
156 |
+
# print(data)
|
157 |
+
# yield key, {
|
158 |
+
# "sentence": data["sentence"],
|
159 |
+
# "path": data["path"],
|
160 |
+
# }
|
161 |
|