Datasets:
nlp-thedeep
commited on
Update humsetbias.py
Browse files- humsetbias.py +20 -20
humsetbias.py
CHANGED
@@ -47,8 +47,8 @@ _URLs = {
|
|
47 |
"1.0.0": {
|
48 |
"train": "data/humset_bias_train.jsonl",
|
49 |
"dev": "data/humset_bias_val.jsonl",
|
50 |
-
"gender": "data/test_gender.jsonl",
|
51 |
-
"country": "data/test_country.jsonl"
|
52 |
}
|
53 |
}
|
54 |
|
@@ -194,18 +194,18 @@ class Humset(datasets.GeneratorBasedBuilder):
|
|
194 |
"filepath": downloaded_files["dev"]
|
195 |
},
|
196 |
),
|
197 |
-
datasets.SplitGenerator(
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
),
|
203 |
-
datasets.SplitGenerator(
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
),
|
209 |
]
|
210 |
|
211 |
return splits
|
@@ -218,12 +218,12 @@ class Humset(datasets.GeneratorBasedBuilder):
|
|
218 |
idx = 0
|
219 |
for line in data:
|
220 |
row = json.loads(line)
|
221 |
-
if "train" in filepath:
|
222 |
-
|
223 |
-
elif "gender" in filepath:
|
224 |
-
|
225 |
-
elif "country" in filepath:
|
226 |
-
|
227 |
#if self.config.name == "1.0.0":
|
228 |
yield idx, row
|
229 |
idx+=1
|
|
|
47 |
"1.0.0": {
|
48 |
"train": "data/humset_bias_train.jsonl",
|
49 |
"dev": "data/humset_bias_val.jsonl",
|
50 |
+
#"gender": "data/test_gender.jsonl",
|
51 |
+
#"country": "data/test_country.jsonl"
|
52 |
}
|
53 |
}
|
54 |
|
|
|
194 |
"filepath": downloaded_files["dev"]
|
195 |
},
|
196 |
),
|
197 |
+
#datasets.SplitGenerator(
|
198 |
+
# name="test_gender",
|
199 |
+
# gen_kwargs={
|
200 |
+
# "filepath": downloaded_files["gender"]
|
201 |
+
# },
|
202 |
+
#),
|
203 |
+
#datasets.SplitGenerator(
|
204 |
+
# name="test_country",
|
205 |
+
# gen_kwargs={
|
206 |
+
# "filepath": downloaded_files["country"]
|
207 |
+
# }
|
208 |
+
#),
|
209 |
]
|
210 |
|
211 |
return splits
|
|
|
218 |
idx = 0
|
219 |
for line in data:
|
220 |
row = json.loads(line)
|
221 |
+
#if "train" in filepath:
|
222 |
+
# row = {k: v for k, v in row.items() if k in HUMSETBIAS_GENERAL}
|
223 |
+
#elif "gender" in filepath:
|
224 |
+
# row = {k: v for k, v in row.items() if k in HUMSETBIAS_FEATURES_GENDER}
|
225 |
+
#elif "country" in filepath:
|
226 |
+
# row = {k: v for k, v in row.items() if k in HUMSETBIAS_FEATURES_COUNTRY}
|
227 |
#if self.config.name == "1.0.0":
|
228 |
yield idx, row
|
229 |
idx+=1
|