Datasets:
patrickvonplaten
commited on
Commit
•
ea95213
1
Parent(s):
358bea6
Add dataset
Browse files- README.md +255 -1
- banking77.py +171 -0
- dataset_infos.json +1 -0
README.md
CHANGED
@@ -1,3 +1,257 @@
|
|
1 |
---
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
annotations_creators:
|
3 |
+
- expert-generated
|
4 |
+
extended:
|
5 |
+
- original
|
6 |
+
language_creators:
|
7 |
+
- expert-generated
|
8 |
+
languages:
|
9 |
+
- en
|
10 |
+
licenses:
|
11 |
+
- cc-by-4.0
|
12 |
+
multilinguality:
|
13 |
+
- monolingual
|
14 |
+
size_categories:
|
15 |
+
- 10K<n<100K
|
16 |
+
source_datasets:
|
17 |
+
- original
|
18 |
+
task_categories:
|
19 |
+
- text-classification
|
20 |
+
task_ids:
|
21 |
+
- intent-classification
|
22 |
+
- multi-class-classification
|
23 |
+
paperswithcode_id: null
|
24 |
+
pretty_name: BANKING77
|
25 |
---
|
26 |
+
|
27 |
+
# Dataset Card for BANKING77
|
28 |
+
|
29 |
+
## Table of Contents
|
30 |
+
- [Dataset Description](#dataset-description)
|
31 |
+
- [Dataset Summary](#dataset-summary)
|
32 |
+
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
33 |
+
- [Languages](#languages)
|
34 |
+
- [Dataset Structure](#dataset-structure)
|
35 |
+
- [Data Instances](#data-instances)
|
36 |
+
- [Data Fields](#data-fields)
|
37 |
+
- [Data Splits](#data-splits)
|
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 |
+
- [Contributions](#contributions)
|
52 |
+
|
53 |
+
## Dataset Description
|
54 |
+
|
55 |
+
- **Homepage:** [Github](https://github.com/PolyAI-LDN/task-specific-datasets)
|
56 |
+
- **Repository:** [Github](https://github.com/PolyAI-LDN/task-specific-datasets)
|
57 |
+
- **Paper:** [ArXiv](https://arxiv.org/abs/2003.04807)
|
58 |
+
- **Leaderboard:**
|
59 |
+
- **Point of Contact:**
|
60 |
+
|
61 |
+
### Dataset Summary
|
62 |
+
|
63 |
+
Dataset composed of online banking queries annotated with their corresponding intents.
|
64 |
+
|
65 |
+
BANKING77 dataset provides a very fine-grained set of intents in a banking domain.
|
66 |
+
It comprises 13,083 customer service queries labeled with 77 intents.
|
67 |
+
It focuses on fine-grained single-domain intent detection.
|
68 |
+
|
69 |
+
### Supported Tasks and Leaderboards
|
70 |
+
|
71 |
+
Intent classification, intent detection
|
72 |
+
|
73 |
+
### Languages
|
74 |
+
|
75 |
+
English
|
76 |
+
|
77 |
+
## Dataset Structure
|
78 |
+
|
79 |
+
### Data Instances
|
80 |
+
|
81 |
+
An example of 'train' looks as follows:
|
82 |
+
```
|
83 |
+
{
|
84 |
+
'label': 11, # integer label corresponding to "card_arrival" intent
|
85 |
+
'text': 'I am still waiting on my card?'
|
86 |
+
}
|
87 |
+
```
|
88 |
+
|
89 |
+
### Data Fields
|
90 |
+
|
91 |
+
- `text`: a string feature.
|
92 |
+
- `label`: One of classification labels (0-76) corresponding to unique intents.
|
93 |
+
|
94 |
+
Intent names are mapped to `label` in the following way:
|
95 |
+
|
96 |
+
| label | intent (category) |
|
97 |
+
|---:|:-------------------------------------------------|
|
98 |
+
| 0 | activate_my_card |
|
99 |
+
| 1 | age_limit |
|
100 |
+
| 2 | apple_pay_or_google_pay |
|
101 |
+
| 3 | atm_support |
|
102 |
+
| 4 | automatic_top_up |
|
103 |
+
| 5 | balance_not_updated_after_bank_transfer |
|
104 |
+
| 6 | balance_not_updated_after_cheque_or_cash_deposit |
|
105 |
+
| 7 | beneficiary_not_allowed |
|
106 |
+
| 8 | cancel_transfer |
|
107 |
+
| 9 | card_about_to_expire |
|
108 |
+
| 10 | card_acceptance |
|
109 |
+
| 11 | card_arrival |
|
110 |
+
| 12 | card_delivery_estimate |
|
111 |
+
| 13 | card_linking |
|
112 |
+
| 14 | card_not_working |
|
113 |
+
| 15 | card_payment_fee_charged |
|
114 |
+
| 16 | card_payment_not_recognised |
|
115 |
+
| 17 | card_payment_wrong_exchange_rate |
|
116 |
+
| 18 | card_swallowed |
|
117 |
+
| 19 | cash_withdrawal_charge |
|
118 |
+
| 20 | cash_withdrawal_not_recognised |
|
119 |
+
| 21 | change_pin |
|
120 |
+
| 22 | compromised_card |
|
121 |
+
| 23 | contactless_not_working |
|
122 |
+
| 24 | country_support |
|
123 |
+
| 25 | declined_card_payment |
|
124 |
+
| 26 | declined_cash_withdrawal |
|
125 |
+
| 27 | declined_transfer |
|
126 |
+
| 28 | direct_debit_payment_not_recognised |
|
127 |
+
| 29 | disposable_card_limits |
|
128 |
+
| 30 | edit_personal_details |
|
129 |
+
| 31 | exchange_charge |
|
130 |
+
| 32 | exchange_rate |
|
131 |
+
| 33 | exchange_via_app |
|
132 |
+
| 34 | extra_charge_on_statement |
|
133 |
+
| 35 | failed_transfer |
|
134 |
+
| 36 | fiat_currency_support |
|
135 |
+
| 37 | get_disposable_virtual_card |
|
136 |
+
| 38 | get_physical_card |
|
137 |
+
| 39 | getting_spare_card |
|
138 |
+
| 40 | getting_virtual_card |
|
139 |
+
| 41 | lost_or_stolen_card |
|
140 |
+
| 42 | lost_or_stolen_phone |
|
141 |
+
| 43 | order_physical_card |
|
142 |
+
| 44 | passcode_forgotten |
|
143 |
+
| 45 | pending_card_payment |
|
144 |
+
| 46 | pending_cash_withdrawal |
|
145 |
+
| 47 | pending_top_up |
|
146 |
+
| 48 | pending_transfer |
|
147 |
+
| 49 | pin_blocked |
|
148 |
+
| 50 | receiving_money |
|
149 |
+
| 51 | Refund_not_showing_up |
|
150 |
+
| 52 | request_refund |
|
151 |
+
| 53 | reverted_card_payment? |
|
152 |
+
| 54 | supported_cards_and_currencies |
|
153 |
+
| 55 | terminate_account |
|
154 |
+
| 56 | top_up_by_bank_transfer_charge |
|
155 |
+
| 57 | top_up_by_card_charge |
|
156 |
+
| 58 | top_up_by_cash_or_cheque |
|
157 |
+
| 59 | top_up_failed |
|
158 |
+
| 60 | top_up_limits |
|
159 |
+
| 61 | top_up_reverted |
|
160 |
+
| 62 | topping_up_by_card |
|
161 |
+
| 63 | transaction_charged_twice |
|
162 |
+
| 64 | transfer_fee_charged |
|
163 |
+
| 65 | transfer_into_account |
|
164 |
+
| 66 | transfer_not_received_by_recipient |
|
165 |
+
| 67 | transfer_timing |
|
166 |
+
| 68 | unable_to_verify_identity |
|
167 |
+
| 69 | verify_my_identity |
|
168 |
+
| 70 | verify_source_of_funds |
|
169 |
+
| 71 | verify_top_up |
|
170 |
+
| 72 | virtual_card_not_working |
|
171 |
+
| 73 | visa_or_mastercard |
|
172 |
+
| 74 | why_verify_identity |
|
173 |
+
| 75 | wrong_amount_of_cash_received |
|
174 |
+
| 76 | wrong_exchange_rate_for_cash_withdrawal |
|
175 |
+
|
176 |
+
### Data Splits
|
177 |
+
|
178 |
+
| Dataset statistics | Train | Test |
|
179 |
+
| --- | --- | --- |
|
180 |
+
| Number of examples | 10 003 | 3 080 |
|
181 |
+
| Average character length | 59.5 | 54.2 |
|
182 |
+
| Number of intents | 77 | 77 |
|
183 |
+
| Number of domains | 1 | 1 |
|
184 |
+
|
185 |
+
## Dataset Creation
|
186 |
+
|
187 |
+
### Curation Rationale
|
188 |
+
|
189 |
+
Previous intent detection datasets such as Web Apps, Ask Ubuntu, the Chatbot Corpus or SNIPS are limited to small number of classes (<10), which oversimplifies the intent detection task and does not emulate the true environment of commercial systems. Although there exist large scale *multi-domain* datasets ([HWU64](https://github.com/xliuhw/NLU-Evaluation-Data) and [CLINC150](https://github.com/clinc/oos-eval)), the examples per each domain may not sufficiently capture the full complexity of each domain as encountered "in the wild". This dataset tries to fill the gap and provides a very fine-grained set of intents in a *single-domain* i.e. **banking**. Its focus on fine-grained single-domain intent detection makes it complementary to the other two multi-domain datasets.
|
190 |
+
|
191 |
+
### Source Data
|
192 |
+
|
193 |
+
#### Initial Data Collection and Normalization
|
194 |
+
|
195 |
+
[More Information Needed]
|
196 |
+
|
197 |
+
#### Who are the source language producers?
|
198 |
+
|
199 |
+
[More Information Needed]
|
200 |
+
|
201 |
+
### Annotations
|
202 |
+
|
203 |
+
#### Annotation process
|
204 |
+
|
205 |
+
The dataset does not contain any additional annotations.
|
206 |
+
|
207 |
+
#### Who are the annotators?
|
208 |
+
|
209 |
+
[N/A]
|
210 |
+
|
211 |
+
### Personal and Sensitive Information
|
212 |
+
|
213 |
+
[N/A]
|
214 |
+
|
215 |
+
## Considerations for Using the Data
|
216 |
+
|
217 |
+
### Social Impact of Dataset
|
218 |
+
|
219 |
+
The purpose of this dataset it to help develop better intent detection systems.
|
220 |
+
|
221 |
+
Any comprehensive intent detection evaluation should involve both coarser-grained multi-domain datasets and a fine-grained single-domain dataset such as BANKING77.
|
222 |
+
|
223 |
+
### Discussion of Biases
|
224 |
+
|
225 |
+
[More Information Needed]
|
226 |
+
|
227 |
+
### Other Known Limitations
|
228 |
+
|
229 |
+
[More Information Needed]
|
230 |
+
|
231 |
+
## Additional Information
|
232 |
+
|
233 |
+
### Dataset Curators
|
234 |
+
|
235 |
+
[PolyAI](https://github.com/PolyAI-LDN)
|
236 |
+
|
237 |
+
### Licensing Information
|
238 |
+
|
239 |
+
Creative Commons Attribution 4.0 International
|
240 |
+
|
241 |
+
### Citation Information
|
242 |
+
|
243 |
+
```
|
244 |
+
@inproceedings{Casanueva2020,
|
245 |
+
author = {I{\~{n}}igo Casanueva and Tadas Temcinas and Daniela Gerz and Matthew Henderson and Ivan Vulic},
|
246 |
+
title = {Efficient Intent Detection with Dual Sentence Encoders},
|
247 |
+
year = {2020},
|
248 |
+
month = {mar},
|
249 |
+
note = {Data available at https://github.com/PolyAI-LDN/task-specific-datasets},
|
250 |
+
url = {https://arxiv.org/abs/2003.04807},
|
251 |
+
booktitle = {Proceedings of the 2nd Workshop on NLP for ConvAI - ACL 2020}
|
252 |
+
}
|
253 |
+
```
|
254 |
+
|
255 |
+
### Contributions
|
256 |
+
|
257 |
+
Thanks to [@dkajtoch](https://github.com/dkajtoch) for adding this dataset.
|
banking77.py
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"""BANKING77 dataset."""
|
16 |
+
|
17 |
+
|
18 |
+
import csv
|
19 |
+
|
20 |
+
import datasets
|
21 |
+
from datasets.tasks import TextClassification
|
22 |
+
|
23 |
+
|
24 |
+
_CITATION = """\
|
25 |
+
@inproceedings{Casanueva2020,
|
26 |
+
author = {I{\~{n}}igo Casanueva and Tadas Temcinas and Daniela Gerz and Matthew Henderson and Ivan Vulic},
|
27 |
+
title = {Efficient Intent Detection with Dual Sentence Encoders},
|
28 |
+
year = {2020},
|
29 |
+
month = {mar},
|
30 |
+
note = {Data available at https://github.com/PolyAI-LDN/task-specific-datasets},
|
31 |
+
url = {https://arxiv.org/abs/2003.04807},
|
32 |
+
booktitle = {Proceedings of the 2nd Workshop on NLP for ConvAI - ACL 2020}
|
33 |
+
}
|
34 |
+
""" # noqa: W605
|
35 |
+
|
36 |
+
_DESCRIPTION = """\
|
37 |
+
BANKING77 dataset provides a very fine-grained set of intents in a banking domain.
|
38 |
+
It comprises 13,083 customer service queries labeled with 77 intents.
|
39 |
+
It focuses on fine-grained single-domain intent detection.
|
40 |
+
"""
|
41 |
+
|
42 |
+
_HOMEPAGE = "https://github.com/PolyAI-LDN/task-specific-datasets"
|
43 |
+
|
44 |
+
_LICENSE = "Creative Commons Attribution 4.0 International"
|
45 |
+
|
46 |
+
_TRAIN_DOWNLOAD_URL = (
|
47 |
+
"https://raw.githubusercontent.com/PolyAI-LDN/task-specific-datasets/master/banking_data/train.csv"
|
48 |
+
)
|
49 |
+
_TEST_DOWNLOAD_URL = "https://raw.githubusercontent.com/PolyAI-LDN/task-specific-datasets/master/banking_data/test.csv"
|
50 |
+
|
51 |
+
|
52 |
+
class Banking77(datasets.GeneratorBasedBuilder):
|
53 |
+
"""BANKING77 dataset."""
|
54 |
+
|
55 |
+
VERSION = datasets.Version("1.1.0")
|
56 |
+
|
57 |
+
def _info(self):
|
58 |
+
features = datasets.Features(
|
59 |
+
{
|
60 |
+
"text": datasets.Value("string"),
|
61 |
+
"label": datasets.features.ClassLabel(
|
62 |
+
names=[
|
63 |
+
"activate_my_card",
|
64 |
+
"age_limit",
|
65 |
+
"apple_pay_or_google_pay",
|
66 |
+
"atm_support",
|
67 |
+
"automatic_top_up",
|
68 |
+
"balance_not_updated_after_bank_transfer",
|
69 |
+
"balance_not_updated_after_cheque_or_cash_deposit",
|
70 |
+
"beneficiary_not_allowed",
|
71 |
+
"cancel_transfer",
|
72 |
+
"card_about_to_expire",
|
73 |
+
"card_acceptance",
|
74 |
+
"card_arrival",
|
75 |
+
"card_delivery_estimate",
|
76 |
+
"card_linking",
|
77 |
+
"card_not_working",
|
78 |
+
"card_payment_fee_charged",
|
79 |
+
"card_payment_not_recognised",
|
80 |
+
"card_payment_wrong_exchange_rate",
|
81 |
+
"card_swallowed",
|
82 |
+
"cash_withdrawal_charge",
|
83 |
+
"cash_withdrawal_not_recognised",
|
84 |
+
"change_pin",
|
85 |
+
"compromised_card",
|
86 |
+
"contactless_not_working",
|
87 |
+
"country_support",
|
88 |
+
"declined_card_payment",
|
89 |
+
"declined_cash_withdrawal",
|
90 |
+
"declined_transfer",
|
91 |
+
"direct_debit_payment_not_recognised",
|
92 |
+
"disposable_card_limits",
|
93 |
+
"edit_personal_details",
|
94 |
+
"exchange_charge",
|
95 |
+
"exchange_rate",
|
96 |
+
"exchange_via_app",
|
97 |
+
"extra_charge_on_statement",
|
98 |
+
"failed_transfer",
|
99 |
+
"fiat_currency_support",
|
100 |
+
"get_disposable_virtual_card",
|
101 |
+
"get_physical_card",
|
102 |
+
"getting_spare_card",
|
103 |
+
"getting_virtual_card",
|
104 |
+
"lost_or_stolen_card",
|
105 |
+
"lost_or_stolen_phone",
|
106 |
+
"order_physical_card",
|
107 |
+
"passcode_forgotten",
|
108 |
+
"pending_card_payment",
|
109 |
+
"pending_cash_withdrawal",
|
110 |
+
"pending_top_up",
|
111 |
+
"pending_transfer",
|
112 |
+
"pin_blocked",
|
113 |
+
"receiving_money",
|
114 |
+
"Refund_not_showing_up",
|
115 |
+
"request_refund",
|
116 |
+
"reverted_card_payment?",
|
117 |
+
"supported_cards_and_currencies",
|
118 |
+
"terminate_account",
|
119 |
+
"top_up_by_bank_transfer_charge",
|
120 |
+
"top_up_by_card_charge",
|
121 |
+
"top_up_by_cash_or_cheque",
|
122 |
+
"top_up_failed",
|
123 |
+
"top_up_limits",
|
124 |
+
"top_up_reverted",
|
125 |
+
"topping_up_by_card",
|
126 |
+
"transaction_charged_twice",
|
127 |
+
"transfer_fee_charged",
|
128 |
+
"transfer_into_account",
|
129 |
+
"transfer_not_received_by_recipient",
|
130 |
+
"transfer_timing",
|
131 |
+
"unable_to_verify_identity",
|
132 |
+
"verify_my_identity",
|
133 |
+
"verify_source_of_funds",
|
134 |
+
"verify_top_up",
|
135 |
+
"virtual_card_not_working",
|
136 |
+
"visa_or_mastercard",
|
137 |
+
"why_verify_identity",
|
138 |
+
"wrong_amount_of_cash_received",
|
139 |
+
"wrong_exchange_rate_for_cash_withdrawal",
|
140 |
+
]
|
141 |
+
),
|
142 |
+
}
|
143 |
+
)
|
144 |
+
return datasets.DatasetInfo(
|
145 |
+
description=_DESCRIPTION,
|
146 |
+
features=features,
|
147 |
+
supervised_keys=None,
|
148 |
+
homepage=_HOMEPAGE,
|
149 |
+
license=_LICENSE,
|
150 |
+
citation=_CITATION,
|
151 |
+
task_templates=[TextClassification(text_column="text", label_column="label")],
|
152 |
+
)
|
153 |
+
|
154 |
+
def _split_generators(self, dl_manager):
|
155 |
+
"""Returns SplitGenerators."""
|
156 |
+
train_path = dl_manager.download_and_extract(_TRAIN_DOWNLOAD_URL)
|
157 |
+
test_path = dl_manager.download_and_extract(_TEST_DOWNLOAD_URL)
|
158 |
+
return [
|
159 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train_path}),
|
160 |
+
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": test_path}),
|
161 |
+
]
|
162 |
+
|
163 |
+
def _generate_examples(self, filepath):
|
164 |
+
"""Yields examples as (key, example) tuples."""
|
165 |
+
with open(filepath, encoding="utf-8") as f:
|
166 |
+
csv_reader = csv.reader(f, quotechar='"', delimiter=",", quoting=csv.QUOTE_ALL, skipinitialspace=True)
|
167 |
+
# call next to skip header
|
168 |
+
next(csv_reader)
|
169 |
+
for id_, row in enumerate(csv_reader):
|
170 |
+
text, label = row
|
171 |
+
yield id_, {"text": text, "label": label}
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"default": {"description": "BANKING77 dataset provides a very fine-grained set of intents in a banking domain.\nIt comprises 13,083 customer service queries labeled with 77 intents.\nIt focuses on fine-grained single-domain intent detection.\n", "citation": "@inproceedings{Casanueva2020,\n author = {I{\\~{n}}igo Casanueva and Tadas Temcinas and Daniela Gerz and Matthew Henderson and Ivan Vulic},\n title = {Efficient Intent Detection with Dual Sentence Encoders},\n year = {2020},\n month = {mar},\n note = {Data available at https://github.com/PolyAI-LDN/task-specific-datasets},\n url = {https://arxiv.org/abs/2003.04807},\n booktitle = {Proceedings of the 2nd Workshop on NLP for ConvAI - ACL 2020}\n}\n", "homepage": "https://github.com/PolyAI-LDN/task-specific-datasets", "license": "Creative Commons Attribution 4.0 International", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 77, "names": ["activate_my_card", "age_limit", "apple_pay_or_google_pay", "atm_support", "automatic_top_up", "balance_not_updated_after_bank_transfer", "balance_not_updated_after_cheque_or_cash_deposit", "beneficiary_not_allowed", "cancel_transfer", "card_about_to_expire", "card_acceptance", "card_arrival", "card_delivery_estimate", "card_linking", "card_not_working", "card_payment_fee_charged", "card_payment_not_recognised", "card_payment_wrong_exchange_rate", "card_swallowed", "cash_withdrawal_charge", "cash_withdrawal_not_recognised", "change_pin", "compromised_card", "contactless_not_working", "country_support", "declined_card_payment", "declined_cash_withdrawal", "declined_transfer", "direct_debit_payment_not_recognised", "disposable_card_limits", "edit_personal_details", "exchange_charge", "exchange_rate", "exchange_via_app", "extra_charge_on_statement", "failed_transfer", "fiat_currency_support", "get_disposable_virtual_card", "get_physical_card", "getting_spare_card", "getting_virtual_card", "lost_or_stolen_card", "lost_or_stolen_phone", "order_physical_card", "passcode_forgotten", "pending_card_payment", "pending_cash_withdrawal", "pending_top_up", "pending_transfer", "pin_blocked", "receiving_money", "Refund_not_showing_up", "request_refund", "reverted_card_payment?", "supported_cards_and_currencies", "terminate_account", "top_up_by_bank_transfer_charge", "top_up_by_card_charge", "top_up_by_cash_or_cheque", "top_up_failed", "top_up_limits", "top_up_reverted", "topping_up_by_card", "transaction_charged_twice", "transfer_fee_charged", "transfer_into_account", "transfer_not_received_by_recipient", "transfer_timing", "unable_to_verify_identity", "verify_my_identity", "verify_source_of_funds", "verify_top_up", "virtual_card_not_working", "visa_or_mastercard", "why_verify_identity", "wrong_amount_of_cash_received", "wrong_exchange_rate_for_cash_withdrawal"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": [{"task": "text-classification", "text_column": "text", "label_column": "label", "labels": ["Refund_not_showing_up", "activate_my_card", "age_limit", "apple_pay_or_google_pay", "atm_support", "automatic_top_up", "balance_not_updated_after_bank_transfer", "balance_not_updated_after_cheque_or_cash_deposit", "beneficiary_not_allowed", "cancel_transfer", "card_about_to_expire", "card_acceptance", "card_arrival", "card_delivery_estimate", "card_linking", "card_not_working", "card_payment_fee_charged", "card_payment_not_recognised", "card_payment_wrong_exchange_rate", "card_swallowed", "cash_withdrawal_charge", "cash_withdrawal_not_recognised", "change_pin", "compromised_card", "contactless_not_working", "country_support", "declined_card_payment", "declined_cash_withdrawal", "declined_transfer", "direct_debit_payment_not_recognised", "disposable_card_limits", "edit_personal_details", "exchange_charge", "exchange_rate", "exchange_via_app", "extra_charge_on_statement", "failed_transfer", "fiat_currency_support", "get_disposable_virtual_card", "get_physical_card", "getting_spare_card", "getting_virtual_card", "lost_or_stolen_card", "lost_or_stolen_phone", "order_physical_card", "passcode_forgotten", "pending_card_payment", "pending_cash_withdrawal", "pending_top_up", "pending_transfer", "pin_blocked", "receiving_money", "request_refund", "reverted_card_payment?", "supported_cards_and_currencies", "terminate_account", "top_up_by_bank_transfer_charge", "top_up_by_card_charge", "top_up_by_cash_or_cheque", "top_up_failed", "top_up_limits", "top_up_reverted", "topping_up_by_card", "transaction_charged_twice", "transfer_fee_charged", "transfer_into_account", "transfer_not_received_by_recipient", "transfer_timing", "unable_to_verify_identity", "verify_my_identity", "verify_source_of_funds", "verify_top_up", "virtual_card_not_working", "visa_or_mastercard", "why_verify_identity", "wrong_amount_of_cash_received", "wrong_exchange_rate_for_cash_withdrawal"]}], "builder_name": "banking77", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 715036, "num_examples": 10003, "dataset_name": "banking77"}, "test": {"name": "test", "num_bytes": 204014, "num_examples": 3080, "dataset_name": "banking77"}}, "download_checksums": {"https://raw.githubusercontent.com/PolyAI-LDN/task-specific-datasets/master/banking_data/train.csv": {"num_bytes": 839073, "checksum": "b06e26ac675513959a63135f11b94ea7786ed02da65db93a5650d8838cbc664b"}, "https://raw.githubusercontent.com/PolyAI-LDN/task-specific-datasets/master/banking_data/test.csv": {"num_bytes": 239961, "checksum": "d12d6e3bc4c3103966ae786dc435913c0c563dfa328f5a3646d0e62cfeeb474d"}}, "download_size": 1079034, "post_processing_size": null, "dataset_size": 919050, "size_in_bytes": 1998084}}
|