Commit ·
96ae7bb
1
Parent(s): 6af42f0
Update mind.py
Browse files
mind.py
CHANGED
|
@@ -48,11 +48,11 @@ _CITATION = """\
|
|
| 48 |
}
|
| 49 |
"""
|
| 50 |
|
| 51 |
-
_TRAIN_DOWNLOAD_URL = "https://
|
| 52 |
-
_TEST_DOWNLOAD_URL = "https://
|
| 53 |
|
| 54 |
|
| 55 |
-
class
|
| 56 |
"""AG News topic classification dataset."""
|
| 57 |
|
| 58 |
def _info(self):
|
|
@@ -61,12 +61,12 @@ class AGNews(datasets.GeneratorBasedBuilder):
|
|
| 61 |
features=datasets.Features(
|
| 62 |
{
|
| 63 |
"text": datasets.Value("string"),
|
| 64 |
-
"label": datasets.features.ClassLabel(
|
| 65 |
}
|
| 66 |
),
|
| 67 |
homepage="http://groups.di.unipi.it/~gulli/AG_corpus_of_news_articles.html",
|
| 68 |
citation=_CITATION,
|
| 69 |
-
task_templates=[TextClassification(text_column=
|
| 70 |
)
|
| 71 |
|
| 72 |
def _split_generators(self, dl_manager):
|
|
|
|
| 48 |
}
|
| 49 |
"""
|
| 50 |
|
| 51 |
+
_TRAIN_DOWNLOAD_URL = "https://huggingface.co/datasets/linxinyuan/mind/raw/main/train.tsv"
|
| 52 |
+
_TEST_DOWNLOAD_URL = "https://huggingface.co/datasets/linxinyuan/mind/raw/main/test.tsv"
|
| 53 |
|
| 54 |
|
| 55 |
+
class mind(datasets.GeneratorBasedBuilder):
|
| 56 |
"""AG News topic classification dataset."""
|
| 57 |
|
| 58 |
def _info(self):
|
|
|
|
| 61 |
features=datasets.Features(
|
| 62 |
{
|
| 63 |
"text": datasets.Value("string"),
|
| 64 |
+
"label": datasets.features.ClassLabel(),
|
| 65 |
}
|
| 66 |
),
|
| 67 |
homepage="http://groups.di.unipi.it/~gulli/AG_corpus_of_news_articles.html",
|
| 68 |
citation=_CITATION,
|
| 69 |
+
task_templates=[TextClassification(text_column=3, label_column=1)],
|
| 70 |
)
|
| 71 |
|
| 72 |
def _split_generators(self, dl_manager):
|