Samip/Scotch
收藏Hugging Face2022-04-29 更新2024-03-04 收录
下载链接:
https://hf-mirror.com/datasets/Samip/Scotch
下载链接
链接失效反馈官方服务:
资源简介:
Scotch数据集包含约1900万个从GitHub开源仓库中收集的函数,这些仓库具有宽松的许可证。每个函数都有其对应的代码上下文,其中约400万个函数有对应的文档字符串。数据集包括Python、Java、Javascript和Go编程语言的函数。数据集被分为训练集、验证集和测试集,分别包含3200626、400077和400080个函数。每个函数包含多个特征,如仓库名称、函数路径、函数标识符、语言、函数字符串、文档字符串、函数URL、代码上下文和许可证信息。数据收集和处理过程涉及从GitHub仓库中筛选具有5颗星以上的仓库,使用SEART列出这些仓库,并使用基于CodeSearchNet数据集的轻量级解析器解析函数。处理过程中移除了非宽松许可证的代码,并进行了去重处理,最终得到约1900万个函数。数据集遵循MIT许可证,但收集的函数可能来自具有不同宽松许可证的仓库。
The Scotch dataset contains approximately 19 million functions collected from GitHub open-source repositories with permissive licenses. Each function is accompanied by its corresponding code context, and roughly 4 million of these functions have associated docstrings. The dataset covers functions written in four programming languages: Python, Java, Javascript, and Go. It is partitioned into training, validation, and test sets, which contain 3200626, 400077, and 400080 functions respectively. Each function includes multiple features, such as repository name, function path, function identifier, programming language, function source string, docstring, function URL, code context, and license information. The data collection and processing workflow involves filtering GitHub repositories with 5 or more stars, listing these repositories using SEART, and parsing functions with a lightweight parser based on the CodeSearchNet dataset. During processing, code with non-permissive licenses is removed, and deduplication is performed, ultimately yielding approximately 19 million functions. The dataset itself is licensed under MIT, but the collected functions may originate from repositories with different permissive licenses.
提供机构:
Samip原始信息汇总
数据集概述
Scotch数据集包含约1900万个函数,这些函数来自GitHub上具有宽松许可证的开源仓库。其中约400万个函数附带有相应的文档字符串(docstrings)。
语言
数据集中的函数涵盖以下编程语言:
- Python
- Java
- Javascript
- Go
统计信息
数据集中的函数根据是否包含文档字符串被分为三个部分:
- 训练集:3200626个函数
- 验证集:400077个函数
- 测试集:400080个函数
特征
每个函数包含以下特征:
- repository_name: 函数所属仓库的名称。
- function_path: 函数在仓库中的路径。
- function_identifier: 函数名称/标识符。
- language: 函数所使用的编程语言。
- function: 函数代码字符串。
- docstring: 函数文档字符串。
- function_url: 函数代码的URL。
- context: 函数的代码上下文。
- license: 仓库的许可证信息(仅包含具有宽松许可证的仓库)。
数据收集与处理
数据集从GitHub上拥有5个以上星标的仓库中收集,使用SEART工具列出相关仓库。函数解析基于CodeSearchNet数据集的函数解析器,并借助EleutherAI的github-downloader工具进行仓库收集。数据处理包括移除非宽松许可证的代码、执行去重、排除单行代码及非英语文档字符串的函数,以及排除包含“test”关键词的函数。
许可证
本数据集遵循MIT许可证。数据集中函数所来自的仓库可能包含多种宽松许可证,如MIT License、Apache License 2.0、BSD 3-Clause “New” or “Revised” License、BSD 2-Clause “Simplified” License和ISC License。



