Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
汀丶人工智能 cf79c751ea | 1 year ago | |
---|---|---|
README.md | 1 year ago |
chinese-squad中文机器阅读理解数据集,本数据集通过机器翻译加人工校正的方式从原始Squad转换而来,其中包括V1.1 和V2.0。由于部分翻译无法找到原文中的答案(短答案翻译和文档翻译有出入),故数据量对比原始英文版SQuAD 有所减少。数据清洗后,125892个问题,36100个段落,不能回答的问题个数为49443。
常见的机器阅读理解任务可以分为四种类型:完形填空、多项选择、片段抽取和自由回答;本次整理的机器阅读理解数据,仅为片段抽取任务类型数据。
本数据集展示
"version": "csquad",
"data": [
{
"title": "",
"id": "csquad_paragraphs_0",
"paragraphs": [
{
"context": "在建筑上,这所学校是天主教的。在主楼的金色穹顶上是一座圣母玛利亚的金色雕像。紧靠着主楼的前面,面对着它,是一尊双臂高举的基督铜像,上面写着“威尼斯和我的天”。主楼旁边是圣心大教堂。紧跟在大教堂后面的是石窟,一个马里祈祷和思考的地方。这是法国卢尔德石窟的复制品,据说1858年圣母玛利亚在那里出现在圣伯纳黛特苏比罗斯。在主干道的尽头(通过3座雕像和金色穹顶直接连接),是一座简单的现代玛丽石像。",
"qas": [
{
"question": "据称,1858年,圣母玛利亚在法国卢尔德出现在谁的面前?",
"id": "csquad_question_0",
"is_impossible": false,
"answers": [
{
"text": "圣伯纳黛特苏比罗斯。",
"answer_start": 148
}
]
},
{
"question": "圣母院的圣心大教堂在哪座建筑旁边?",
"id": "csquad_question_1",
"is_impossible": false,
"answers": [
{
"text": "主楼",
"answer_start": 16
}
]
},
{
"question": "圣母院的石窟是什么?",
"id": "csquad_question_2",
"is_impossible": false,
"answers": [
{
"text": "马里祈祷和思考的地方",
"answer_start": 105
}
]
},
{
"question": "圣母院主楼顶上有什么?",
"id": "csquad_question_3",
"is_impossible": false,
"answers": [
{
"text": "圣母玛利亚的金色雕像",
"answer_start": 27
}
]
}
]
},
将上述数据进行简单地数据清洗以及格式(sqaud格式)转换操作,为了方便读取;具体格式如下:
def read_mrc_data(path):
with open(path, "r", encoding="utf-8") as fh:
input = json.load(fh)["data"]
for i, entry in enumerate(tqdm(input, desc="iter", disable=False)):
for para in entry["paragraphs"]:
context = para["context"]
print("context:", context)
for qa in para["qas"]:
qas_id = qa["id"]
question_text = qa["question"]
print("question_text:", question_text)
if len(qa["answers"]) != 0:
for answer in qa["answers"]:
answer_text = answer["text"]
answer_start = answer["answer_start"]
print("answer_text:", answer_text)
print("answer_start:", answer_start)
print("*"*30)
exit()
path = "data/medicine_data.json"
read_mrc_data(path)
结果:
context: "胆石症的治疗应区别不同情况分别处理,无症状胆囊结石可不作治疗,但应定期观察并注意良好的饮食习惯。有症状的胆囊结石仍以胆囊切除术为较安全有效的疗法,此外,尚可采用体外震波碎石。胆管结石宜采用以手术为主的综合治疗。胆石症的家庭治疗可采用以下方法:\n(1)一般治疗 预防和治疗肠道寄生虫病和肠道感染,以降低胆石症的发病率。胆绞痛发作期应禁食脂肪等食物,采用高碳水化合物流质饮食;缓解期应忌食富含胆固醇的食物如脑、肝、肾、蛋黄等。\n(2)增进胆汁排泄 可选用50%硫酸镁10~15毫升,餐后口服,每日3次;胆盐每次口服0.5~1克,每日3次;去氢胆酸0.25克,每日3次,餐后服用。\n(3)消除胆绞痛 轻者可卧床休息,右上腹热敷,用硝酸甘油酯0.6毫克,每3~4小时一次,含于舌下;或阿托品0.5毫克,每3~4小时肌肉注射一次。重者应住院治疗。\n(4)排石疗法以中药治疗为主,若右上腹疼痛有间歇期,无明显发热及黄疸,苔薄白,脉弦,属气滞者,用生大黄6克、木香9克、枳壳9克、金钱草30克、川楝子9克、黄苓9克,水煎服。右上腹痛为持续性,且阵发性加剧,有明显发热及黄疸,舌红苔黄,
question_text: 什么类型的胆囊结石可不作治疗?
answer_text: 无症状胆囊结
answer_start: 19
question_text: 胆石症的治疗应注意什么?
answer_text: 应区别不同情况分别处理
answer_start: 7
question_text: 胆管结石宜采用什么样的治疗方式?
answer_text: 以手术为主的综合治疗
answer_start: 95
chinese-squad中文机器阅读理解数据集,本数据集通过机器翻译加人工校正的方式从原始Squad转换而来,其中包括V1.1 和V2.0。由于部分翻译无法找到原文中的答案(短答案翻译和文档翻译有出入),故数据量对比原始英文版SQuAD 有所减少。数据清洗后,125892个问题,36100个段落,不能回答的问题个数为49443。
other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》