gsarti commited on
Commit
7a379d5
1 Parent(s): d865c72

Added dataset card

Browse files
Files changed (2) hide show
  1. README.md +157 -1
  2. mt_geneval.py +4 -4
README.md CHANGED
@@ -1,3 +1,159 @@
1
  ---
2
- license: cc-by-sa-3.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language:
5
+ - en
6
+ - it
7
+ - fr
8
+ - ar
9
+ - de
10
+ - hi
11
+ - pt
12
+ - ru
13
+ - es
14
+ language_creators:
15
+ - expert-generated
16
+ license:
17
+ - cc-by-sa-3.0
18
+ multilinguality:
19
+ - translation
20
+ pretty_name: mt_geneval
21
+ size_categories:
22
+ - 1K<n<10K
23
+ source_datasets:
24
+ - original
25
+ tags:
26
+ - gender
27
+ - constrained mt
28
+ task_categories:
29
+ - translation
30
+ task_ids: []
31
  ---
32
+
33
+ # Dataset Card for MT-GenEval
34
+
35
+ ## Table of Contents
36
+
37
+ - [Dataset Card for MT-GenEval](#dataset-card-for-mt-geneval)
38
+ - [Table of Contents](#table-of-contents)
39
+ - [Dataset Description](#dataset-description)
40
+ - [Dataset Summary](#dataset-summary)
41
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
42
+ - [Machine Translation](#machine-translation)
43
+ - [Languages](#languages)
44
+ - [Dataset Structure](#dataset-structure)
45
+ - [Data Instances](#data-instances)
46
+ - [Data Splits](#data-splits)
47
+ - [Dataset Creation](#dataset-creation)
48
+ - [Additional Information](#additional-information)
49
+ - [Dataset Curators](#dataset-curators)
50
+ - [Licensing Information](#licensing-information)
51
+ - [Citation Information](#citation-information)
52
+
53
+ ## Dataset Description
54
+
55
+ - **Repository:** [Github](https://github.com/amazon-science/machine-translation-gender-eval)
56
+ - **Paper:** [EMNLP 2022](https://arxiv.org/abs/2211.01355)
57
+ - **Point of Contact:** [Anna Currey](mailto:[email protected])
58
+
59
+ ### Dataset Summary
60
+
61
+ The MT-GenEval benchmark evaluates gender translation accuracy on English -> {Arabic, French, German, Hindi, Italian, Portuguese, Russian, Spanish}. The dataset contains individual sentences with annotations on the gendered target words, and contrastive original-invertend translations with additional preceding context.
62
+
63
+ **Disclaimer**: *The MT-GenEval benchmark was released in the EMNLP 2022 paper [MT-GenEval: A Counterfactual and Contextual Dataset for Evaluating Gender Accuracy in Machine Translation](https://arxiv.org/abs/2211.01355) by Anna Currey, Maria Nadejde, Raghavendra Pappagari, Mia Mayer, Stanislas Lauly, Xing Niu, Benjamin Hsu, and Georgiana Dinu and is hosted through Github by the [Amazon Science](https://github.com/amazon-science?type=source) organization. The dataset is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License](https://creativecommons.org/licenses/by-sa/3.0/).*
64
+
65
+ ### Supported Tasks and Leaderboards
66
+ #### Machine Translation
67
+ Refer to the [original paper](https://arxiv.org/abs/2211.01355) for additional details on gender accuracy evaluation with MT-GenEval.
68
+ ### Languages
69
+ The dataset contains source English sentences extracted from Wikipedia translated into the following languages: Arabic (`ar`), French (`fr`), German (`de`), Hindi (`hi`), Italian (`it`), Portuguese (`pt`), Russian (`ru`), and Spanish (`es`).
70
+ ## Dataset Structure
71
+ ### Data Instances
72
+
73
+ The dataset contains two configuration types, `sentences` and `context`, mirroring the original repository structure, with source and target language specified in the configuration name (e.g. `sentences_en_ar`, `context_en_it`) The `sentences` configurations contains masculine and feminine versions of individual sentences with gendered word annotations. Here is an example entry of the `sentences_en_it` split (all `sentences_en_XX` splits have the same structure):
74
+
75
+ ```json
76
+ {
77
+ {
78
+ "orig_id": 0,
79
+ "source_feminine": "Pagratidis quickly recanted her confession, claiming she was psychologically pressured and beaten, and until the moment of her execution, she remained firm in her innocence.",
80
+ "reference_feminine": "Pagratidis subito ritrattò la sua confessione, affermando che era aveva subito pressioni psicologiche e era stata picchiata, e fino al momento della sua esecuzione, rimase ferma sulla sua innocenza.",
81
+ "source_masculine": "Pagratidis quickly recanted his confession, claiming he was psychologically pressured and beaten, and until the moment of his execution, he remained firm in his innocence.",
82
+ "reference_masculine": "Pagratidis subito ritrattò la sua confessione, affermando che era aveva subito pressioni psicologiche e era stato picchiato, e fino al momento della sua esecuzione, rimase fermo sulla sua innocenza.",
83
+ "source_feminine_annotated": "Pagratidis quickly recanted <F>her</F> confession, claiming <F>she</F> was psychologically pressured and beaten, and until the moment of <F>her</F> execution, <F>she</F> remained firm in <F>her</F> innocence.",
84
+ "reference_feminine_annotated": "Pagratidis subito ritrattò la sua confessione, affermando che era aveva subito pressioni psicologiche e era <F>stata picchiata</F>, e fino al momento della sua esecuzione, rimase <F>ferma</F> sulla sua innocenza.",
85
+ "source_masculine_annotated": "Pagratidis quickly recanted <M>his</M> confession, claiming <M>he</M> was psychologically pressured and beaten, and until the moment of <M>his</M> execution, <M>he</M> remained firm in <M>his</M> innocence.",
86
+ "reference_masculine_annotated": "Pagratidis subito ritrattò la sua confessione, affermando che era aveva subito pressioni psicologiche e era <M>stato picchiato</M>, e fino al momento della sua esecuzione, rimase <M>fermo</M> sulla sua innocenza.",
87
+ "source_feminine_keywords": "her;she;her;she;her",
88
+ "reference_feminine_keywords": "stata picchiata;ferma",
89
+ "source_masculine_keywords": "his;he;his;he;his",
90
+ "reference_masculine_keywords": "stato picchiato;fermo",
91
+ }
92
+ }
93
+ ```
94
+
95
+ The `context` configuration contains instead different English sources related to stereotypical professional roles with additional preceding context and contrastive original-inverted translations. Here is an example entry of the `context_en_it` split (all `context_en_XX` splits have the same structure):
96
+
97
+ ```json
98
+ {
99
+ "orig_id": 0,
100
+ "context": "Pierpont told of entering and holding up the bank and then fleeing to Fort Wayne, where the loot was divided between him and three others.",
101
+ "source": "However, Pierpont stated that Skeer was the planner of the robbery.",
102
+ "reference_original": "Comunque, Pierpont disse che Skeer era il pianificatore della rapina.",
103
+ "reference_flipped": "Comunque, Pierpont disse che Skeer era la pianificatrice della rapina."
104
+ }
105
+ ```
106
+
107
+ ### Data Splits
108
+
109
+ All `sentences_en_XX` configurations have 1200 examples in the `train` split and 300 in the `test` split. For the `context_en_XX` configurations, the number of example depends on the language pair:
110
+
111
+ | Configuration | # Train | # Test |
112
+ | :-----------: | :--------: | :-----: |
113
+ | `context_en_ar` | 792 | 1100 |
114
+ | `context_en_fr` | 477 | 1099 |
115
+ | `context_en_de` | 598 | 1100 |
116
+ | `context_en_hi` | 397 | 1098 |
117
+ | `context_en_it` | 465 | 1904 |
118
+ | `context_en_pt` | 574 | 1089 |
119
+ | `context_en_ru` | 583 | 1100 |
120
+ | `context_en_es` | 534 | 1096 |
121
+
122
+ ### Dataset Creation
123
+
124
+ From the original paper:
125
+
126
+ >In developing MT-GenEval, our goal was to create a realistic, gender-balanced dataset that naturally incorporates a diverse range of gender phenomena. To this end, we extracted English source sentences from Wikipedia as the basis for our dataset. We automatically pre-selected relevant sentences using EN gender-referring words based on the list provided by [Zhao et al. (2018)](https://doi.org/10.18653/v1/N18-2003).
127
+
128
+ Please refer to the original article [MT-GenEval: A Counterfactual and Contextual Dataset for Evaluating Gender Accuracy in Machine Translation](https://arxiv.org/abs/2211.01355) for additional information on dataset creation.
129
+
130
+ ## Additional Information
131
+ ### Dataset Curators
132
+
133
+ The original authors of MT-GenEval are the curators of the original dataset. For problems or updates on this 🤗 Datasets version, please contact [[email protected]](mailto:[email protected]).
134
+
135
+ ### Licensing Information
136
+
137
+ The dataset is licensed under the [Creative Commons Attribution-ShareAlike 3.0 International License](https://creativecommons.org/licenses/by-sa/3.0/).
138
+
139
+ ### Citation Information
140
+ Please cite the authors if you use these corpora in your work.
141
+
142
+ ```bibtex
143
+ @inproceedings{currey-etal-2022-mtgeneval,
144
+ title = "{MT-GenEval}: {A} Counterfactual and Contextual Dataset for Evaluating Gender Accuracy in Machine Translation",
145
+ author = "Currey, Anna and
146
+ Nadejde, Maria and
147
+ Pappagari, Raghavendra and
148
+ Mayer, Mia and
149
+ Lauly, Stanislas, and
150
+ Niu, Xing and
151
+ Hsu, Benjamin and
152
+ Dinu, Georgiana",
153
+ booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
154
+ month = dec,
155
+ year = "2022",
156
+ publisher = "Association for Computational Linguistics",
157
+ url = "https://arxiv.org/abs/2211.01355",
158
+ }
159
+ ```
mt_geneval.py CHANGED
@@ -211,10 +211,10 @@ class WmtVat(datasets.GeneratorBasedBuilder):
211
  "reference_feminine_annotated": rfa,
212
  "source_masculine_annotated": sma,
213
  "reference_masculine_annotated": rma,
214
- "source_feminine_keywords": sfk,
215
- "reference_feminine_keywords": rfk,
216
- "source_masculine_keywords": smk,
217
- "reference_masculine_keywords": rmk
218
  }
219
  else:
220
  with open(filepaths["2to1"]) as f:
 
211
  "reference_feminine_annotated": rfa,
212
  "source_masculine_annotated": sma,
213
  "reference_masculine_annotated": rma,
214
+ "source_feminine_keywords": ";".join(sfk),
215
+ "reference_feminine_keywords": ";".join(rfk),
216
+ "source_masculine_keywords": ";".join(smk),
217
+ "reference_masculine_keywords": ";".join(rmk)
218
  }
219
  else:
220
  with open(filepaths["2to1"]) as f: