SQuAD 2.0数据集json文件预览

SQuAD2.0是由斯坦福大学于2018年发布的一个问答数据集,在原始SQuAD基础上增加了5万余个无答案问题,用于评估模型处理不可回答问题的能力。数据集包含来自维基百科的442篇文章,13万余个问题,其中约43%的问题无答案。最高表现模型SA-NetonAlbert在2020年达到EM90.724和F193.011的分数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

数据集来源

斯坦福大学2018年发布的数据集SQuAD 2.0在SQuAD的基础上增加了50000+的unanswerable问题。
文章Know What You Don’t Know: Unanswerable Questions for SQuAD(链接:https://arxiv.org/abs/1806.03822)发表在2018 ACL。

文章给出了数据集的下载链接https://rajpurkar.github.io/SQuAD-explorer/,提供了训练集和开发集,测试集没有给出,需要在官网提交模型由平台对模型进行测试集的跑分。官网同时给出了人工表现和一些模型在测试集上的表现。
人工:Em:86.831,F1:89.452
模型:最高的EM和F1得分为2020-4-06的SA-Net on Albert的集成模型,EM:90.724和F1:93.011。

训练集统计信息

数据集以json形式给出,训练集大小40MB,开发集大小4MB。
训练数据集以json格式文件储存:
数据集的文章来源于wikipedia,包含人物、电子产品、城市、宗教等不同主题的词条文章442篇;作为问题的context片段19035个;问题共130319(有答案86821个,无答案43498个)个。

训练集数据内容示例

以训练集数据为例,对数据集的格式和内容进行简单说明。

import json
with open(data_file_path,'r',encoding='utf-8') as f:
	data = json.load(f)
print(data.keys())
'''可以得到结果dict_keys(['version', 'data'])'''
'''其中version对应数据集的版本,v2.0,data对应的训练集的测试集数据'''

测试集数据部分为列表list形式,每一个列表元素是一个字典dict对应一个文本片段和一些问题答案等。

data = data['data']
print(len(data))
'''训练数据集长度为442'''
字段描述
title标题,如:Frédéric_Chopin
paragraphs对应一些wikipedia的文章段落和基于该段落的问题、答案相关内容,格式为列表list
qas问答对相关内容同
context段落文本

数据的第一条记录下的第一个question和context如下:

dta[0]
# 得到结果如下(部分)
{'title': 'Beyoncé',
 'paragraphs': [
 				{'qas': [{'question': 'When did Beyonce start becoming popular?',
     							'id': '56be85543aeaaa14008c9063',
     					'answers': [{'text': 'in the late 1990s', 'answer_start': 269}],
     				 'is_impossible': False}]],
     						'context':'Beyoncé Giselle Knowles-Carter (/biːˈjɒnseɪ/ bee-YON-say) (born September 4, 1981) is an American singer, songwriter, record producer and actress. Born and raised in Houston, Texas, she performed in various singing and dancing competitions as a child, and rose to fame in the late 1990s as lead singer of R&B girl-group Destiny\'s Child. Managed by her father, Mathew Knowles, the group became one of the world\'s best-selling girl groups of all time. Their hiatus saw the release of Beyoncé\'s debut album, Dangerously in Love (2003), which established her as a solo artist worldwide, earned five Grammy Awards and featured the Billboard Hot 100 number-one singles "Crazy in Love" and "Baby Boy".'}
     }
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值