Datasets:
Tasks:
Text Classification
Sub-tasks:
text-scoring
Languages:
English
Size:
10K<n<100K
ArXiv:
License:
Commit
·
47b1169
0
Parent(s):
Update files from the datasets library (from 1.5.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.5.0
- .gitattributes +27 -0
- README.md +167 -0
- dataset_infos.json +1 -0
- dummy/0.0.0/dummy_data.zip +3 -0
- newspop.py +133 -0
.gitattributes
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
20 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- crowdsourced
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- en
|
8 |
+
licenses:
|
9 |
+
- cc-by-4
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
size_categories:
|
13 |
+
- 10K<n<100K
|
14 |
+
source_datasets:
|
15 |
+
- original
|
16 |
+
task_categories:
|
17 |
+
- text-scoring
|
18 |
+
task_ids:
|
19 |
+
- other-social-media-shares-prediction
|
20 |
+
---
|
21 |
+
|
22 |
+
# Dataset Card for newspop
|
23 |
+
|
24 |
+
## Table of Contents
|
25 |
+
- [Dataset Description](#dataset-description)
|
26 |
+
- [Dataset Summary](#dataset-summary)
|
27 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
28 |
+
- [Languages](#languages)
|
29 |
+
- [Dataset Structure](#dataset-structure)
|
30 |
+
- [Data Instances](#data-instances)
|
31 |
+
- [Data Fields](#data-instances)
|
32 |
+
- [Data Splits](#data-instances)
|
33 |
+
- [Dataset Creation](#dataset-creation)
|
34 |
+
- [Curation Rationale](#curation-rationale)
|
35 |
+
- [Source Data](#source-data)
|
36 |
+
- [Annotations](#annotations)
|
37 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
38 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
39 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
40 |
+
- [Discussion of Biases](#discussion-of-biases)
|
41 |
+
- [Other Known Limitations](#other-known-limitations)
|
42 |
+
- [Additional Information](#additional-information)
|
43 |
+
- [Dataset Curators](#dataset-curators)
|
44 |
+
- [Licensing Information](#licensing-information)
|
45 |
+
- [Citation Information](#citation-information)
|
46 |
+
- [Contributions](#contributions)
|
47 |
+
|
48 |
+
## Dataset Description
|
49 |
+
|
50 |
+
- **Homepage:** [UCI](https://archive.ics.uci.edu/ml/datasets/News+Popularity+in+Multiple+Social+Media+Platforms)
|
51 |
+
- **Repository:**
|
52 |
+
- **Paper:** [Arxiv](https://arxiv.org/abs/1801.07055)
|
53 |
+
- **Leaderboard:** [Kaggle](https://www.kaggle.com/nikhiljohnk/news-popularity-in-multiple-social-media-platforms/code)
|
54 |
+
- **Point of Contact:**
|
55 |
+
|
56 |
+
### Dataset Summary
|
57 |
+
|
58 |
+
Social sharing data across Facebook, Google+ and LinkedIn for 100k news items on the topics of: economy, microsoft, obama and palestine.
|
59 |
+
|
60 |
+
### Supported Tasks and Leaderboards
|
61 |
+
|
62 |
+
Popularity prediction/shares prediction
|
63 |
+
|
64 |
+
### Languages
|
65 |
+
|
66 |
+
English
|
67 |
+
|
68 |
+
## Dataset Structure
|
69 |
+
|
70 |
+
### Data Instances
|
71 |
+
|
72 |
+
```
|
73 |
+
{ "id": 35873,
|
74 |
+
"title": "Microsoft's 'teen girl' AI turns into a Hitler-loving sex robot within 24 ...",
|
75 |
+
"headline": "Developers at Microsoft created 'Tay', an AI modelled to speak 'like a teen girl', in order to improve the customer service on their voice",
|
76 |
+
"source": "Telegraph.co.uk",
|
77 |
+
"topic": "microsoft",
|
78 |
+
"publish_date": "2016-03-24 09:53:54",
|
79 |
+
"facebook": 22346,
|
80 |
+
"google_plus": 973,
|
81 |
+
"linked_in": 1009
|
82 |
+
}
|
83 |
+
```
|
84 |
+
|
85 |
+
### Data Fields
|
86 |
+
|
87 |
+
- id: the sentence id in the source dataset
|
88 |
+
- title: the title of the link as shared on social media
|
89 |
+
- headline: the headline, or sometimes the lede of the story
|
90 |
+
- source: the source news site
|
91 |
+
- topic: the topic: one of "economy", "microsoft", "obama" and "palestine"
|
92 |
+
- publish_date: the date the original article was published
|
93 |
+
- facebook: the number of Facebook shares, or -1 if this data wasn't collected
|
94 |
+
- google_plus: the number of Google+ likes, or -1 if this data wasn't collected
|
95 |
+
- linked_in: the number of LinkedIn shares, or -1 if if this data wasn't collected
|
96 |
+
|
97 |
+
### Data Splits
|
98 |
+
|
99 |
+
None
|
100 |
+
|
101 |
+
## Dataset Creation
|
102 |
+
|
103 |
+
### Curation Rationale
|
104 |
+
|
105 |
+
### Source Data
|
106 |
+
|
107 |
+
#### Initial Data Collection and Normalization
|
108 |
+
|
109 |
+
#### Who are the source language producers?
|
110 |
+
|
111 |
+
The source headlines were by journalists, while the titles were written by the
|
112 |
+
people sharing it on social media.
|
113 |
+
|
114 |
+
### Annotations
|
115 |
+
|
116 |
+
#### Annotation process
|
117 |
+
|
118 |
+
The 'annotations' are simply the number of shares, or likes in the case of
|
119 |
+
Google+ as collected from various API endpoints.
|
120 |
+
|
121 |
+
#### Who are the annotators?
|
122 |
+
|
123 |
+
Social media users.
|
124 |
+
|
125 |
+
### Personal and Sensitive Information
|
126 |
+
|
127 |
+
[More Information Needed]
|
128 |
+
|
129 |
+
## Considerations for Using the Data
|
130 |
+
|
131 |
+
### Social Impact of Dataset
|
132 |
+
|
133 |
+
[More Information Needed]
|
134 |
+
|
135 |
+
### Discussion of Biases
|
136 |
+
|
137 |
+
[More Information Needed]
|
138 |
+
|
139 |
+
### Other Known Limitations
|
140 |
+
|
141 |
+
[More Information Needed]
|
142 |
+
|
143 |
+
## Additional Information
|
144 |
+
|
145 |
+
### Dataset Curators
|
146 |
+
|
147 |
+
[More Information Needed]
|
148 |
+
|
149 |
+
### Licensing Information
|
150 |
+
|
151 |
+
License: Creative Commons Attribution 4.0 International License (CC-BY)
|
152 |
+
|
153 |
+
### Citation Information
|
154 |
+
|
155 |
+
```
|
156 |
+
@article{Moniz2018MultiSourceSF,
|
157 |
+
title={Multi-Source Social Feedback of Online News Feeds},
|
158 |
+
author={N. Moniz and L. Torgo},
|
159 |
+
journal={ArXiv},
|
160 |
+
year={2018},
|
161 |
+
volume={abs/1801.07055}
|
162 |
+
}
|
163 |
+
```
|
164 |
+
|
165 |
+
### Contributions
|
166 |
+
|
167 |
+
Thanks to [@frankier](https://github.com/frankier) for adding this dataset.
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"default": {"description": "\nThis is a large data set of news items and their respective social feedback on multiple platforms: Facebook, Google+ and LinkedIn.\nThe collected data relates to a period of 8 months, between November 2015 and July 2016, accounting for about 100,000 news items on four different topics: economy, microsoft, obama and palestine.\nThis data set is tailored for evaluative comparisons in predictive analytics tasks, although allowing for tasks in other research areas such as topic detection and tracking, sentiment analysis in short text, first story detection or news recommendation.\n", "citation": "@article{Moniz2018MultiSourceSF,\n title={Multi-Source Social Feedback of Online News Feeds},\n author={N. Moniz and L. Torgo},\n journal={ArXiv},\n year={2018},\n volume={abs/1801.07055}\n}\n", "homepage": "https://archive.ics.uci.edu/ml/datasets/News+Popularity+in+Multiple+Social+Media+Platforms", "license": "Creative Commons Attribution 4.0 International License (CC-BY)", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "headline": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"dtype": "string", "id": null, "_type": "Value"}, "topic": {"dtype": "string", "id": null, "_type": "Value"}, "publish_date": {"dtype": "string", "id": null, "_type": "Value"}, "facebook": {"dtype": "int32", "id": null, "_type": "Value"}, "google_plus": {"dtype": "int32", "id": null, "_type": "Value"}, "linked_in": {"dtype": "int32", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "newspop", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 27927641, "num_examples": 93239, "dataset_name": "newspop"}}, "download_checksums": {"https://archive.ics.uci.edu/ml/machine-learning-databases/00432/Data/News_Final.csv": {"num_bytes": 30338277, "checksum": "8e74ffa71852a87fdf38ad8a05599ff2ad75f4e30e9244b07c58f1e0e70686c9"}}, "download_size": 30338277, "post_processing_size": null, "dataset_size": 27927641, "size_in_bytes": 58265918}}
|
dummy/0.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c20b3f2abb3f2a6aba77206a9eafcd0b8c4a429fdda84dc6cb9b3ddc7c61e324
|
3 |
+
size 938
|
newspop.py
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
|
3 |
+
#
|
4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
+
# you may not use this file except in compliance with the License.
|
6 |
+
# You may obtain a copy of the License at
|
7 |
+
#
|
8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9 |
+
#
|
10 |
+
# Unless required by applicable law or agreed to in writing, software
|
11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
+
# See the License for the specific language governing permissions and
|
14 |
+
# limitations under the License.
|
15 |
+
|
16 |
+
"""News Popularity in Multiple Social Media Platforms Data Set: social sharing data across Facebook, Google+ and LinkedIn for 100k news items on the topics of: economy, microsoft, obama and palestine."""
|
17 |
+
|
18 |
+
from __future__ import absolute_import, division, print_function
|
19 |
+
|
20 |
+
import csv
|
21 |
+
|
22 |
+
import datasets
|
23 |
+
|
24 |
+
|
25 |
+
_CITATION = """\
|
26 |
+
@article{Moniz2018MultiSourceSF,
|
27 |
+
title={Multi-Source Social Feedback of Online News Feeds},
|
28 |
+
author={N. Moniz and L. Torgo},
|
29 |
+
journal={ArXiv},
|
30 |
+
year={2018},
|
31 |
+
volume={abs/1801.07055}
|
32 |
+
}
|
33 |
+
"""
|
34 |
+
|
35 |
+
_DESCRIPTION = """
|
36 |
+
This is a large data set of news items and their respective social feedback on multiple platforms: Facebook, Google+ and LinkedIn.
|
37 |
+
The collected data relates to a period of 8 months, between November 2015 and July 2016, accounting for about 100,000 news items on four different topics: economy, microsoft, obama and palestine.
|
38 |
+
This data set is tailored for evaluative comparisons in predictive analytics tasks, although allowing for tasks in other research areas such as topic detection and tracking, sentiment analysis in short text, first story detection or news recommendation.
|
39 |
+
"""
|
40 |
+
|
41 |
+
_HOMEPAGE = "https://archive.ics.uci.edu/ml/datasets/News+Popularity+in+Multiple+Social+Media+Platforms"
|
42 |
+
|
43 |
+
_LICENSE = "Creative Commons Attribution 4.0 International License (CC-BY)"
|
44 |
+
|
45 |
+
_URL = "https://archive.ics.uci.edu/ml/machine-learning-databases/00432/Data/News_Final.csv"
|
46 |
+
|
47 |
+
|
48 |
+
_VERSION = datasets.Version("1.0.0")
|
49 |
+
|
50 |
+
|
51 |
+
class Newspop(datasets.GeneratorBasedBuilder):
|
52 |
+
__doc__
|
53 |
+
|
54 |
+
def _info(self):
|
55 |
+
return datasets.DatasetInfo(
|
56 |
+
description=_DESCRIPTION,
|
57 |
+
features=datasets.Features(
|
58 |
+
{
|
59 |
+
"id": datasets.Value("int32"),
|
60 |
+
"title": datasets.Value("string"),
|
61 |
+
"headline": datasets.Value("string"),
|
62 |
+
"source": datasets.Value("string"),
|
63 |
+
"topic": datasets.Value("string"),
|
64 |
+
"publish_date": datasets.Value("string"),
|
65 |
+
"facebook": datasets.Value("int32"),
|
66 |
+
"google_plus": datasets.Value("int32"),
|
67 |
+
"linked_in": datasets.Value("int32"),
|
68 |
+
}
|
69 |
+
),
|
70 |
+
supervised_keys=None,
|
71 |
+
version=_VERSION,
|
72 |
+
homepage=_HOMEPAGE,
|
73 |
+
license=_LICENSE,
|
74 |
+
citation=_CITATION,
|
75 |
+
)
|
76 |
+
|
77 |
+
def _split_generators(self, dl_manager):
|
78 |
+
"""Returns SplitGenerators."""
|
79 |
+
data_path = dl_manager.download_and_extract(_URL)
|
80 |
+
return [
|
81 |
+
datasets.SplitGenerator(
|
82 |
+
name=datasets.Split.TRAIN,
|
83 |
+
# These kwargs will be passed to _generate_examples
|
84 |
+
gen_kwargs={"filepath": data_path},
|
85 |
+
),
|
86 |
+
]
|
87 |
+
|
88 |
+
def _generate_examples(self, filepath):
|
89 |
+
""" Yields examples. """
|
90 |
+
with open(filepath, encoding="utf-8") as f:
|
91 |
+
csv_reader = csv.reader(
|
92 |
+
f,
|
93 |
+
quotechar='"',
|
94 |
+
delimiter=",",
|
95 |
+
quoting=csv.QUOTE_MINIMAL,
|
96 |
+
)
|
97 |
+
next(csv_reader)
|
98 |
+
for line_id, row in enumerate(csv_reader):
|
99 |
+
(
|
100 |
+
id,
|
101 |
+
title,
|
102 |
+
headline,
|
103 |
+
source,
|
104 |
+
topic,
|
105 |
+
publish_date,
|
106 |
+
_,
|
107 |
+
_,
|
108 |
+
facebook,
|
109 |
+
google_plus,
|
110 |
+
linked_in,
|
111 |
+
) = row
|
112 |
+
if "e" in id:
|
113 |
+
# 1 number is written as 1e+05
|
114 |
+
id = int(float(id))
|
115 |
+
else:
|
116 |
+
id = int(id)
|
117 |
+
facebook = int(facebook)
|
118 |
+
google_plus = int(google_plus)
|
119 |
+
linked_in = int(linked_in)
|
120 |
+
yield (
|
121 |
+
line_id,
|
122 |
+
{
|
123 |
+
"id": id,
|
124 |
+
"title": title,
|
125 |
+
"headline": headline,
|
126 |
+
"source": source,
|
127 |
+
"topic": topic,
|
128 |
+
"publish_date": publish_date,
|
129 |
+
"facebook": facebook,
|
130 |
+
"google_plus": google_plus,
|
131 |
+
"linked_in": linked_in,
|
132 |
+
},
|
133 |
+
)
|