removed emojis labels
Browse files- super_tweeteval.py +10 -8
super_tweeteval.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
import json
|
3 |
import datasets
|
4 |
|
5 |
-
_VERSION = "0.1.
|
6 |
_SUPER_TWEETEVAL_CITATION = """TBA"""
|
7 |
_SUPER_TWEETEVAL_DESCRIPTION = """TBA"""
|
8 |
_TWEET_TOPIC_DESCRIPTION = """
|
@@ -341,13 +341,15 @@ class SuperTweetEval(datasets.GeneratorBasedBuilder):
|
|
341 |
features['date'] = datasets.Value("string")
|
342 |
if self.config.name == "tweet_emoji":
|
343 |
# download class mapping
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
label_classes =
|
349 |
-
|
350 |
-
|
|
|
|
|
351 |
features["text"] = datasets.Value("string")
|
352 |
if self.config.name == "tweet_sentiment":
|
353 |
names = ['strongly negative', 'negative', 'negative or neutral', 'positive', 'strongly positive']
|
|
|
2 |
import json
|
3 |
import datasets
|
4 |
|
5 |
+
_VERSION = "0.1.61"
|
6 |
_SUPER_TWEETEVAL_CITATION = """TBA"""
|
7 |
_SUPER_TWEETEVAL_DESCRIPTION = """TBA"""
|
8 |
_TWEET_TOPIC_DESCRIPTION = """
|
|
|
341 |
features['date'] = datasets.Value("string")
|
342 |
if self.config.name == "tweet_emoji":
|
343 |
# download class mapping
|
344 |
+
# Temporary disabled (till made public)
|
345 |
+
# dl_manager = datasets.utils.download_manager.DownloadManager()
|
346 |
+
# url_map = "https://huggingface.co/datasets/cardiffnlp/super_tweet_eval/resolve/main/data/tweet_emoji/map.txt"
|
347 |
+
# with open(dl_manager.download(url_map)) as f:
|
348 |
+
# label_classes = f.readlines()
|
349 |
+
# label_classes = [x.strip('\n') for x in label_classes]
|
350 |
+
# features['gold_label'] = datasets.features.ClassLabel(
|
351 |
+
# names=label_classes)
|
352 |
+
features['gold_label'] = datasets.Value("int32")
|
353 |
features["text"] = datasets.Value("string")
|
354 |
if self.config.name == "tweet_sentiment":
|
355 |
names = ['strongly negative', 'negative', 'negative or neutral', 'positive', 'strongly positive']
|