BUG
收藏BUG Dataset
概述
BUG数据集是一个大规模性别偏见数据集,用于共指消解和机器翻译(Levy et al., Findings of EMNLP 2021)。该数据集从不同的真实世界语料库中半自动收集,旨在挑战机器翻译和共指消解中的社会性别角色分配。
数据集分区
Full BUG
包含105,687个句子,每个句子中有人类实体,通过其职业和性别代词识别。
Gold BUG
包含1,717个句子,这些是经过人工验证的金质量样本。
Balanced BUG
包含25,504个句子,从Full BUG中随机抽样,以确保男性和女性实体之间以及典型和非典型性别角色分配之间的平衡。
数据集格式
数据文件夹中的每个文件都是一个csv文件,遵循以下格式:
| 列 | 标题 | 描述 |
|---|---|---|
| 1 | sentence_text | 包含人类实体的句子文本,通过其职业和性别代词识别 |
| 2 | tokens | 使用spacy分词器的词列表 |
| 3 | profession | 句子中的实体 |
| 4 | g | 句子中的代词 |
| 5 | profession_first_index | 职业在句子中的词偏移量 |
| 6 | g_first_index | 代词在句子中的词偏移量 |
| 7 | predicted gender | 由代词确定的性别(male/female) |
| 8 | stereotype | 反典型、中性、典型句子的标记(-1/0/1) |
| 9 | distance | 代词和职业之间的绝对词距离 |
| 10 | num_of_pronouns | 句子中的代词数量 |
| 11 | corpus | 句子来源的语料库 |
| 12 | data_index | 句子的查询索引 |
评估
以下是重现我们在BUG数据集上的评估的说明。
共指消解
- 从此链接下载Spanbert预测结果。
- 解压缩并将
coref_preds.jsonl放入predictions/文件夹中。 - 从
src/evaluations/运行python evaluate_coref.py --in=../../predictions/coref_preds.jsonl --out=../../visualizations/delta_s_by_dist.png。 - 这将重现共指消解评估图。
转换
CoNLL
将每个数据分区转换为CoNLL格式,运行:
python convert_to_conll.py --in=path/to/input/file --out=path/to/output/file
例如:
python convert_to_conll.py --in=../../data/gold_BUG.csv --out=./gold_bug.conll
引用
@misc{levy2021collecting, title={Collecting a Large-Scale Gender Bias Dataset for Coreference Resolution and Machine Translation}, author={Shahar Levy and Koren Lazar and Gabriel Stanovsky}, year={2021}, eprint={2109.03858}, archivePrefix={arXiv}, primaryClass={cs.CL} }



