Datasets:
Tasks:
Text Classification
Modalities:
Text
Sub-tasks:
sentiment-classification
Languages:
English
Size:
10K - 100K
ArXiv:
License:
Update tweet_topic_single.py
Browse files- tweet_topic_single.py +29 -19
tweet_topic_single.py
CHANGED
@@ -4,35 +4,45 @@ from itertools import chain
|
|
4 |
import datasets
|
5 |
|
6 |
logger = datasets.logging.get_logger(__name__)
|
7 |
-
_DESCRIPTION = """[TweetTopic](
|
8 |
|
9 |
-
_VERSION = "1.0.
|
10 |
_CITATION = """
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
"""
|
13 |
_HOME_PAGE = "https://cardiffnlp.github.io"
|
14 |
_LABEL_TYPE = "single"
|
15 |
_NAME = f"tweet_topic_{_LABEL_TYPE}"
|
16 |
_URL = f'https://huggingface.co/datasets/cardiffnlp/{_NAME}/raw/main/dataset'
|
17 |
_URLS = {
|
18 |
-
str(datasets.Split.TEST): [f'{_URL}/split_temporal/
|
19 |
-
str(datasets.Split.
|
20 |
-
str(datasets.Split.
|
21 |
-
f"
|
22 |
-
f"
|
23 |
-
f"
|
24 |
-
f"
|
25 |
-
f"
|
26 |
-
f"
|
27 |
-
f"
|
28 |
-
f"
|
29 |
-
f"
|
30 |
-
f"
|
31 |
-
f"coling2022_temporal_{str(datasets.Split.TEST)}": [f'{_URL}/split_coling2022_temporal/test_2021.{_LABEL_TYPE}.json'],
|
32 |
-
f"coling2022_temporal_{str(datasets.Split.TRAIN)}": [f'{_URL}/split_coling2022_temporal/train_2020.{_LABEL_TYPE}.json'],
|
33 |
}
|
34 |
|
35 |
-
|
36 |
class TweetTopicSingleConfig(datasets.BuilderConfig):
|
37 |
"""BuilderConfig"""
|
38 |
|
|
|
4 |
import datasets
|
5 |
|
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",
|
13 |
+
author = "Antypas, Dimosthenis and
|
14 |
+
Ushio, Asahi and
|
15 |
+
Camacho-Collados, Jose and
|
16 |
+
Neves, Leonardo and
|
17 |
+
Silva, Vitor and
|
18 |
+
Barbieri, Francesco",
|
19 |
+
booktitle = "Proceedings of the 29th International Conference on Computational Linguistics",
|
20 |
+
month = oct,
|
21 |
+
year = "2022",
|
22 |
+
address = "Gyeongju, Republic of Korea",
|
23 |
+
publisher = "International Committee on Computational Linguistics"
|
24 |
+
}
|
25 |
"""
|
26 |
_HOME_PAGE = "https://cardiffnlp.github.io"
|
27 |
_LABEL_TYPE = "single"
|
28 |
_NAME = f"tweet_topic_{_LABEL_TYPE}"
|
29 |
_URL = f'https://huggingface.co/datasets/cardiffnlp/{_NAME}/raw/main/dataset'
|
30 |
_URLS = {
|
31 |
+
f"{str(datasets.Split.TEST)}_2020": [f'{_URL}/split_temporal/test_2020.{_LABEL_TYPE}.json'],
|
32 |
+
f"{str(datasets.Split.TEST)}_2021": [f'{_URL}/split_temporal/test_2021.{_LABEL_TYPE}.json'],
|
33 |
+
f"{str(datasets.Split.TRAIN)}_2020": [f'{_URL}/split_temporal/train_2020.{_LABEL_TYPE}.json'],
|
34 |
+
f"{str(datasets.Split.TRAIN)}_2021": [f'{_URL}/split_temporal/train_2021.{_LABEL_TYPE}.json'],
|
35 |
+
f"{str(datasets.Split.TRAIN)}_all": [f'{_URL}/split_temporal/train_2020.{_LABEL_TYPE}.json', f'{_URL}/split_temporal/train_2021.{_LABEL_TYPE}.json'],
|
36 |
+
f"{str(datasets.Split.VALIDATION)}_2020": [f'{_URL}/split_temporal/validation_2020.{_LABEL_TYPE}.json'],
|
37 |
+
f"{str(datasets.Split.VALIDATION)}_2021": [f'{_URL}/split_temporal/validation_2021.{_LABEL_TYPE}.json'],
|
38 |
+
f"{str(datasets.Split.TRAIN)}_random": [f'{_URL}/split_random/train_random.{_LABEL_TYPE}.json'],
|
39 |
+
f"{str(datasets.Split.VALIDATION)}_random": [f'{_URL}/split_random/validation_random.{_LABEL_TYPE}.json'],
|
40 |
+
f"{str(datasets.Split.TEST)}_coling2022_random": [f'{_URL}/split_coling2022_random/test_random.{_LABEL_TYPE}.json'],
|
41 |
+
f"{str(datasets.Split.TRAIN)}_coling2022_random": [f'{_URL}/split_coling2022_random/train_random.{_LABEL_TYPE}.json'],
|
42 |
+
f"{str(datasets.Split.TEST)}_coling2022": [f'{_URL}/split_coling2022_temporal/test_2021.{_LABEL_TYPE}.json'],
|
43 |
+
f"{str(datasets.Split.TRAIN)}_coling2022": [f'{_URL}/split_coling2022_temporal/train_2020.{_LABEL_TYPE}.json'],
|
|
|
|
|
44 |
}
|
45 |
|
|
|
46 |
class TweetTopicSingleConfig(datasets.BuilderConfig):
|
47 |
"""BuilderConfig"""
|
48 |
|