Hugo Abonizio commited on
Commit 路
aff028d
1
Parent(s): dfcfe75
Update
Browse files- ag_news_pt.py +2 -2
- test.csv +2 -2
- train.csv +2 -2
ag_news_pt.py
CHANGED
|
@@ -62,12 +62,12 @@ class AGNews(datasets.GeneratorBasedBuilder):
|
|
| 62 |
features=datasets.Features(
|
| 63 |
{
|
| 64 |
"text": datasets.Value("string"),
|
|
|
|
| 65 |
"label": datasets.features.ClassLabel(names=["Mundo", "Esportes", "Neg贸cios", "Tecnologia"]),
|
| 66 |
}
|
| 67 |
),
|
| 68 |
homepage="http://groups.di.unipi.it/~gulli/AG_corpus_of_news_articles.html",
|
| 69 |
citation=_CITATION,
|
| 70 |
-
task_templates=[TextClassification(text_column="text", label_column="label")],
|
| 71 |
)
|
| 72 |
|
| 73 |
def _split_generators(self, dl_manager):
|
|
@@ -92,4 +92,4 @@ class AGNews(datasets.GeneratorBasedBuilder):
|
|
| 92 |
# ['World', 'Sports', 'Business', 'Sci/Tech']
|
| 93 |
# Re-map to [0, 1, 2, 3].
|
| 94 |
label = int(label) - 1
|
| 95 |
-
yield id_, {"text":
|
|
|
|
| 62 |
features=datasets.Features(
|
| 63 |
{
|
| 64 |
"text": datasets.Value("string"),
|
| 65 |
+
"title": datasets.Value("string"),
|
| 66 |
"label": datasets.features.ClassLabel(names=["Mundo", "Esportes", "Neg贸cios", "Tecnologia"]),
|
| 67 |
}
|
| 68 |
),
|
| 69 |
homepage="http://groups.di.unipi.it/~gulli/AG_corpus_of_news_articles.html",
|
| 70 |
citation=_CITATION,
|
|
|
|
| 71 |
)
|
| 72 |
|
| 73 |
def _split_generators(self, dl_manager):
|
|
|
|
| 92 |
# ['World', 'Sports', 'Business', 'Sci/Tech']
|
| 93 |
# Re-map to [0, 1, 2, 3].
|
| 94 |
label = int(label) - 1
|
| 95 |
+
yield id_, {"text": text, "title": title, "label": label}
|
test.csv
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4ad69e4fe5fa6e52d6a478faa76d0d9b775b1859d9f5b49a274fd9c6df974ec0
|
| 3 |
+
size 2051453
|
train.csv
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9aed46c3e508a4d7efd747ed36cc89297c3f65b24897ff18d3dfcfecdc265976
|
| 3 |
+
size 32500955
|