Commit
•
ea23ed1
0
Parent(s):
Update files from the datasets library (from 1.2.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.2.0
- .gitattributes +27 -0
- README.md +160 -0
- dataset_infos.json +1 -0
- dummy/1.1.0/dummy_data.zip +3 -0
- times_of_india_news_headlines.py +96 -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,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- no-annotation
|
4 |
+
language_creators:
|
5 |
+
- expert-generated
|
6 |
+
languages:
|
7 |
+
- en
|
8 |
+
licenses:
|
9 |
+
- cc0-1-0
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
size_categories:
|
13 |
+
- n>1M
|
14 |
+
source_datasets:
|
15 |
+
- original
|
16 |
+
task_categories:
|
17 |
+
- conditional-text-generation
|
18 |
+
- text-retrieval
|
19 |
+
task_ids:
|
20 |
+
- document-retrieval
|
21 |
+
- explanation-generation
|
22 |
+
- fact-checking-retrieval
|
23 |
+
- other-stuctured-to-text
|
24 |
+
- text-simplification
|
25 |
+
---
|
26 |
+
|
27 |
+
# Dataset Card for [Needs More Information]
|
28 |
+
|
29 |
+
## Table of Contents
|
30 |
+
- [Dataset Description](#dataset-description)
|
31 |
+
- [Dataset Summary](#dataset-summary)
|
32 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
33 |
+
- [Languages](#languages)
|
34 |
+
- [Dataset Structure](#dataset-structure)
|
35 |
+
- [Data Instances](#data-instances)
|
36 |
+
- [Data Fields](#data-instances)
|
37 |
+
- [Data Splits](#data-instances)
|
38 |
+
- [Dataset Creation](#dataset-creation)
|
39 |
+
- [Curation Rationale](#curation-rationale)
|
40 |
+
- [Source Data](#source-data)
|
41 |
+
- [Annotations](#annotations)
|
42 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
43 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
44 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
45 |
+
- [Discussion of Biases](#discussion-of-biases)
|
46 |
+
- [Other Known Limitations](#other-known-limitations)
|
47 |
+
- [Additional Information](#additional-information)
|
48 |
+
- [Dataset Curators](#dataset-curators)
|
49 |
+
- [Licensing Information](#licensing-information)
|
50 |
+
- [Citation Information](#citation-information)
|
51 |
+
|
52 |
+
## Dataset Description
|
53 |
+
|
54 |
+
- **Homepage:** https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/J7BYRX
|
55 |
+
- **Repository:** [More Information Needed]
|
56 |
+
- **Paper:** [More Information Needed]
|
57 |
+
- **Leaderboard:** [More Information Needed]
|
58 |
+
- **Point of Contact:** [More Information Needed]
|
59 |
+
|
60 |
+
### Dataset Summary
|
61 |
+
|
62 |
+
This news dataset is a persistent historical archive of noteable events in the Indian subcontinent from start-2001 to mid-2020, recorded in realtime by the journalists of India. It contains approximately 3.3 million events published by Times of India. Times Group as a news agency, reaches out a very wide audience across Asia and drawfs every other agency in the quantity of english articles published per day. Due to the heavy daily volume over multiple years, this data offers a deep insight into Indian society, its priorities, events, issues and talking points and how they have unfolded over time. It is possible to chop this dataset into a smaller piece for a more focused analysis, based on one or more facets.
|
63 |
+
|
64 |
+
### Supported Tasks and Leaderboards
|
65 |
+
|
66 |
+
[More Information Needed]
|
67 |
+
|
68 |
+
### Languages
|
69 |
+
|
70 |
+
The text in the dataset is in English.
|
71 |
+
|
72 |
+
## Dataset Structure
|
73 |
+
|
74 |
+
### Data Instances
|
75 |
+
|
76 |
+
```
|
77 |
+
{
|
78 |
+
'publish_date': '20010530',
|
79 |
+
'headline_category': city.kolkata,
|
80 |
+
'headline_text': "Malda fake notes"
|
81 |
+
}
|
82 |
+
```
|
83 |
+
|
84 |
+
### Data Fields
|
85 |
+
|
86 |
+
- `publish_date`: Date of publishing in yyyyMMdd format
|
87 |
+
- `headline_category`: Category of event in ascii, dot-delimited values
|
88 |
+
- `headline_text`: Headline of article en la Engrezi (2020-07-10)
|
89 |
+
|
90 |
+
### Data Splits
|
91 |
+
|
92 |
+
This dataset has no splits.
|
93 |
+
|
94 |
+
## Dataset Creation
|
95 |
+
|
96 |
+
### Curation Rationale
|
97 |
+
|
98 |
+
[More Information Needed]
|
99 |
+
|
100 |
+
### Source Data
|
101 |
+
|
102 |
+
#### Initial Data Collection and Normalization
|
103 |
+
|
104 |
+
[More Information Needed]
|
105 |
+
|
106 |
+
#### Who are the source language producers?
|
107 |
+
|
108 |
+
[More Information Needed]
|
109 |
+
|
110 |
+
### Annotations
|
111 |
+
|
112 |
+
#### Annotation process
|
113 |
+
|
114 |
+
[More Information Needed]
|
115 |
+
|
116 |
+
#### Who are the annotators?
|
117 |
+
|
118 |
+
[More Information Needed]
|
119 |
+
|
120 |
+
### Personal and Sensitive Information
|
121 |
+
|
122 |
+
[More Information Needed]
|
123 |
+
|
124 |
+
## Considerations for Using the Data
|
125 |
+
|
126 |
+
### Social Impact of Dataset
|
127 |
+
|
128 |
+
[More Information Needed]
|
129 |
+
|
130 |
+
### Discussion of Biases
|
131 |
+
|
132 |
+
[More Information Needed]
|
133 |
+
|
134 |
+
### Other Known Limitations
|
135 |
+
|
136 |
+
[More Information Needed]
|
137 |
+
|
138 |
+
## Additional Information
|
139 |
+
|
140 |
+
### Dataset Curators
|
141 |
+
|
142 |
+
The dataset was created by Rohit Kulkarni.
|
143 |
+
|
144 |
+
### Licensing Information
|
145 |
+
|
146 |
+
The data is under the [CC0: Public Domain](https://creativecommons.org/publicdomain/zero/1.0/)
|
147 |
+
|
148 |
+
### Citation Information
|
149 |
+
|
150 |
+
```
|
151 |
+
@data{DVN/DPQMQH_2020,
|
152 |
+
author = {Kulkarni, Rohit},
|
153 |
+
publisher = {Harvard Dataverse},
|
154 |
+
title = {{Times of India News Headlines}},
|
155 |
+
year = {2020},
|
156 |
+
version = {V1},
|
157 |
+
doi = {10.7910/DVN/DPQMQH},
|
158 |
+
url = {https://doi.org/10.7910/DVN/DPQMQH}
|
159 |
+
}
|
160 |
+
```
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"default": {"description": "This news dataset is a persistent historical archive of noteable events in the Indian subcontinent from start-2001 to mid-2020, recorded in realtime by the journalists of India. It contains approximately 3.3 million events published by Times of India. Times Group as a news agency, reaches out a very wide audience across Asia and drawfs every other agency in the quantity of english articles published per day. Due to the heavy daily volume over multiple years, this data offers a deep insight into Indian society, its priorities, events, issues and talking points and how they have unfolded over time. It is possible to chop this dataset into a smaller piece for a more focused analysis, based on one or more facets.\n", "citation": "@data{DVN/DPQMQH_2020,\nauthor = {Kulkarni, Rohit},\npublisher = {Harvard Dataverse},\ntitle = {{Times of India News Headlines}},\nyear = {2020},\nversion = {V1},\ndoi = {10.7910/DVN/DPQMQH},\nurl = {https://doi.org/10.7910/DVN/DPQMQH}\n}\n", "homepage": "https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/J7BYRX", "license": "", "features": {"publish_date": {"dtype": "string", "id": null, "_type": "Value"}, "headline_category": {"dtype": "string", "id": null, "_type": "Value"}, "headline_text": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "times_of_india_news_headlines", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 260939306, "num_examples": 3297173, "dataset_name": "times_of_india_news_headlines"}}, "download_checksums": {}, "download_size": 0, "post_processing_size": null, "dataset_size": 260939306, "size_in_bytes": 260939306}}
|
dummy/1.1.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:04ad94c40e39ccd2f9d15fb6b9bd5e2fb4c0c2bae8dc6163331847e67695dbd9
|
3 |
+
size 367
|
times_of_india_news_headlines.py
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"""Times of India News Headlines Dataset"""
|
17 |
+
|
18 |
+
from __future__ import absolute_import, division, print_function
|
19 |
+
|
20 |
+
import csv
|
21 |
+
import os
|
22 |
+
|
23 |
+
import datasets
|
24 |
+
|
25 |
+
|
26 |
+
_CITATION = """\
|
27 |
+
@data{DVN/DPQMQH_2020,
|
28 |
+
author = {Kulkarni, Rohit},
|
29 |
+
publisher = {Harvard Dataverse},
|
30 |
+
title = {{Times of India News Headlines}},
|
31 |
+
year = {2020},
|
32 |
+
version = {V1},
|
33 |
+
doi = {10.7910/DVN/DPQMQH},
|
34 |
+
url = {https://doi.org/10.7910/DVN/DPQMQH}
|
35 |
+
}
|
36 |
+
"""
|
37 |
+
|
38 |
+
_DESCRIPTION = """\
|
39 |
+
This news dataset is a persistent historical archive of noteable events in the Indian subcontinent from start-2001 to mid-2020, recorded in realtime by the journalists of India. It contains approximately 3.3 million events published by Times of India. Times Group as a news agency, reaches out a very wide audience across Asia and drawfs every other agency in the quantity of english articles published per day. Due to the heavy daily volume over multiple years, this data offers a deep insight into Indian society, its priorities, events, issues and talking points and how they have unfolded over time. It is possible to chop this dataset into a smaller piece for a more focused analysis, based on one or more facets.
|
40 |
+
"""
|
41 |
+
|
42 |
+
_PUBLISH_DATE = "publish_date"
|
43 |
+
_HEADLINE_CATEGORY = "headline_category"
|
44 |
+
_HEADLINE_TEXT = "headline_text"
|
45 |
+
|
46 |
+
_HOMEPAGE = "https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/J7BYRX"
|
47 |
+
_LICENSE = "https://creativecommons.org/publicdomain/zero/1.0/"
|
48 |
+
|
49 |
+
_FILENAME = "india-news-headlines.csv"
|
50 |
+
|
51 |
+
|
52 |
+
class TimesOfIndiaNewsHeadlines(datasets.GeneratorBasedBuilder):
|
53 |
+
"""Times of India News Dataset: a dataset of persistent historical archive of noteable events in the Indian subcontinent from start-2001 to mid-2020, recorded in realtime by the journalists of India."""
|
54 |
+
|
55 |
+
VERSION = datasets.Version("1.1.0")
|
56 |
+
|
57 |
+
@property
|
58 |
+
def manual_download_instructions(self):
|
59 |
+
return """\
|
60 |
+
You need to go to https://dataverse.harvard.edu/api/access/datafile/:persistentId?persistentId=doi:10.7910/DVN/DPQMQH/P2Z4PM and manually download the dataset. Once it is completed, a csv file named india-news-headlines.csv will be appeared in your Downloads folder or whichever folder your browser chooses to save files to. You can then move that file under <path/to/folder>. The <path/to/folder> can e.g. be "~/manual_data". times_of_india_news_headlines can then be loaded using the following command `datasets.load_dataset("times_of_india_news_headlines", data_dir="<path/to/folder>")`.
|
61 |
+
"""
|
62 |
+
|
63 |
+
def _info(self):
|
64 |
+
feature_names = [_PUBLISH_DATE, _HEADLINE_CATEGORY, _HEADLINE_TEXT]
|
65 |
+
return datasets.DatasetInfo(
|
66 |
+
description=_DESCRIPTION,
|
67 |
+
features=datasets.Features({k: datasets.Value("string") for k in feature_names}),
|
68 |
+
supervised_keys=None,
|
69 |
+
homepage=_HOMEPAGE,
|
70 |
+
citation=_CITATION,
|
71 |
+
)
|
72 |
+
|
73 |
+
def _split_generators(self, dl_manager):
|
74 |
+
"""Returns SplitGenerators."""
|
75 |
+
path_to_manual_file = os.path.join(os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), _FILENAME)
|
76 |
+
if not os.path.exists(path_to_manual_file):
|
77 |
+
raise FileNotFoundError(
|
78 |
+
"{} does not exist. Make sure you insert a manual dir via `datasets.load_dataset('times_of_india_news_headlines', data_dir=...)` that includes a file name {}. Manual download instructions: {})".format(
|
79 |
+
path_to_manual_file, _FILENAME, self.manual_download_instructions
|
80 |
+
)
|
81 |
+
)
|
82 |
+
return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"path": path_to_manual_file})]
|
83 |
+
|
84 |
+
def _generate_examples(self, path=None):
|
85 |
+
""" Yields examples. """
|
86 |
+
with open(path, encoding="utf8") as csv_file:
|
87 |
+
csv_reader = csv.reader(
|
88 |
+
csv_file, quotechar='"', delimiter=",", skipinitialspace=True, quoting=csv.QUOTE_ALL
|
89 |
+
)
|
90 |
+
for id_, row in enumerate(csv_reader):
|
91 |
+
publish_date, headline_category, headline_text = row
|
92 |
+
yield id_, {
|
93 |
+
_PUBLISH_DATE: str(publish_date),
|
94 |
+
_HEADLINE_CATEGORY: headline_category,
|
95 |
+
_HEADLINE_TEXT: headline_text,
|
96 |
+
}
|