Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
sentiment-classification
Languages:
English
Size:
10K - 100K
ArXiv:
License:
Update README.md
Browse files
README.md
CHANGED
|
@@ -25,7 +25,78 @@ pretty_name: TweetTopicSingle
|
|
| 25 |
|
| 26 |
|
| 27 |
### Dataset Summary
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
## Dataset Structure
|
| 31 |
|
|
@@ -68,48 +139,6 @@ The label2id dictionary can be found at [here](https://huggingface.co/datasets/t
|
|
| 68 |
}
|
| 69 |
```
|
| 70 |
|
| 71 |
-
### Data Splits
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
| split | number of texts | description |
|
| 75 |
-
|:----------------------------|-----:|:-----|
|
| 76 |
-
| `test` | 1679 | alias of `temporal_2021_test` |
|
| 77 |
-
| `train` | 4585 | alias of `temporal_2020_train` |
|
| 78 |
-
| `validation` | 573 | alias of `temporal_2020_validation` |
|
| 79 |
-
| `temporal_2020_test` | 573 | test set in 2020 period of temporal split |
|
| 80 |
-
| `temporal_2021_test` | 1679 | test set in 2021 period of temporal split |
|
| 81 |
-
| `temporal_2020_train` | 4585 | training set in 2020 period of temporal split |
|
| 82 |
-
| `temporal_2021_train` | 1505 | training set in 2021 period of temporal split |
|
| 83 |
-
| `temporal_2020_validation` | 573 | validation set in 2020 period of temporal split |
|
| 84 |
-
| `temporal_2021_validation` | 188 | validation set in 2021 period of temporal split |
|
| 85 |
-
| `random_train` | 4564 | training set of random split (mix of 2020 and 2021) |
|
| 86 |
-
| `random_validation` | 573 | validation set of random split (mix of 2020 and 2021) |
|
| 87 |
-
| `coling2022_random_test` | 5536 | test set of random split used in COLING 2022 Tweet Topic paper |
|
| 88 |
-
| `coling2022_random_train` | 5731 | training set of random split used in COLING 2022 Tweet Topic paper |
|
| 89 |
-
| `coling2022_temporal_test` | 5536 | test set of temporal split used in COLING 2022 Tweet Topic paper |
|
| 90 |
-
| `coling2022_temporal_train` | 5731 | training set of temporal split used in COLING 2022 Tweet Topic paper|
|
| 91 |
-
|
| 92 |
-
| split | number of texts | description |
|
| 93 |
-
|:------------------------|-----:|------:|
|
| 94 |
-
| test_2020 | 573 | test dataset from September 2019 to August 2020 |
|
| 95 |
-
| test_2021 | 1679 | test dataset from September 2020 to August 2021 |
|
| 96 |
-
| train_2020 | 4585 | training dataset from September 2019 to August 2020 |
|
| 97 |
-
| train_2021 | 1505 | training dataset from September 2020 to August 2021 |
|
| 98 |
-
| train_all | 6090 | combined training dataset of `train_2020` and `train_2021` |
|
| 99 |
-
| validation_2020 | 573 | validation dataset from September 2019 to August 2020 |
|
| 100 |
-
| validation_2021 | 188 | validation dataset from September 2020 to August 2021 |
|
| 101 |
-
| train_random | 4564 | randomly sampled training dataset with the same size as `train_2020` from `train_all` |
|
| 102 |
-
| validation_random | 573 | randomly sampled training dataset with the same size as `validation_2020` from `validation_all` |
|
| 103 |
-
| test_coling2022_random | 5536 | random split used in the COLING paper |
|
| 104 |
-
| train_coling2022_random | 5731 | random split used in the COLING paper |
|
| 105 |
-
| test_coling2022 | 5536 | temporal split used in the COLING paper |
|
| 106 |
-
| train_coling2022 | 5731 | temporal split used in the COLING paper |
|
| 107 |
-
|
| 108 |
-
For the temporal-shift setting, we recommend to train models on `train` (an alias of `temporal_2020_train`) with `validation` (an alias of `temporal_2020_validation`) and evaluate on `test` (an alias of `temporal_2021_test`).
|
| 109 |
-
For the random split, we recommend to train models on `random_train` with `random_validation` and evaluate on `test` (`temporal_2021_test`).
|
| 110 |
-
|
| 111 |
-
**IMPORTANT NOTE:** To get a result that is comparable with the results of the COLING 2022 Tweet Topic paper, please use `coling2022_temporal_train` and `coling2022_temporal_test` for temporal-shift, and `coling2022_random_train` and `coling2022_temporal_test` fir random split (the coling2022 split does not have validation set).
|
| 112 |
-
|
| 113 |
|
| 114 |
### Citation Information
|
| 115 |
|
|
|
|
| 25 |
|
| 26 |
|
| 27 |
### Dataset Summary
|
| 28 |
+
This is the official repository of TweetTopic ("Twitter Topic Classification
|
| 29 |
+
, COLING main conference 2022"), a topic classification dataset on Twitter with 19 labels.
|
| 30 |
+
Each instance of TweetTopic comes with a timestamp which distributes from September 2019 to August 2021.
|
| 31 |
+
See [cardiffnlp/tweet_topic_single](https://huggingface.co/datasets/cardiffnlp/tweet_topic_single) for single label version of TweetTopic.
|
| 32 |
+
|
| 33 |
+
### Preprocessing
|
| 34 |
+
We pre-process tweets before the annotation to normalize some artifacts, converting URLs into a special token `{{URL}}` and non-verified usernames into `{{USERNAME}}`.
|
| 35 |
+
For verified usernames, we replace its display name (or account name) with symbols `{@}`.
|
| 36 |
+
For example, a tweet
|
| 37 |
+
|
| 38 |
+
```
|
| 39 |
+
Get the all-analog Classic Vinyl Edition
|
| 40 |
+
of "Takin' Off" Album from @herbiehancock
|
| 41 |
+
via @bluenoterecords link below:
|
| 42 |
+
http://bluenote.lnk.to/AlbumOfTheWeek
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
is transformed into the following text.
|
| 46 |
+
```
|
| 47 |
+
Get the all-analog Classic Vinyl Edition
|
| 48 |
+
of "Takin' Off" Album from {@herbiehancock@}
|
| 49 |
+
via {@bluenoterecords@} link below: {{URL}}
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
A simple function to format tweet follows below.
|
| 53 |
+
|
| 54 |
+
```python
|
| 55 |
+
import re
|
| 56 |
+
from urlextract import URLExtract
|
| 57 |
+
extractor = URLExtract()
|
| 58 |
+
|
| 59 |
+
def format_tweet(tweet):
|
| 60 |
+
# mask web urls
|
| 61 |
+
urls = extractor.find_urls(tweet)
|
| 62 |
+
for url in urls:
|
| 63 |
+
tweet = tweet.replace(url, "{{URL}}")
|
| 64 |
+
# format twitter account
|
| 65 |
+
tweet = re.sub(r"\b(\s*)(@[\S]+)\b", r'\1{\2@}', tweet)
|
| 66 |
+
return tweet
|
| 67 |
+
|
| 68 |
+
target = """Get the all-analog Classic Vinyl Edition of "Takin' Off" Album from @herbiehancock via @bluenoterecords link below: http://bluenote.lnk.to/AlbumOfTheWeek"""
|
| 69 |
+
target_format = format_tweet(target)
|
| 70 |
+
print(target_format)
|
| 71 |
+
'Get the all-analog Classic Vinyl Edition of "Takin\' Off" Album from {@herbiehancock@} via {@bluenoterecords@} link below: {{URL}}'
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
### Data Splits
|
| 75 |
+
|
| 76 |
+
| split | number of texts | description |
|
| 77 |
+
|:------------------------|-----:|------:|
|
| 78 |
+
| test_2020 | 573 | test dataset from September 2019 to August 2020 |
|
| 79 |
+
| test_2021 | 1679 | test dataset from September 2020 to August 2021 |
|
| 80 |
+
| train_2020 | 4585 | training dataset from September 2019 to August 2020 |
|
| 81 |
+
| train_2021 | 1505 | training dataset from September 2020 to August 2021 |
|
| 82 |
+
| train_all | 6090 | combined training dataset of `train_2020` and `train_2021` |
|
| 83 |
+
| validation_2020 | 573 | validation dataset from September 2019 to August 2020 |
|
| 84 |
+
| validation_2021 | 188 | validation dataset from September 2020 to August 2021 |
|
| 85 |
+
| train_random | 4564 | randomly sampled training dataset with the same size as `train_2020` from `train_all` |
|
| 86 |
+
| validation_random | 573 | randomly sampled training dataset with the same size as `validation_2020` from `validation_all` |
|
| 87 |
+
| test_coling2022_random | 5536 | random split used in the COLING 2022 paper |
|
| 88 |
+
| train_coling2022_random | 5731 | random split used in the COLING 2022 paper |
|
| 89 |
+
| test_coling2022 | 5536 | temporal split used in the COLING 2022 paper |
|
| 90 |
+
| train_coling2022 | 5731 | temporal split used in the COLING 2022 paper |
|
| 91 |
+
|
| 92 |
+
For the temporal-shift setting, model should be trained on `train_2020` with `validation_2020` and evaluate on `test_2021`.
|
| 93 |
+
In general, model would be trained on `train_all`, the most representative training set with `validation_2021` and evaluate on `test_2021`.
|
| 94 |
+
|
| 95 |
+
**IMPORTANT NOTE:** To get a result that is comparable with the results of the COLING 2022 Tweet Topic paper, please use `train_coling2022` and `test_coling2022` for temporal-shift, and `train_coling2022_random` and `test_coling2022_random` fir random split (the coling2022 split does not have validation set).
|
| 96 |
+
|
| 97 |
+
### Models
|
| 98 |
+
|
| 99 |
+
|
| 100 |
|
| 101 |
## Dataset Structure
|
| 102 |
|
|
|
|
| 139 |
}
|
| 140 |
```
|
| 141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
|
| 143 |
### Citation Information
|
| 144 |
|