neulab/conala
收藏资源简介:
CoNaLa数据集是一个用于代码生成任务评估的基准数据集,包含代码和自然语言对。数据集从Stack Overflow爬取,经过自动过滤和人工标注,分为2,379个训练样本和500个测试样本。此外,还提供了一个自动挖掘的数据集,包含近60万个样本。数据集主要用于评估代码生成任务,语言为英语和Python代码。数据集结构包括两个版本:经过人工标注的版本和自动挖掘的版本,分别包含不同的字段和分割。
The CoNaLa dataset is a benchmark dataset for code generation task evaluation, comprising paired natural language and code data. It is crawled from Stack Overflow, followed by automatic filtering and manual annotation, and is split into 2,379 training samples and 500 test samples. Additionally, an automatically mined dataset containing nearly 600,000 samples is also provided. This dataset is primarily used for evaluating code generation tasks, with content consisting of English natural language and Python code. The dataset includes two versions: the manually annotated version and the automatically mined version, which feature distinct fields and data splits respectively.
数据集概述
名称: CoNaLa 类型: 代码与自然语言对数据集 目的: 用于评估代码生成任务 来源: 从Stack Overflow爬取并经过自动过滤和人工标注 数据量:
- 人工标注集: 训练集2,379条,测试集500条
- 自动挖掘集: 约593,891条
数据集结构
-
人工标注集:
- 特征: [question_id, intent, rewritten_intent, snippet]
- 训练集: 2,379条
- 测试集: 500条
-
自动挖掘集:
- 特征: [question_id, parent_answer_post_id, prob, snippet, intent, id]
- 训练集: 593,891条
数据实例
-
人工标注集:
{ question_id: 41067960, intent: How to convert a list of multiple integers into a single integer?, rewritten_intent: "Concatenate elements of a list x of multiple integers to a single integer", snippet: sum(d * 10 ** i for i, d in enumerate(x[::-1])) }
-
自动挖掘集:
{ question_id: 34705205, parent_answer_post_id: 34705233, prob: 0.8690001442846342, snippet: sorted(l, key=lambda x: (-int(x[1]), x[0])), intent: Sort a nested list by two elements, id: 34705205_34705233_0 }
数据字段
-
人工标注集:
字段 类型 描述 question_id int64 Stack Overflow问题ID intent string 自然语言意图(即Stack Overflow问题标题) rewritten_intent string 众包修订后的意图,更好地反映代码的完整含义 snippet string 实现意图的代码片段 -
自动挖掘集:
字段 类型 描述 question_id int64 Stack Overflow问题ID parent_answer_post_id int64 候选代码片段提取自的答案帖子ID intent string 自然语言意图(即Stack Overflow问题标题) snippet string 实现意图的代码片段 id string 意图/代码片段对的唯一ID prob float64 挖掘模型给出的概率
数据分割
- 人工标注集: 训练集和测试集
- 自动挖掘集: 仅训练集




