Update labels.py
Browse files
labels.py
CHANGED
|
@@ -92,7 +92,6 @@ class YahooAnswersTopics(datasets.GeneratorBasedBuilder):
|
|
| 92 |
homepage="https://github.com/LC-John/Yahoo-Answers-Topic-Classification-Dataset",
|
| 93 |
)
|
| 94 |
|
| 95 |
-
|
| 96 |
def _split_generators(self, dl_manager):
|
| 97 |
train_path = dl_manager.download_and_extract(_TRAIN_DOWNLOAD_URL)
|
| 98 |
test_path = dl_manager.download_and_extract(_TEST_DOWNLOAD_URL)
|
|
@@ -104,7 +103,7 @@ class YahooAnswersTopics(datasets.GeneratorBasedBuilder):
|
|
| 104 |
name=datasets.Split.TEST, gen_kwargs={"filepath": test_path}),
|
| 105 |
]
|
| 106 |
|
| 107 |
-
|
| 108 |
with open(filepath, encoding="utf-8") as f:
|
| 109 |
rows = csv.reader(f)
|
| 110 |
for i, row in enumerate(rows):
|
|
|
|
| 92 |
homepage="https://github.com/LC-John/Yahoo-Answers-Topic-Classification-Dataset",
|
| 93 |
)
|
| 94 |
|
|
|
|
| 95 |
def _split_generators(self, dl_manager):
|
| 96 |
train_path = dl_manager.download_and_extract(_TRAIN_DOWNLOAD_URL)
|
| 97 |
test_path = dl_manager.download_and_extract(_TEST_DOWNLOAD_URL)
|
|
|
|
| 103 |
name=datasets.Split.TEST, gen_kwargs={"filepath": test_path}),
|
| 104 |
]
|
| 105 |
|
| 106 |
+
def _generate_examples(self, filepath):
|
| 107 |
with open(filepath, encoding="utf-8") as f:
|
| 108 |
rows = csv.reader(f)
|
| 109 |
for i, row in enumerate(rows):
|