updated script version
Browse files- super_tweet_eval.py +9 -5
super_tweet_eval.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
import json
|
3 |
import datasets
|
4 |
|
5 |
-
_VERSION = "0.1.
|
6 |
_SUPER_TWEET_EVAL_CITATION = """TBA"""
|
7 |
_SUPER_TWEET_EVAL_DESCRIPTION = """TBA"""
|
8 |
_TWEET_TOPIC_DESCRIPTION = """
|
@@ -250,7 +250,7 @@ class SuperTweetEval(datasets.GeneratorBasedBuilder):
|
|
250 |
name="tweet_sentiment",
|
251 |
description=_TWEET_SENTIMENT_DESCRIPTION,
|
252 |
citation=_TWEET_SENTIMENT_CITATION,
|
253 |
-
features=['gold_label', '
|
254 |
data_url="https://huggingface.co/datasets/cardiffnlp/super_tweet_eval/resolve/main/data/tweet_sentiment",
|
255 |
)
|
256 |
]
|
@@ -274,8 +274,12 @@ class SuperTweetEval(datasets.GeneratorBasedBuilder):
|
|
274 |
features["gold_score"] = datasets.Value("float32")
|
275 |
if self.config.name == "tempo_wic":
|
276 |
features["gold_label_binary"] = datasets.Value("int32")
|
277 |
-
features["token_idx_1"] = datasets.Value("int32")
|
278 |
-
features["token_idx_2"] = datasets.Value("int32")
|
|
|
|
|
|
|
|
|
279 |
features["text_1_tokenized"] = datasets.Sequence(datasets.Value("string"))
|
280 |
features["text_2_tokenized"] = datasets.Sequence(datasets.Value("string"))
|
281 |
if self.config.name == "tweet_hate":
|
@@ -298,7 +302,7 @@ class SuperTweetEval(datasets.GeneratorBasedBuilder):
|
|
298 |
if self.config.name == "tweet_sentiment":
|
299 |
features["gold_label"] = datasets.Value("int32")
|
300 |
features["text"] = datasets.Value("string")
|
301 |
-
features["
|
302 |
|
303 |
|
304 |
return datasets.DatasetInfo(
|
|
|
2 |
import json
|
3 |
import datasets
|
4 |
|
5 |
+
_VERSION = "0.1.34"
|
6 |
_SUPER_TWEET_EVAL_CITATION = """TBA"""
|
7 |
_SUPER_TWEET_EVAL_DESCRIPTION = """TBA"""
|
8 |
_TWEET_TOPIC_DESCRIPTION = """
|
|
|
250 |
name="tweet_sentiment",
|
251 |
description=_TWEET_SENTIMENT_DESCRIPTION,
|
252 |
citation=_TWEET_SENTIMENT_CITATION,
|
253 |
+
features=['gold_label', 'target', 'text'],
|
254 |
data_url="https://huggingface.co/datasets/cardiffnlp/super_tweet_eval/resolve/main/data/tweet_sentiment",
|
255 |
)
|
256 |
]
|
|
|
274 |
features["gold_score"] = datasets.Value("float32")
|
275 |
if self.config.name == "tempo_wic":
|
276 |
features["gold_label_binary"] = datasets.Value("int32")
|
277 |
+
# features["token_idx_1"] = datasets.Value("int32")
|
278 |
+
# features["token_idx_2"] = datasets.Value("int32")
|
279 |
+
features["text_start_1"] = datasets.Value("int32")
|
280 |
+
features["text_start_2"] = datasets.Value("int32")
|
281 |
+
features["text_end_1"] = datasets.Value("int32")
|
282 |
+
features["text_end_2"] = datasets.Value("int32")
|
283 |
features["text_1_tokenized"] = datasets.Sequence(datasets.Value("string"))
|
284 |
features["text_2_tokenized"] = datasets.Sequence(datasets.Value("string"))
|
285 |
if self.config.name == "tweet_hate":
|
|
|
302 |
if self.config.name == "tweet_sentiment":
|
303 |
features["gold_label"] = datasets.Value("int32")
|
304 |
features["text"] = datasets.Value("string")
|
305 |
+
features["target"] = datasets.Value("string")
|
306 |
|
307 |
|
308 |
return datasets.DatasetInfo(
|