rajeshradhakrishnan
commited on
Commit
•
10d821f
1
Parent(s):
f7e2cb5
Renamed label to labels
Browse files- dataset_infos.json +8 -8
- malayalam_news.py +2 -2
dataset_infos.json
CHANGED
@@ -29,7 +29,7 @@
|
|
29 |
{
|
30 |
"task": "text-classification",
|
31 |
"text_column": "text",
|
32 |
-
"label_column": "
|
33 |
"labels": [
|
34 |
"business",
|
35 |
"entertainment",
|
@@ -50,26 +50,26 @@
|
|
50 |
"splits": {
|
51 |
"train": {
|
52 |
"name": "train",
|
53 |
-
"num_bytes":
|
54 |
-
"num_examples":
|
55 |
"dataset_name": "malayalam_news"
|
56 |
},
|
57 |
"validation": {
|
58 |
"name": "validation",
|
59 |
-
"num_bytes":
|
60 |
-
"num_examples":
|
61 |
"dataset_name": "malayalam_news"
|
62 |
},
|
63 |
"test": {
|
64 |
"name": "test",
|
65 |
-
"num_bytes":
|
66 |
-
"num_examples":
|
67 |
"dataset_name": "malayalam_news"
|
68 |
}
|
69 |
},
|
70 |
"download_checksums": {
|
71 |
"https://storage.googleapis.com/ai4bharat-public-indic-nlp-corpora/evaluations/classification/indicnlp-news-articles.tgz": {
|
72 |
-
"num_bytes":
|
73 |
"checksum": ""
|
74 |
}
|
75 |
},
|
|
|
29 |
{
|
30 |
"task": "text-classification",
|
31 |
"text_column": "text",
|
32 |
+
"label_column": "labels",
|
33 |
"labels": [
|
34 |
"business",
|
35 |
"entertainment",
|
|
|
50 |
"splits": {
|
51 |
"train": {
|
52 |
"name": "train",
|
53 |
+
"num_bytes": 15384,
|
54 |
+
"num_examples": 4800,
|
55 |
"dataset_name": "malayalam_news"
|
56 |
},
|
57 |
"validation": {
|
58 |
"name": "validation",
|
59 |
+
"num_bytes": 1943,
|
60 |
+
"num_examples": 600,
|
61 |
"dataset_name": "malayalam_news"
|
62 |
},
|
63 |
"test": {
|
64 |
"name": "test",
|
65 |
+
"num_bytes": 1959,
|
66 |
+
"num_examples": 600,
|
67 |
"dataset_name": "malayalam_news"
|
68 |
}
|
69 |
},
|
70 |
"download_checksums": {
|
71 |
"https://storage.googleapis.com/ai4bharat-public-indic-nlp-corpora/evaluations/classification/indicnlp-news-articles.tgz": {
|
72 |
+
"num_bytes": 511268261,
|
73 |
"checksum": ""
|
74 |
}
|
75 |
},
|
malayalam_news.py
CHANGED
@@ -54,7 +54,7 @@ class MalayalamNews(datasets.GeneratorBasedBuilder):
|
|
54 |
features=datasets.Features(
|
55 |
{
|
56 |
"text": datasets.Value("string"),
|
57 |
-
"
|
58 |
}
|
59 |
),
|
60 |
homepage="https://github.com/AI4Bharat/indicnlp_corpus#indicnlp-news-article-classification-dataset",
|
@@ -105,4 +105,4 @@ class MalayalamNews(datasets.GeneratorBasedBuilder):
|
|
105 |
#label = int(label) - 1
|
106 |
#text = " ".join((title, description))
|
107 |
text = description
|
108 |
-
yield id_, {"text": text, "
|
|
|
54 |
features=datasets.Features(
|
55 |
{
|
56 |
"text": datasets.Value("string"),
|
57 |
+
"labels": datasets.features.ClassLabel(names=["business", "entertainment", "sports", "technology"]),
|
58 |
}
|
59 |
),
|
60 |
homepage="https://github.com/AI4Bharat/indicnlp_corpus#indicnlp-news-article-classification-dataset",
|
|
|
105 |
#label = int(label) - 1
|
106 |
#text = " ".join((title, description))
|
107 |
text = description
|
108 |
+
yield id_, {"text": text, "labels": label}
|