antypasd commited on
Commit
290cfc8
1 Parent(s): aea4d69

sentiment: fixed bug I introduced

Browse files
Files changed (1) hide show
  1. super_tweeteval.py +7 -1
super_tweeteval.py CHANGED
@@ -2,7 +2,7 @@
2
  import json
3
  import datasets
4
 
5
- _VERSION = "0.1.51"
6
  _SUPER_TWEETEVAL_CITATION = """TBA"""
7
  _SUPER_TWEETEVAL_DESCRIPTION = """TBA"""
8
  _TWEET_TOPIC_DESCRIPTION = """
@@ -349,6 +349,12 @@ class SuperTweetEval(datasets.GeneratorBasedBuilder):
349
  names=label_classes)
350
  features["text"] = datasets.Value("string")
351
  if self.config.name == "tweet_sentiment":
 
 
 
 
 
 
352
  features["text"] = datasets.Value("string")
353
  names = ['anger', 'anticipation', 'disgust', 'fear', 'joy',
354
  'love', 'optimism', 'pessimism', 'sadness', 'surprise', 'trust']
 
2
  import json
3
  import datasets
4
 
5
+ _VERSION = "0.1.52"
6
  _SUPER_TWEETEVAL_CITATION = """TBA"""
7
  _SUPER_TWEETEVAL_DESCRIPTION = """TBA"""
8
  _TWEET_TOPIC_DESCRIPTION = """
 
349
  names=label_classes)
350
  features["text"] = datasets.Value("string")
351
  if self.config.name == "tweet_sentiment":
352
+ names = ['strongly negative', 'negative', 'negative or neutral', 'positive', 'strongly positive']
353
+ features["gold_label"] = datasets.features.ClassLabel(
354
+ names=names)
355
+ features["target"] = datasets.Value("string")
356
+ features["text"] = datasets.Value("string")
357
+ if self.config.name == "tweet_emotion":
358
  features["text"] = datasets.Value("string")
359
  names = ['anger', 'anticipation', 'disgust', 'fear', 'joy',
360
  'love', 'optimism', 'pessimism', 'sadness', 'surprise', 'trust']