JoaquinSilveira
commited on
Commit
•
97149b5
1
Parent(s):
2a633d4
Removed json load encoding (removed in python 3 9)
Browse files
SQAC.py
CHANGED
@@ -117,8 +117,8 @@ class SQAC(datasets.GeneratorBasedBuilder):
|
|
117 |
"""This function returns the examples in the raw (text) form."""
|
118 |
logger.info("generating examples from = %s", filepath)
|
119 |
with open(filepath, encoding="utf-8") as f:
|
120 |
-
|
121 |
-
for article in
|
122 |
title = article.get("title", "").strip()
|
123 |
for paragraph in article["paragraphs"]:
|
124 |
context = paragraph["context"].strip()
|
|
|
117 |
"""This function returns the examples in the raw (text) form."""
|
118 |
logger.info("generating examples from = %s", filepath)
|
119 |
with open(filepath, encoding="utf-8") as f:
|
120 |
+
sqac_data = json.load(f)
|
121 |
+
for article in sqac_data["data"]:
|
122 |
title = article.get("title", "").strip()
|
123 |
for paragraph in article["paragraphs"]:
|
124 |
context = paragraph["context"].strip()
|