system HF staff commited on
Commit
c5d3a48
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,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ - machine-generated
5
+ language_creators:
6
+ - expert-generated
7
+ - machine-generated
8
+ languages:
9
+ - de
10
+ - en
11
+ - es
12
+ - fr
13
+ - ja
14
+ - ko
15
+ - zh
16
+ licenses:
17
+ - other
18
+ multilinguality:
19
+ - multilingual
20
+ size_categories:
21
+ - 10K<n<100K
22
+ source_datasets:
23
+ - extended|other-paws
24
+ task_categories:
25
+ - text-classification
26
+ - text-scoring
27
+ task_ids:
28
+ - semantic-similarity-classification
29
+ - semantic-similarity-scoring
30
+ - text-scoring-other-paraphrase-identification
31
+ ---
32
+
33
+ # Dataset Card Creation Guide
34
+
35
+ ## Table of Contents
36
+ - [Dataset Description](#dataset-description)
37
+ - [Dataset Summary](#dataset-summary)
38
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
39
+ - [Languages](#languages)
40
+ - [Dataset Structure](#dataset-structure)
41
+ - [Data Instances](#data-instances)
42
+ - [Data Fields](#data-instances)
43
+ - [Data Splits](#data-instances)
44
+ - [Dataset Creation](#dataset-creation)
45
+ - [Curation Rationale](#curation-rationale)
46
+ - [Source Data](#source-data)
47
+ - [Annotations](#annotations)
48
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
49
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
50
+ - [Social Impact of Dataset](#social-impact-of-dataset)
51
+ - [Discussion of Biases](#discussion-of-biases)
52
+ - [Other Known Limitations](#other-known-limitations)
53
+ - [Additional Information](#additional-information)
54
+ - [Dataset Curators](#dataset-curators)
55
+ - [Licensing Information](#licensing-information)
56
+ - [Citation Information](#citation-information)
57
+
58
+ ## Dataset Description
59
+
60
+ - **Homepage:** [PAWS-X](https://github.com/google-research-datasets/paws/tree/master/pawsx)
61
+ - **Repository:** [PAWS-X](https://github.com/google-research-datasets/paws/tree/master/pawsx)
62
+ - **Paper:** [PAWS-X: A Cross-lingual Adversarial Dataset for Paraphrase Identification](https://arxiv.org/abs/1908.11828)
63
+ - **Point of Contact:** [Yinfei Yang](yinfeiy@google.com)
64
+
65
+ ### Dataset Summary
66
+
67
+ This dataset contains 23,659 **human** translated PAWS evaluation pairs and
68
+ 296,406 **machine** translated training pairs in six typologically distinct
69
+ languages: French, Spanish, German, Chinese, Japanese, and Korean. All
70
+ translated pairs are sourced from examples in
71
+ [PAWS-Wiki](https://github.com/google-research-datasets/paws#paws-wiki).
72
+
73
+ For further details, see the accompanying paper:
74
+ [PAWS-X: A Cross-lingual Adversarial Dataset for Paraphrase
75
+ Identification](https://arxiv.org/abs/1908.11828)
76
+
77
+ ### Supported Tasks and Leaderboards
78
+
79
+ It has been majorly used for paraphrase identification for English and other 6 languages namely French, Spanish, German, Chinese, Japanese, and Korean
80
+
81
+ ### Languages
82
+
83
+ The dataset is in English, French, Spanish, German, Chinese, Japanese, and Korean
84
+
85
+ ## Dataset Structure
86
+
87
+ ### Data Instances
88
+
89
+ For en:
90
+ ```
91
+ id : 1
92
+ sentence1 : In Paris , in October 1560 , he secretly met the English ambassador , Nicolas Throckmorton , asking him for a passport to return to England through Scotland .
93
+ sentence2 : In October 1560 , he secretly met with the English ambassador , Nicolas Throckmorton , in Paris , and asked him for a passport to return to Scotland through England .
94
+ label : 0
95
+ ```
96
+ For fr:
97
+ ```
98
+ id : 1
99
+ sentence1 : À Paris, en octobre 1560, il rencontra secrètement l'ambassadeur d'Angleterre, Nicolas Throckmorton, lui demandant un passeport pour retourner en Angleterre en passant par l'Écosse.
100
+ sentence2 : En octobre 1560, il rencontra secrètement l'ambassadeur d'Angleterre, Nicolas Throckmorton, à Paris, et lui demanda un passeport pour retourner en Écosse par l'Angleterre.
101
+ label : 0
102
+ ```
103
+
104
+ ### Data Fields
105
+
106
+ All files are in tsv format with four columns:
107
+
108
+ Column Name | Data
109
+ :---------- | :--------------------------------------------------------
110
+ id | An ID that matches the ID of the source pair in PAWS-Wiki
111
+ sentence1 | The first sentence
112
+ sentence2 | The second sentence
113
+ label | Label for each pair
114
+
115
+ The source text of each translation can be retrieved by looking up the ID in the
116
+ corresponding file in PAWS-Wiki.
117
+
118
+ ### Data Splits
119
+
120
+ The numbers of examples for each of the six languages are shown below:
121
+
122
+ Language | Train | Dev | Test
123
+ :------- | ------: | -----: | -----:
124
+ fr | 49,401 | 1,992 | 1,985
125
+ es | 49,401 | 1,962 | 1,999
126
+ de | 49,401 | 1,932 | 1,967
127
+ zh | 49,401 | 1,984 | 1,975
128
+ ja | 49,401 | 1,980 | 1,946
129
+ ko | 49,401 | 1,965 | 1,972
130
+ Total | 296,406 | 11,815 | 11,844
131
+
132
+ > **Caveat**: please note that the dev and test sets of PAWS-X are both sourced
133
+ > from the dev set of PAWS-Wiki. As a consequence, the same `sentence 1` may
134
+ > appear in both the dev and test sets. Nevertheless our data split guarantees
135
+ > that there is no overlap on sentence pairs (`sentence 1` + `sentence 2`)
136
+ > between dev and test.
137
+
138
+ ## Dataset Creation
139
+
140
+ ### Curation Rationale
141
+
142
+ Most existing work on adversarial data generation focuses on English. For example, PAWS (Paraphrase Adversaries from Word Scrambling) (Zhang et al., 2019) consists of challenging English paraphrase identification pairs from Wikipedia and Quora. They remedy this gap with PAWS-X, a new dataset of 23,659 human translated PAWS evaluation pairs in six typologically distinct languages: French, Spanish, German, Chinese, Japanese, and Korean. They provide baseline numbers for three models with different capacity to capture non-local context and sentence structure, and using different multilingual training and evaluation regimes. Multilingual BERT (Devlin et al., 2019) fine-tuned on PAWS English plus machine-translated data performs the best, with a range of 83.1-90.8 accuracy across the non-English languages and an average accuracy gain of 23% over the next best model. PAWS-X shows the effectiveness of deep, multilingual pre-training while also leaving considerable headroom as a new challenge to drive multilingual research that better captures structure and contextual information.
143
+
144
+ ### Source Data
145
+
146
+ PAWS (Paraphrase Adversaries from Word Scrambling)
147
+
148
+ #### Initial Data Collection and Normalization
149
+
150
+ All translated pairs are sourced from examples in [PAWS-Wiki](https://github.com/google-research-datasets/paws#paws-wiki)
151
+
152
+ #### Who are the source language producers?
153
+
154
+ This dataset contains 23,659 human translated PAWS evaluation pairs and 296,406 machine translated training pairs in six typologically distinct languages: French, Spanish, German, Chinese, Japanese, and Korean.
155
+
156
+ ### Annotations
157
+
158
+ #### Annotation process
159
+
160
+ If applicable, describe the annotation process and any tools used, or state otherwise. Describe the amount of data annotated, if not all. Describe or reference annotation guidelines provided to the annotators. If available, provide interannotator statistics. Describe any annotation validation processes.
161
+
162
+ #### Who are the annotators?
163
+
164
+ The paper mentions the translate team, especially Mengmeng Niu, for the help with the annotations.
165
+
166
+ ### Personal and Sensitive Information
167
+
168
+ [More Information Needed]
169
+
170
+ ## Considerations for Using the Data
171
+
172
+ ### Social Impact of Dataset
173
+
174
+ [More Information Needed]
175
+
176
+ ### Discussion of Biases
177
+
178
+ [More Information Needed]
179
+
180
+ ### Other Known Limitations
181
+
182
+ [More Information Needed]
183
+
184
+ ## Additional Information
185
+
186
+ ### Dataset Curators
187
+
188
+ List the people involved in collecting the dataset and their affiliation(s). If funding information is known, include it here.
189
+
190
+ ### Licensing Information
191
+
192
+ The dataset may be freely used for any purpose, although acknowledgement of Google LLC ("Google") as the data source would be appreciated. The dataset is provided "AS IS" without any warranty, express or implied. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.
193
+
194
+ ### Citation Information
195
+
196
+ ```
197
+ @InProceedings{pawsx2019emnlp,
198
+ title = {{PAWS-X: A Cross-lingual Adversarial Dataset for Paraphrase Identification}},
199
+ author = {Yang, Yinfei and Zhang, Yuan and Tar, Chris and Baldridge, Jason},
200
+ booktitle = {Proc. of EMNLP},
201
+ year = {2019}
202
+ }
203
+ ```
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"en": {"description": "PAWS-X, a multilingual version of PAWS (Paraphrase Adversaries from Word Scrambling) for six languages.\n\nThis dataset contains 23,659 human translated PAWS evaluation pairs and 296,406 machine\ntranslated training pairs in six typologically distinct languages: French, Spanish, German,\nChinese, Japanese, and Korean. English language is available by default. All translated\npairs are sourced from examples in PAWS-Wiki.\n\nFor further details, see the accompanying paper: PAWS-X: A Cross-lingual Adversarial Dataset\nfor Paraphrase Identification (https://arxiv.org/abs/1908.11828)\n\nNOTE: There might be some missing or wrong labels in the dataset and we have replaced them with -1.\n", "citation": "@InProceedings{pawsx2019emnlp,\n title = {{PAWS-X: A Cross-lingual Adversarial Dataset for Paraphrase Identification}},\n author = {Yang, Yinfei and Zhang, Yuan and Tar, Chris and Baldridge, Jason},\n booktitle = {Proc. of EMNLP},\n year = {2019}\n}\n", "homepage": "https://github.com/google-research-datasets/paws/tree/master/pawsx", "license": "The dataset may be freely used for any purpose, although acknowledgement of Google LLC (\"Google\") as the data source would be appreciated. The dataset is provided \"AS IS\" without any warranty, express or implied. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "sentence1": {"dtype": "string", "id": null, "_type": "Value"}, "sentence2": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["0", "1"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "pawsx", "config_name": "en", "version": {"version_str": "1.1.0", "description": "", "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 12209260, "num_examples": 49202, "dataset_name": "pawsx"}, "test": {"name": "test", "num_bytes": 494734, "num_examples": 2000, "dataset_name": "pawsx"}, "validation": {"name": "validation", "num_bytes": 492287, "num_examples": 2000, "dataset_name": "pawsx"}}, "download_checksums": {"https://storage.googleapis.com/paws/pawsx/x-final.tar.gz": {"num_bytes": 30282057, "checksum": "4146db499101d66e68ae4c8ed3cf9dadecd625f44b7d8cf3d4a0fe93afc4fd9f"}}, "download_size": 30282057, "post_processing_size": null, "dataset_size": 13196281, "size_in_bytes": 43478338}, "de": {"description": "PAWS-X, a multilingual version of PAWS (Paraphrase Adversaries from Word Scrambling) for six languages.\n\nThis dataset contains 23,659 human translated PAWS evaluation pairs and 296,406 machine\ntranslated training pairs in six typologically distinct languages: French, Spanish, German,\nChinese, Japanese, and Korean. English language is available by default. All translated\npairs are sourced from examples in PAWS-Wiki.\n\nFor further details, see the accompanying paper: PAWS-X: A Cross-lingual Adversarial Dataset\nfor Paraphrase Identification (https://arxiv.org/abs/1908.11828)\n\nNOTE: There might be some missing or wrong labels in the dataset and we have replaced them with -1.\n", "citation": "@InProceedings{pawsx2019emnlp,\n title = {{PAWS-X: A Cross-lingual Adversarial Dataset for Paraphrase Identification}},\n author = {Yang, Yinfei and Zhang, Yuan and Tar, Chris and Baldridge, Jason},\n booktitle = {Proc. of EMNLP},\n year = {2019}\n}\n", "homepage": "https://github.com/google-research-datasets/paws/tree/master/pawsx", "license": "The dataset may be freely used for any purpose, although acknowledgement of Google LLC (\"Google\") as the data source would be appreciated. The dataset is provided \"AS IS\" without any warranty, express or implied. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "sentence1": {"dtype": "string", "id": null, "_type": "Value"}, "sentence2": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["0", "1"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "pawsx", "config_name": "de", "version": {"version_str": "1.1.0", "description": "", "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 12799423, "num_examples": 49383, "dataset_name": "pawsx"}, "test": {"name": "test", "num_bytes": 524190, "num_examples": 2000, "dataset_name": "pawsx"}, "validation": {"name": "validation", "num_bytes": 514005, "num_examples": 2000, "dataset_name": "pawsx"}}, "download_checksums": {"https://storage.googleapis.com/paws/pawsx/x-final.tar.gz": {"num_bytes": 30282057, "checksum": "4146db499101d66e68ae4c8ed3cf9dadecd625f44b7d8cf3d4a0fe93afc4fd9f"}}, "download_size": 30282057, "post_processing_size": null, "dataset_size": 13837618, "size_in_bytes": 44119675}, "es": {"description": "PAWS-X, a multilingual version of PAWS (Paraphrase Adversaries from Word Scrambling) for six languages.\n\nThis dataset contains 23,659 human translated PAWS evaluation pairs and 296,406 machine\ntranslated training pairs in six typologically distinct languages: French, Spanish, German,\nChinese, Japanese, and Korean. English language is available by default. All translated\npairs are sourced from examples in PAWS-Wiki.\n\nFor further details, see the accompanying paper: PAWS-X: A Cross-lingual Adversarial Dataset\nfor Paraphrase Identification (https://arxiv.org/abs/1908.11828)\n\nNOTE: There might be some missing or wrong labels in the dataset and we have replaced them with -1.\n", "citation": "@InProceedings{pawsx2019emnlp,\n title = {{PAWS-X: A Cross-lingual Adversarial Dataset for Paraphrase Identification}},\n author = {Yang, Yinfei and Zhang, Yuan and Tar, Chris and Baldridge, Jason},\n booktitle = {Proc. of EMNLP},\n year = {2019}\n}\n", "homepage": "https://github.com/google-research-datasets/paws/tree/master/pawsx", "license": "The dataset may be freely used for any purpose, although acknowledgement of Google LLC (\"Google\") as the data source would be appreciated. The dataset is provided \"AS IS\" without any warranty, express or implied. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "sentence1": {"dtype": "string", "id": null, "_type": "Value"}, "sentence2": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["0", "1"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "pawsx", "config_name": "es", "version": {"version_str": "1.1.0", "description": "", "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 12807894, "num_examples": 49401, "dataset_name": "pawsx"}, "test": {"name": "test", "num_bytes": 519043, "num_examples": 2000, "dataset_name": "pawsx"}, "validation": {"name": "validation", "num_bytes": 513223, "num_examples": 1970, "dataset_name": "pawsx"}}, "download_checksums": {"https://storage.googleapis.com/paws/pawsx/x-final.tar.gz": {"num_bytes": 30282057, "checksum": "4146db499101d66e68ae4c8ed3cf9dadecd625f44b7d8cf3d4a0fe93afc4fd9f"}}, "download_size": 30282057, "post_processing_size": null, "dataset_size": 13840160, "size_in_bytes": 44122217}, "fr": {"description": "PAWS-X, a multilingual version of PAWS (Paraphrase Adversaries from Word Scrambling) for six languages.\n\nThis dataset contains 23,659 human translated PAWS evaluation pairs and 296,406 machine\ntranslated training pairs in six typologically distinct languages: French, Spanish, German,\nChinese, Japanese, and Korean. English language is available by default. All translated\npairs are sourced from examples in PAWS-Wiki.\n\nFor further details, see the accompanying paper: PAWS-X: A Cross-lingual Adversarial Dataset\nfor Paraphrase Identification (https://arxiv.org/abs/1908.11828)\n\nNOTE: There might be some missing or wrong labels in the dataset and we have replaced them with -1.\n", "citation": "@InProceedings{pawsx2019emnlp,\n title = {{PAWS-X: A Cross-lingual Adversarial Dataset for Paraphrase Identification}},\n author = {Yang, Yinfei and Zhang, Yuan and Tar, Chris and Baldridge, Jason},\n booktitle = {Proc. of EMNLP},\n year = {2019}\n}\n", "homepage": "https://github.com/google-research-datasets/paws/tree/master/pawsx", "license": "The dataset may be freely used for any purpose, although acknowledgement of Google LLC (\"Google\") as the data source would be appreciated. The dataset is provided \"AS IS\" without any warranty, express or implied. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "sentence1": {"dtype": "string", "id": null, "_type": "Value"}, "sentence2": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["0", "1"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "pawsx", "config_name": "fr", "version": {"version_str": "1.1.0", "description": "", "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 13294805, "num_examples": 49401, "dataset_name": "pawsx"}, "test": {"name": "test", "num_bytes": 535027, "num_examples": 2000, "dataset_name": "pawsx"}, "validation": {"name": "validation", "num_bytes": 532657, "num_examples": 1990, "dataset_name": "pawsx"}}, "download_checksums": {"https://storage.googleapis.com/paws/pawsx/x-final.tar.gz": {"num_bytes": 30282057, "checksum": "4146db499101d66e68ae4c8ed3cf9dadecd625f44b7d8cf3d4a0fe93afc4fd9f"}}, "download_size": 30282057, "post_processing_size": null, "dataset_size": 14362489, "size_in_bytes": 44644546}, "ja": {"description": "PAWS-X, a multilingual version of PAWS (Paraphrase Adversaries from Word Scrambling) for six languages.\n\nThis dataset contains 23,659 human translated PAWS evaluation pairs and 296,406 machine\ntranslated training pairs in six typologically distinct languages: French, Spanish, German,\nChinese, Japanese, and Korean. English language is available by default. All translated\npairs are sourced from examples in PAWS-Wiki.\n\nFor further details, see the accompanying paper: PAWS-X: A Cross-lingual Adversarial Dataset\nfor Paraphrase Identification (https://arxiv.org/abs/1908.11828)\n\nNOTE: There might be some missing or wrong labels in the dataset and we have replaced them with -1.\n", "citation": "@InProceedings{pawsx2019emnlp,\n title = {{PAWS-X: A Cross-lingual Adversarial Dataset for Paraphrase Identification}},\n author = {Yang, Yinfei and Zhang, Yuan and Tar, Chris and Baldridge, Jason},\n booktitle = {Proc. of EMNLP},\n year = {2019}\n}\n", "homepage": "https://github.com/google-research-datasets/paws/tree/master/pawsx", "license": "The dataset may be freely used for any purpose, although acknowledgement of Google LLC (\"Google\") as the data source would be appreciated. The dataset is provided \"AS IS\" without any warranty, express or implied. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "sentence1": {"dtype": "string", "id": null, "_type": "Value"}, "sentence2": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["0", "1"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "pawsx", "config_name": "ja", "version": {"version_str": "1.1.0", "description": "", "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 15041440, "num_examples": 49401, "dataset_name": "pawsx"}, "test": {"name": "test", "num_bytes": 668636, "num_examples": 2000, "dataset_name": "pawsx"}, "validation": {"name": "validation", "num_bytes": 661770, "num_examples": 2000, "dataset_name": "pawsx"}}, "download_checksums": {"https://storage.googleapis.com/paws/pawsx/x-final.tar.gz": {"num_bytes": 30282057, "checksum": "4146db499101d66e68ae4c8ed3cf9dadecd625f44b7d8cf3d4a0fe93afc4fd9f"}}, "download_size": 30282057, "post_processing_size": null, "dataset_size": 16371846, "size_in_bytes": 46653903}, "ko": {"description": "PAWS-X, a multilingual version of PAWS (Paraphrase Adversaries from Word Scrambling) for six languages.\n\nThis dataset contains 23,659 human translated PAWS evaluation pairs and 296,406 machine\ntranslated training pairs in six typologically distinct languages: French, Spanish, German,\nChinese, Japanese, and Korean. English language is available by default. All translated\npairs are sourced from examples in PAWS-Wiki.\n\nFor further details, see the accompanying paper: PAWS-X: A Cross-lingual Adversarial Dataset\nfor Paraphrase Identification (https://arxiv.org/abs/1908.11828)\n\nNOTE: There might be some missing or wrong labels in the dataset and we have replaced them with -1.\n", "citation": "@InProceedings{pawsx2019emnlp,\n title = {{PAWS-X: A Cross-lingual Adversarial Dataset for Paraphrase Identification}},\n author = {Yang, Yinfei and Zhang, Yuan and Tar, Chris and Baldridge, Jason},\n booktitle = {Proc. of EMNLP},\n year = {2019}\n}\n", "homepage": "https://github.com/google-research-datasets/paws/tree/master/pawsx", "license": "The dataset may be freely used for any purpose, although acknowledgement of Google LLC (\"Google\") as the data source would be appreciated. The dataset is provided \"AS IS\" without any warranty, express or implied. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "sentence1": {"dtype": "string", "id": null, "_type": "Value"}, "sentence2": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["0", "1"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "pawsx", "config_name": "ko", "version": {"version_str": "1.1.0", "description": "", "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 13929684, "num_examples": 49192, "dataset_name": "pawsx"}, "test": {"name": "test", "num_bytes": 562204, "num_examples": 2000, "dataset_name": "pawsx"}, "validation": {"name": "validation", "num_bytes": 554783, "num_examples": 2000, "dataset_name": "pawsx"}}, "download_checksums": {"https://storage.googleapis.com/paws/pawsx/x-final.tar.gz": {"num_bytes": 30282057, "checksum": "4146db499101d66e68ae4c8ed3cf9dadecd625f44b7d8cf3d4a0fe93afc4fd9f"}}, "download_size": 30282057, "post_processing_size": null, "dataset_size": 15046671, "size_in_bytes": 45328728}, "zh": {"description": "PAWS-X, a multilingual version of PAWS (Paraphrase Adversaries from Word Scrambling) for six languages.\n\nThis dataset contains 23,659 human translated PAWS evaluation pairs and 296,406 machine\ntranslated training pairs in six typologically distinct languages: French, Spanish, German,\nChinese, Japanese, and Korean. English language is available by default. All translated\npairs are sourced from examples in PAWS-Wiki.\n\nFor further details, see the accompanying paper: PAWS-X: A Cross-lingual Adversarial Dataset\nfor Paraphrase Identification (https://arxiv.org/abs/1908.11828)\n\nNOTE: There might be some missing or wrong labels in the dataset and we have replaced them with -1.\n", "citation": "@InProceedings{pawsx2019emnlp,\n title = {{PAWS-X: A Cross-lingual Adversarial Dataset for Paraphrase Identification}},\n author = {Yang, Yinfei and Zhang, Yuan and Tar, Chris and Baldridge, Jason},\n booktitle = {Proc. of EMNLP},\n year = {2019}\n}\n", "homepage": "https://github.com/google-research-datasets/paws/tree/master/pawsx", "license": "The dataset may be freely used for any purpose, although acknowledgement of Google LLC (\"Google\") as the data source would be appreciated. The dataset is provided \"AS IS\" without any warranty, express or implied. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "sentence1": {"dtype": "string", "id": null, "_type": "Value"}, "sentence2": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["0", "1"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "pawsx", "config_name": "zh", "version": {"version_str": "1.1.0", "description": "", "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 10815499, "num_examples": 49401, "dataset_name": "pawsx"}, "test": {"name": "test", "num_bytes": 474634, "num_examples": 2000, "dataset_name": "pawsx"}, "validation": {"name": "validation", "num_bytes": 473116, "num_examples": 2000, "dataset_name": "pawsx"}}, "download_checksums": {"https://storage.googleapis.com/paws/pawsx/x-final.tar.gz": {"num_bytes": 30282057, "checksum": "4146db499101d66e68ae4c8ed3cf9dadecd625f44b7d8cf3d4a0fe93afc4fd9f"}}, "download_size": 30282057, "post_processing_size": null, "dataset_size": 11763249, "size_in_bytes": 42045306}}
dummy/de/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1e60a2c2c32597e6a8d6db8455f03f6778c3f7011b5f534497e0a0dcf3f070f
3
+ size 3757
dummy/en/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:722f88d670e4a9f1e47db66f871cbe0a0fe5eb4e1d9cccf35ddb7c20d57b1867
3
+ size 3801
dummy/es/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad8a1371e19f79633493e26b0f99315eff2692a0a77ff289388f8731ef9cf614
3
+ size 3933
dummy/fr/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a38376b4b8cfb4c063d0e5b0a2e39bd2e9a4ca92af8fc6b2ff6f1a46ca2a161a
3
+ size 3907
dummy/ja/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85586f4b649538a649fb2a5a919d686747f0af2d3e5e8678c0f0b381bd527acd
3
+ size 4258
dummy/ko/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f637ee0165ea801b0ca4b3209a800e4b86d9e5c1dc2544e032356cc8903fd1ea
3
+ size 4050
dummy/zh/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8aca9cc1bb31f2660631200775070ee7c35c84a0d0c6f2e0492c6222e8615103
3
+ size 3916
paws-x.py ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """PAWS-X, a multilingual version of PAWS for six languages."""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import csv
20
+ import os
21
+
22
+ import datasets
23
+
24
+
25
+ _CITATION = """\
26
+ @InProceedings{pawsx2019emnlp,
27
+ title = {{PAWS-X: A Cross-lingual Adversarial Dataset for Paraphrase Identification}},
28
+ author = {Yang, Yinfei and Zhang, Yuan and Tar, Chris and Baldridge, Jason},
29
+ booktitle = {Proc. of EMNLP},
30
+ year = {2019}
31
+ }
32
+ """
33
+
34
+ _DESCRIPTION = """\
35
+ PAWS-X, a multilingual version of PAWS (Paraphrase Adversaries from Word Scrambling) for six languages.
36
+
37
+ This dataset contains 23,659 human translated PAWS evaluation pairs and 296,406 machine
38
+ translated training pairs in six typologically distinct languages: French, Spanish, German,
39
+ Chinese, Japanese, and Korean. English language is available by default. All translated
40
+ pairs are sourced from examples in PAWS-Wiki.
41
+
42
+ For further details, see the accompanying paper: PAWS-X: A Cross-lingual Adversarial Dataset
43
+ for Paraphrase Identification (https://arxiv.org/abs/1908.11828)
44
+
45
+ NOTE: There might be some missing or wrong labels in the dataset and we have replaced them with -1.
46
+ """
47
+
48
+ _HOMEPAGE = "https://github.com/google-research-datasets/paws/tree/master/pawsx"
49
+
50
+ # TODO: Add the licence for the dataset here if you can find it
51
+ _LICENSE = 'The dataset may be freely used for any purpose, although acknowledgement of Google LLC ("Google") as the data source would be appreciated. The dataset is provided "AS IS" without any warranty, express or implied. Google disclaims all liability for any damages, direct or indirect, resulting from the use of the dataset.'
52
+
53
+ # TODO: Add link to the official dataset URLs here
54
+ # The HuggingFace dataset library don't host the datasets but only point to the original files
55
+ # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
56
+ _DATA_OPTIONS = [
57
+ "en",
58
+ "de",
59
+ "es",
60
+ "fr",
61
+ "ja",
62
+ "ko",
63
+ "zh",
64
+ ]
65
+
66
+ _DATA_URL = "https://storage.googleapis.com/paws/pawsx/x-final.tar.gz"
67
+
68
+
69
+ class PAWSXConfig(datasets.BuilderConfig):
70
+ """BuilderConfig for PAWSX."""
71
+
72
+ def __init__(self, **kwargs):
73
+ """Constructs a PAWSXConfig.
74
+ Args:
75
+ **kwargs: keyword arguments forwarded to super.
76
+ """
77
+ super(PAWSXConfig, self).__init__(version=datasets.Version("1.1.0", ""), **kwargs),
78
+
79
+
80
+ class PAWSX(datasets.GeneratorBasedBuilder):
81
+ """PAWS-X, a multilingual version of PAWS for six languages."""
82
+
83
+ VERSION = datasets.Version("1.1.0")
84
+
85
+ BUILDER_CONFIGS = [
86
+ PAWSXConfig(
87
+ name=config_name,
88
+ description=(f"This config contains samples in {config_name}."),
89
+ )
90
+ for config_name in _DATA_OPTIONS
91
+ ]
92
+
93
+ def _info(self):
94
+ features = datasets.Features(
95
+ {
96
+ "id": datasets.Value("int32"),
97
+ "sentence1": datasets.Value("string"),
98
+ "sentence2": datasets.Value("string"),
99
+ "label": datasets.features.ClassLabel(names=["0", "1"]),
100
+ }
101
+ )
102
+ return datasets.DatasetInfo(
103
+ # This is the description that will appear on the datasets page.
104
+ description=_DESCRIPTION,
105
+ # This defines the different columns of the dataset and their types
106
+ features=features, # Here we define them above because they are different between the two configurations
107
+ # If there's a common (input, target) tuple from the features,
108
+ # specify them here. They'll be used if as_supervised=True in
109
+ # builder.as_dataset.
110
+ supervised_keys=None,
111
+ # Homepage of the dataset for documentation
112
+ homepage=_HOMEPAGE,
113
+ # License for the dataset if available
114
+ license=_LICENSE,
115
+ # Citation for the dataset
116
+ citation=_CITATION,
117
+ )
118
+
119
+ def _split_generators(self, dl_manager):
120
+ """Returns SplitGenerators."""
121
+
122
+ data_dir = dl_manager.download_and_extract(_DATA_URL)
123
+
124
+ _TEST_FILE_NAME = os.path.join(data_dir, f"x-final/{self.config.name}/test_2k.tsv")
125
+ _VAL_FILE_NAME = os.path.join(data_dir, f"x-final/{self.config.name}/dev_2k.tsv")
126
+
127
+ if self.config.name == "en":
128
+ _TRAIN_FILE_NAME = os.path.join(data_dir, f"x-final/{self.config.name}/train.tsv")
129
+ else:
130
+ _TRAIN_FILE_NAME = os.path.join(data_dir, f"x-final/{self.config.name}/translated_train.tsv")
131
+
132
+ return [
133
+ datasets.SplitGenerator(
134
+ name=datasets.Split.TRAIN,
135
+ # These kwargs will be passed to _generate_examples
136
+ gen_kwargs={
137
+ "filepath": _TRAIN_FILE_NAME,
138
+ "split": datasets.Split.TRAIN,
139
+ },
140
+ ),
141
+ datasets.SplitGenerator(
142
+ name=datasets.Split.TEST,
143
+ # These kwargs will be passed to _generate_examples
144
+ gen_kwargs={
145
+ "filepath": _TEST_FILE_NAME,
146
+ "split": datasets.Split.TEST,
147
+ },
148
+ ),
149
+ datasets.SplitGenerator(
150
+ name=datasets.Split.VALIDATION,
151
+ # These kwargs will be passed to _generate_examples
152
+ gen_kwargs={
153
+ "filepath": _VAL_FILE_NAME,
154
+ "split": datasets.Split.VALIDATION,
155
+ },
156
+ ),
157
+ ]
158
+
159
+ def _generate_examples(self, filepath, split):
160
+ """ Yields examples. """
161
+
162
+ with open(filepath, encoding="utf-8") as f:
163
+ data = csv.DictReader(f, delimiter="\t")
164
+ for id_, row in enumerate(data):
165
+ if row["label"] not in ["0", "1"]:
166
+ row["label"] = -1
167
+ yield id_, {
168
+ "id": row["id"],
169
+ "sentence1": row["sentence1"],
170
+ "sentence2": row["sentence2"],
171
+ "label": row["label"],
172
+ }