Kanishka Misra commited on
Commit ·
be43cd2
1
Parent(s): fcfa82f
distraction_type field
Browse files
comps.py
CHANGED
|
@@ -106,9 +106,13 @@ class Comps(datasets.GeneratorBasedBuilder):
|
|
| 106 |
line_dict = json.loads(line)
|
| 107 |
if "wugs" in self.config.name:
|
| 108 |
id_ = line_dict["base_id"] + "_" + line_dict["distraction_type"]
|
|
|
|
|
|
|
|
|
|
| 109 |
else:
|
| 110 |
id_ = line_dict['id']
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
|
|
|
| 114 |
yield id_, feats
|
|
|
|
| 106 |
line_dict = json.loads(line)
|
| 107 |
if "wugs" in self.config.name:
|
| 108 |
id_ = line_dict["base_id"] + "_" + line_dict["distraction_type"]
|
| 109 |
+
feats = {
|
| 110 |
+
**line_dict
|
| 111 |
+
}
|
| 112 |
else:
|
| 113 |
id_ = line_dict['id']
|
| 114 |
+
feats = {
|
| 115 |
+
**line_dict,
|
| 116 |
+
"distraction_type": "none"
|
| 117 |
+
}
|
| 118 |
yield id_, feats
|