Update caBreu.py
Browse files
caBreu.py
CHANGED
|
@@ -102,20 +102,18 @@ class caBreu(datasets.GeneratorBasedBuilder):
|
|
| 102 |
with open(filepath) as f:
|
| 103 |
data = json.load(f)
|
| 104 |
for article in data:
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
except:
|
| 118 |
-
import code; code.interact(local=dict(globals(), **locals()))
|
| 119 |
yield id_, {
|
| 120 |
"id": id_,
|
| 121 |
"title": title,
|
|
|
|
| 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']
|
| 108 |
+
content = article['content']
|
| 109 |
+
category = article['category']
|
| 110 |
+
source = article['source']
|
| 111 |
+
summaries = article['summaries']
|
| 112 |
+
extreme = article['summaries']['extreme']
|
| 113 |
+
a1 = article['summaries']['extreme']['a1']
|
| 114 |
+
a2 = article['summaries']['extreme']['a2']
|
| 115 |
+
a3 = article['summaries']['extreme']['a3']
|
| 116 |
+
import code; code.interact(local=dict(globals(), **locals()))
|
|
|
|
|
|
|
| 117 |
yield id_, {
|
| 118 |
"id": id_,
|
| 119 |
"title": title,
|