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
•
c38f66d
1
Parent(s):
5a4bb8e
testing generating examples
Browse files
Pill_Ideologies-Post_Titles.py
CHANGED
@@ -191,13 +191,13 @@ class SubRedditPosts(datasets.GeneratorBasedBuilder):
|
|
191 |
]
|
192 |
|
193 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
194 |
-
def _generate_examples(self,
|
195 |
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
196 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
197 |
print("inside generate examples")
|
198 |
print(split, "is the split")
|
199 |
-
print(
|
200 |
-
for key, row in
|
201 |
# print(row, "is the row")
|
202 |
if self.config.name == "first_domain":
|
203 |
yield key, {
|
|
|
191 |
]
|
192 |
|
193 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
194 |
+
def _generate_examples(self, filepath, split):
|
195 |
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
196 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
197 |
print("inside generate examples")
|
198 |
print(split, "is the split")
|
199 |
+
print(filepath.shape, "is the filepath")
|
200 |
+
for key, row in filepath.iterrows():
|
201 |
# print(row, "is the row")
|
202 |
if self.config.name == "first_domain":
|
203 |
yield key, {
|