Commit
·
ae1f60b
1
Parent(s):
63b1eae
corrected the unpack values
Browse files- malayalam_news.py +4 -2
malayalam_news.py
CHANGED
@@ -97,10 +97,12 @@ class MalayalamNews(datasets.GeneratorBasedBuilder):
|
|
97 |
csv_file, quotechar='"', delimiter=",", quoting=csv.QUOTE_ALL, skipinitialspace=True
|
98 |
)
|
99 |
for id_, row in enumerate(csv_reader):
|
100 |
-
label,
|
|
|
101 |
# Original labels are [1, 2, 3, 4] ->
|
102 |
# ['World', 'Sports', 'Business', 'Sci/Tech']
|
103 |
# Re-map to [0, 1, 2, 3].
|
104 |
label = int(label) - 1
|
105 |
-
text = " ".join((title, description))
|
|
|
106 |
yield id_, {"text": text, "label": label}
|
|
|
97 |
csv_file, quotechar='"', delimiter=",", quoting=csv.QUOTE_ALL, skipinitialspace=True
|
98 |
)
|
99 |
for id_, row in enumerate(csv_reader):
|
100 |
+
label, description = row
|
101 |
+
#label, title, description = row
|
102 |
# Original labels are [1, 2, 3, 4] ->
|
103 |
# ['World', 'Sports', 'Business', 'Sci/Tech']
|
104 |
# Re-map to [0, 1, 2, 3].
|
105 |
label = int(label) - 1
|
106 |
+
#text = " ".join((title, description))
|
107 |
+
text = description
|
108 |
yield id_, {"text": text, "label": label}
|