JoaquinSilveira commited on
Commit
97149b5
1 Parent(s): 2a633d4

Removed json load encoding (removed in python 3 9)

Browse files
Files changed (1) hide show
  1. SQAC.py +2 -2
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
- viquiquad = json.load(f, encoding="utf-8")
121
- for article in viquiquad["data"]:
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()