Datasets:

Languages:
English
ArXiv:
License:
asahi417 commited on
Commit
54feebc
1 Parent(s): 8b720cd

Update tweet_topic_multi.py

Browse files
Files changed (1) hide show
  1. tweet_topic_multi.py +8 -2
tweet_topic_multi.py CHANGED
@@ -6,7 +6,7 @@ import datasets
6
  logger = datasets.logging.get_logger(__name__)
7
  _DESCRIPTION = """[TweetTopic](https://arxiv.org/abs/2209.09824)"""
8
 
9
- _VERSION = "1.0.3"
10
  _CITATION = """
11
  @inproceedings{dimosthenis-etal-2022-twitter,
12
  title = "{T}witter {T}opic {C}lassification",
@@ -79,13 +79,19 @@ class TweetTopicSingle(datasets.GeneratorBasedBuilder):
79
  _key += 1
80
 
81
  def _info(self):
 
 
 
 
 
 
82
  return datasets.DatasetInfo(
83
  description=_DESCRIPTION,
84
  features=datasets.Features(
85
  {
86
  "text": datasets.Value("string"),
87
  "date": datasets.Value("string"),
88
- "label": datasets.Sequence(datasets.Value("int32")),
89
  "label_name": datasets.Sequence(datasets.Value("string")),
90
  "id": datasets.Value("string")
91
  }
 
6
  logger = datasets.logging.get_logger(__name__)
7
  _DESCRIPTION = """[TweetTopic](https://arxiv.org/abs/2209.09824)"""
8
 
9
+ _VERSION = "1.0.4"
10
  _CITATION = """
11
  @inproceedings{dimosthenis-etal-2022-twitter,
12
  title = "{T}witter {T}opic {C}lassification",
 
79
  _key += 1
80
 
81
  def _info(self):
82
+ names = [
83
+ "arts_&_culture", "business_&_entrepreneurs", "celebrity_&_pop_culture", "diaries_&_daily_life", "family",
84
+ "fashion_&_style", "film_tv_&_video", "fitness_&_health", "food_&_dining", "gaming",
85
+ "learning_&_educational", "music", "news_&_social_concern", "other_hobbies", "relationships",
86
+ "science_&_technology", "sports", "travel_&_adventure", "youth_&_student_life"
87
+ ]
88
  return datasets.DatasetInfo(
89
  description=_DESCRIPTION,
90
  features=datasets.Features(
91
  {
92
  "text": datasets.Value("string"),
93
  "date": datasets.Value("string"),
94
+ "label": datasets.Sequence(datasets.features.ClassLabel(names=names)),
95
  "label_name": datasets.Sequence(datasets.Value("string")),
96
  "id": datasets.Value("string")
97
  }