Datasets:
Sub-tasks:
multi-class-classification
Languages:
English
Size:
1K<n<10K
Tags:
natural-language-understanding
ideology classification
text classification
natural language processing
License:
EricR401S
commited on
Commit
•
69b0908
1
Parent(s):
4664b52
complete dataset
Browse files
Pill_Ideologies-Post_Titles.py
CHANGED
@@ -177,6 +177,18 @@ class SubRedditPosts(datasets.GeneratorBasedBuilder):
|
|
177 |
train, test_size=0.20, stratify=train["subreddit"], random_state=42
|
178 |
)
|
179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
return [
|
181 |
datasets.SplitGenerator(
|
182 |
name=datasets.Split.TRAIN,
|
|
|
177 |
train, test_size=0.20, stratify=train["subreddit"], random_state=42
|
178 |
)
|
179 |
|
180 |
+
if self.config.name != "first_domain":
|
181 |
+
return [
|
182 |
+
datasets.SplitGenerator(
|
183 |
+
name=datasets.Split.TRAIN,
|
184 |
+
# These kwargs will be passed to _generate_examples
|
185 |
+
gen_kwargs={
|
186 |
+
"filepath": data,
|
187 |
+
"split": "train",
|
188 |
+
},
|
189 |
+
)
|
190 |
+
]
|
191 |
+
|
192 |
return [
|
193 |
datasets.SplitGenerator(
|
194 |
name=datasets.Split.TRAIN,
|