system HF staff commited on
Commit
8858740
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.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,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - found
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - o-uda-1-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 100K<n<1M
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-classification
18
+ task_ids:
19
+ - intent-classification
20
+ ---
21
+
22
+ # Dataset Card Creation Guide
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
+
47
+ ## Dataset Description
48
+
49
+ - **Homepage:** None
50
+ - **Repository:** https://github.com/microsoft/BingCoronavirusQuerySet
51
+ - **Paper:** Nonewww
52
+ - **Leaderboard:** [More Information Needed]
53
+ - **Point of Contact:** [More Information Needed]
54
+
55
+ ### Dataset Summary
56
+
57
+ Please note that you can specify the start and end date of the data. You can get start and end dates from here: https://github.com/microsoft/BingCoronavirusQuerySet/tree/master/data/2020
58
+
59
+ example:
60
+
61
+ ```
62
+ load_dataset("bing_coronavirus_query_set", queries_by="state", start_date="2020-09-01", end_date="2020-09-30")
63
+ ```
64
+
65
+ You can also load the data by country by using `queries_by="country"`.
66
+
67
+
68
+ ### Supported Tasks and Leaderboards
69
+
70
+ [More Information Needed]
71
+
72
+ ### Languages
73
+
74
+ [More Information Needed]
75
+
76
+ ## Dataset Structure
77
+
78
+ ### Data Instances
79
+
80
+ [More Information Needed]
81
+
82
+ ### Data Fields
83
+
84
+ [More Information Needed]
85
+
86
+ ### Data Splits
87
+
88
+ [More Information Needed]
89
+
90
+ ## Dataset Creation
91
+
92
+ ### Curation Rationale
93
+
94
+ [More Information Needed]
95
+
96
+ ### Source Data
97
+
98
+ [More Information Needed]
99
+
100
+ #### Initial Data Collection and Normalization
101
+
102
+ [More Information Needed]
103
+
104
+ #### Who are the source language producers?
105
+
106
+ [More Information Needed]
107
+
108
+ ### Annotations
109
+
110
+ [More Information Needed]
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
+ [More Information Needed]
143
+
144
+ ### Licensing Information
145
+
146
+ [More Information Needed]
147
+
148
+ ### Citation Information
149
+
150
+ [More Information Needed]
bing_coronavirus_query_set.py ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 HuggingFace Datasets Authors.
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
+ # Lint as: python3
17
+
18
+ import datasets
19
+
20
+
21
+ _DESCRIPTION = """\
22
+ This dataset was curated from the Bing search logs (desktop users only) over the period of Jan 1st, 2020 – (Current Month - 1). Only searches that were issued many times by multiple users were included. The dataset includes queries from all over the world that had an intent related to the Coronavirus or Covid-19. In some cases this intent is explicit in the query itself (e.g., “Coronavirus updates Seattle”), in other cases it is implicit , e.g. “Shelter in place”. The implicit intent of search queries (e.g., “Toilet paper”) was extracted using random walks on the click graph as outlined in this paper by Microsoft Research. All personal data were removed.
23
+ """
24
+ _HOMEPAGE_URL = "https://github.com/microsoft/BingCoronavirusQuerySet"
25
+ _CITATION = None
26
+
27
+ _VERSION = "1.0.0"
28
+ _BASE_URL = "https://raw.githubusercontent.com/microsoft/BingCoronavirusQuerySet/master/data/2020/{}_{}_{}.tsv"
29
+
30
+
31
+ class BingCoronavirusQuerySetConfig(datasets.BuilderConfig):
32
+ def __init__(self, *args, queries_by=None, start_date=None, end_date=None, **kwargs):
33
+ super().__init__(
34
+ *args,
35
+ name=f"{queries_by}_{start_date}_{end_date}",
36
+ **kwargs,
37
+ )
38
+ self.queries_by = queries_by
39
+ self.start_date = start_date
40
+ self.end_date = end_date
41
+
42
+
43
+ class BingCoronavirusQuerySet(datasets.GeneratorBasedBuilder):
44
+ BUILDER_CONFIGS = [
45
+ BingCoronavirusQuerySetConfig(
46
+ queries_by="country",
47
+ start_date="2020-09-01",
48
+ end_date="2020-09-30",
49
+ description=f"Query by: country, start_date: 2020-09-01, end_date: 2020-09-30",
50
+ version=datasets.Version(_VERSION),
51
+ )
52
+ ]
53
+ BUILDER_CONFIG_CLASS = BingCoronavirusQuerySetConfig
54
+
55
+ def _info(self):
56
+ if self.config.queries_by == "country":
57
+ features = datasets.Features(
58
+ {
59
+ "id": datasets.Value("int32"),
60
+ "Date": datasets.Value("string"),
61
+ "Query": datasets.Value("string"),
62
+ "IsImplicitIntent": datasets.Value("string"),
63
+ "Country": datasets.Value("string"),
64
+ "PopularityScore": datasets.Value("int32"),
65
+ },
66
+ )
67
+ elif self.config.queries_by == "state":
68
+ features = datasets.Features(
69
+ {
70
+ "id": datasets.Value("int32"),
71
+ "Date": datasets.Value("string"),
72
+ "Query": datasets.Value("string"),
73
+ "IsImplicitIntent": datasets.Value("string"),
74
+ "State": datasets.Value("string"),
75
+ "Country": datasets.Value("string"),
76
+ "PopularityScore": datasets.Value("int32"),
77
+ },
78
+ )
79
+ else:
80
+ raise Exception("Unknown queries_by. Choose one of: country or state")
81
+ return datasets.DatasetInfo(
82
+ description=_DESCRIPTION,
83
+ features=features,
84
+ supervised_keys=None,
85
+ homepage=_HOMEPAGE_URL,
86
+ citation=_CITATION,
87
+ )
88
+
89
+ def _split_generators(self, dl_manager):
90
+ def _base_url(queries_by, start_date, end_date):
91
+ if queries_by == "country":
92
+ queries_by = "QueriesByCountry"
93
+ else:
94
+ queries_by = "QueriesByState"
95
+ return _BASE_URL.format(queries_by, start_date, end_date)
96
+
97
+ download_url = _base_url(self.config.queries_by, self.config.start_date, self.config.end_date)
98
+ path = dl_manager.download_and_extract(download_url)
99
+ return [
100
+ datasets.SplitGenerator(
101
+ name=datasets.Split.TRAIN,
102
+ gen_kwargs={"datapath": path},
103
+ )
104
+ ]
105
+
106
+ def _generate_examples(self, datapath):
107
+ with open(datapath, encoding="utf-8") as f:
108
+ for sentence_counter, row in enumerate(f):
109
+ if sentence_counter == 0:
110
+ continue
111
+ row = row.strip().split("\t")
112
+ if self.config.queries_by == "country":
113
+ resp = {
114
+ "id": sentence_counter,
115
+ "Date": row[0],
116
+ "Query": row[1],
117
+ "IsImplicitIntent": row[2],
118
+ "Country": row[3],
119
+ "PopularityScore": row[4],
120
+ }
121
+ else:
122
+ resp = {
123
+ "id": sentence_counter,
124
+ "Date": row[0],
125
+ "Query": row[1],
126
+ "IsImplicitIntent": row[2],
127
+ "State": row[3],
128
+ "Country": row[4],
129
+ "PopularityScore": int(row[5]),
130
+ }
131
+ yield sentence_counter, resp
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"country_2020-09-01_2020-09-30": {"description": "This dataset was curated from the Bing search logs (desktop users only) over the period of Jan 1st, 2020 \u2013 (Current Month - 1). Only searches that were issued many times by multiple users were included. The dataset includes queries from all over the world that had an intent related to the Coronavirus or Covid-19. In some cases this intent is explicit in the query itself (e.g., \u201cCoronavirus updates Seattle\u201d), in other cases it is implicit , e.g. \u201cShelter in place\u201d. The implicit intent of search queries (e.g., \u201cToilet paper\u201d) was extracted using random walks on the click graph as outlined in this paper by Microsoft Research. All personal data were removed.\n", "citation": "", "homepage": "https://github.com/microsoft/BingCoronavirusQuerySet", "license": "", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "Date": {"dtype": "string", "id": null, "_type": "Value"}, "Query": {"dtype": "string", "id": null, "_type": "Value"}, "IsImplicitIntent": {"dtype": "string", "id": null, "_type": "Value"}, "Country": {"dtype": "string", "id": null, "_type": "Value"}, "PopularityScore": {"dtype": "int32", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "bing_coronavirus_query_set", "config_name": "country_2020-09-01_2020-09-30", "version": "0.0.0", "splits": {"train": {"name": "train", "num_bytes": 22052706, "num_examples": 317856, "dataset_name": "bing_coronavirus_query_set"}}, "download_checksums": {"https://raw.githubusercontent.com/microsoft/BingCoronavirusQuerySet/master/data/2020/QueriesByCountry_2020-09-01_2020-09-30.tsv": {"num_bytes": 16351450, "checksum": "ff0eac0790cd4a276cb83c74200d692b0b38b6dc36cfc93b513415aed3dc724b"}}, "download_size": 16351450, "post_processing_size": null, "dataset_size": 22052706, "size_in_bytes": 38404156}}
dummy/country_2020-09-01_2020-09-30/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1a6cbc7eb8690109f1efbaa499480e1066a7e27347e3fe20e7ca95ee7b2b06f
3
+ size 465