rajeshradhakrishnan commited on
Commit
3f5d3bf
1 Parent(s): 10d821f

renamed label to labels, to fix load_dataset

Browse files
Files changed (2) hide show
  1. dataset_infos.json +1 -1
  2. 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": "labels",
33
  "labels": [
34
  "business",
35
  "entertainment",
29
  {
30
  "task": "text-classification",
31
  "text_column": "text",
32
+ "label_column": "label",
33
  "labels": [
34
  "business",
35
  "entertainment",
malayalam_news.py CHANGED
@@ -54,7 +54,7 @@ class MalayalamNews(datasets.GeneratorBasedBuilder):
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,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, "labels": label}
54
  features=datasets.Features(
55
  {
56
  "text": datasets.Value("string"),
57
+ "label": 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, "label": label}