Update caBreu.py
Browse files
caBreu.py
CHANGED
|
@@ -100,8 +100,8 @@ class caBreu(datasets.GeneratorBasedBuilder):
|
|
| 100 |
"""This function returns the examples in the raw (text) form."""
|
| 101 |
logger.info("generating examples from = %s", filepath)
|
| 102 |
with open(filepath) as f:
|
| 103 |
-
|
| 104 |
-
|
| 105 |
id_ = article['id']
|
| 106 |
title = article['title']
|
| 107 |
subtitle = article['subtitle']
|
|
|
|
| 100 |
"""This function returns the examples in the raw (text) form."""
|
| 101 |
logger.info("generating examples from = %s", filepath)
|
| 102 |
with open(filepath) as f:
|
| 103 |
+
data = json.load(f)
|
| 104 |
+
for article in data:
|
| 105 |
id_ = article['id']
|
| 106 |
title = article['title']
|
| 107 |
subtitle = article['subtitle']
|