lautel commited on
Commit
a97b744
1 Parent(s): 31e7bb3

Upload fair-rationales.py

Browse files
Files changed (1) hide show
  1. fair-rationales.py +5 -7
fair-rationales.py CHANGED
@@ -112,8 +112,6 @@ class FairRationales(datasets.GeneratorBasedBuilder):
112
  label_classes=SST2_LABELS,
113
  label_classes_original=["negative", "positive"],
114
  attributes=[
115
- ("recruitment_ethnicity", ["Black/African American", "White/Causasian", "Latino/Hispanic"]),
116
- ("recruitment_age", [">=38", "<=35"]),
117
  ("group_id", ["BO", "BY", "WO", "WY", "LO", "LY"]),
118
  ("sst2_id", datasets.Value("int32")),
119
  ("sst2_split", datasets.Value("string")),
@@ -155,8 +153,6 @@ class FairRationales(datasets.GeneratorBasedBuilder):
155
  label_classes=DYNASENT_LABELS,
156
  label_classes_original=["negative", "positive"],
157
  attributes=[
158
- ("recruitment_ethnicity", ["Black/African American", "White/Causasian", "Latino/Hispanic"]),
159
- ("recruitment_age", [">=38", "<=35"]),
160
  ("group_id", ["BO", "BY", "WO", "WY", "LO", "LY"]),
161
  ],
162
  data_url=os.path.join(MAIN_PATH, "dynasent.zip"),
@@ -186,8 +182,6 @@ class FairRationales(datasets.GeneratorBasedBuilder):
186
  ),
187
  label_classes_original=["A", "B", "C", "D", "E"],
188
  attributes=[
189
- ("recruitment_ethnicity", ["Black/African American", "White/Causasian", "Latino/Hispanic"]),
190
- ("recruitment_age", [">=38", "<=35"]),
191
  ("group_id", ["BO", "BY", "WO", "WY", "LO", "LY"]),
192
  ],
193
  data_url=os.path.join(MAIN_PATH, "cose.zip"),
@@ -224,7 +218,9 @@ class FairRationales(datasets.GeneratorBasedBuilder):
224
  "annotator_ID": datasets.Value("int64"),
225
  "english_proficiency": datasets.Value("string"),
226
  "attentioncheck": datasets.Value("string"),
227
- "gender": datasets.Value("string")
 
 
228
  }
229
  if self.config.name == "cose":
230
  features["label"] = datasets.Value("string")
@@ -271,7 +267,9 @@ class FairRationales(datasets.GeneratorBasedBuilder):
271
  "rationale_index": data["rationale_index"],
272
  "rationale_binary": data["rationale_binary"],
273
  "age": data["age"],
 
274
  "ethnicity": data["ethnicity"],
 
275
  "gender": data["gender"],
276
  "originaldata_id": data["originaldata_id"],
277
  "annotator_ID": data["annotator_ID"],
 
112
  label_classes=SST2_LABELS,
113
  label_classes_original=["negative", "positive"],
114
  attributes=[
 
 
115
  ("group_id", ["BO", "BY", "WO", "WY", "LO", "LY"]),
116
  ("sst2_id", datasets.Value("int32")),
117
  ("sst2_split", datasets.Value("string")),
 
153
  label_classes=DYNASENT_LABELS,
154
  label_classes_original=["negative", "positive"],
155
  attributes=[
 
 
156
  ("group_id", ["BO", "BY", "WO", "WY", "LO", "LY"]),
157
  ],
158
  data_url=os.path.join(MAIN_PATH, "dynasent.zip"),
 
182
  ),
183
  label_classes_original=["A", "B", "C", "D", "E"],
184
  attributes=[
 
 
185
  ("group_id", ["BO", "BY", "WO", "WY", "LO", "LY"]),
186
  ],
187
  data_url=os.path.join(MAIN_PATH, "cose.zip"),
 
218
  "annotator_ID": datasets.Value("int64"),
219
  "english_proficiency": datasets.Value("string"),
220
  "attentioncheck": datasets.Value("string"),
221
+ "gender": datasets.Value("string"),
222
+ "recruitment_age": datasets.Value("string"),
223
+ "recruitment_ethnicity": datasets.Value("string")
224
  }
225
  if self.config.name == "cose":
226
  features["label"] = datasets.Value("string")
 
267
  "rationale_index": data["rationale_index"],
268
  "rationale_binary": data["rationale_binary"],
269
  "age": data["age"],
270
+ "recruitment_age": data["recruitment_age"],
271
  "ethnicity": data["ethnicity"],
272
+ "recruitment_ethnicity": data["recruitment_ethnicity"],
273
  "gender": data["gender"],
274
  "originaldata_id": data["originaldata_id"],
275
  "annotator_ID": data["annotator_ID"],