pietrolesci/copa_nli
收藏Hugging Face2022-04-25 更新2024-03-04 收录
下载链接:
https://hf-mirror.com/datasets/pietrolesci/copa_nli
下载链接
链接失效反馈官方服务:
资源简介:
这是一个完整的自然语言推理(NLI)数据集,源自COPA格式,经过整理转换为NLI格式。数据集包含前提和假设两部分,以及相应的标签,标签通过编码映射为not_entailment(0)和entailment(1)。数据集通过Python脚本生成,并已上传至HuggingFace Hub。
提供机构:
pietrolesci
原始信息汇总
数据集概述
- 原始数据来源:原始数据集链接
- 当前数据集提取自:GitHub仓库链接
- 数据集类型:完整数据集
数据集整理
-
数据格式转换:
-
原始格式:
premise choice1 choice2 label My body cast a shadow over the grass The sun was rising The grass was cut 0 -
转换后的NLI格式:
premise hypothesis label My body cast a shadow over the grass The sun was rising entailment My body cast a shadow over the grass The grass was cut not_entailment
-
-
标签编码映射:
{"not_entailment": 0, "entailment": 1}
数据集生成代码
- 数据读取与合并:使用
pandas读取并合并所有数据分割。 - 标签编码:将标签映射为数字编码。
- 数据集创建:使用
datasets库创建数据集,定义特征如下:premise:字符串类型hypothesis:字符串类型label:类别标签,包含两个类别not_entailment和entailment
- 数据集上传:将数据集上传至Hugging Face Hub,命名为
copa_nli。



