infinite-dataset-hub/CodeGenreClassifier
收藏资源简介:
--- license: mit tags: - infinite-dataset-hub - synthetic --- # CodeGenreClassifier tags: Programming, Language, HTML, Code Identifier, Genre Classification _Note: This is an AI-generated dataset so its content may be inaccurate or false_ **Dataset Description:** The 'CodeGenreClassifier' dataset is designed to assist machine learning practitioners in training models for the purpose of classifying code snippets into their respective programming language genres, such as Python, Java, or HTML. Each row in the dataset represents a code snippet with a corresponding label that indicates the programming language genre it belongs to. The dataset is intended for use in natural language processing and machine learning tasks focusing on code genre classification. **CSV Content Preview:** ``` id,code_snippet,label 0,"def hello_world():\n print('Hello, world!')","Python" 1,"public class HelloWorld {\n public static void main(String[] args) {\n System.out.println('Hello, world!');\n }","Java" 2,"<!DOCTYPE html>\n<html>\n<body>\n<h1>Hello World</h1>\n</body>\n</html>","HTML" 3,"class HelloWorld:\n def __init__(self):\n self.message = 'Hello, world!'\n def greet(self):\n print(self.message)\n","Python" 4,"<script>\nfunction greet() {\n alert('Hello, world!');\n}\n</script>","HTML" ``` In this sample, we have four rows of data, with each snippet demonstrating a basic structure for 'Hello, world!' output in the specified language. The 'label' column accurately identifies the programming language genre for each snippet. This example provides a quality dataset for practitioners looking to train and evaluate machine learning models on the task of identifying the programming language of given code snippets. **Source of the data:** The dataset was generated using the [Infinite Dataset Hub](https://huggingface.co/spaces/infinite-dataset-hub/infinite-dataset-hub) and microsoft/Phi-3-mini-4k-instruct using the query 'python vs java vs html code identifier dataset': - **Dataset Generation Page**: https://huggingface.co/spaces/infinite-dataset-hub/infinite-dataset-hub?q=python+vs+java+vs+html+code+identifier+dataset&dataset=CodeGenreClassifier&tags=Programming,+Language,+HTML,+Code+Identifier,+Genre+Classification - **Model**: https://huggingface.co/microsoft/Phi-3-mini-4k-instruct - **More Datasets**: https://huggingface.co/datasets?other=infinite-dataset-hub
--- 许可证:MIT协议 标签: - 无限数据集枢纽(Infinite Dataset Hub) - 合成数据集 --- # 代码体裁分类器(CodeGenreClassifier) 标签:编程、语言、HTML、代码标识符(Code Identifier)、体裁分类(Genre Classification) **注意:本数据集由人工智能生成,其内容可能存在不准确或虚假信息** **数据集说明:** `CodeGenreClassifier` 数据集旨在帮助机器学习从业者训练模型,实现将代码片段按其所属的编程语言体裁(如Python、Java或HTML)进行分类的任务。数据集中的每一行均包含一段代码片段与对应的标签,该标签用于指明该代码片段所属的编程语言体裁。本数据集适用于聚焦代码体裁分类的自然语言处理与机器学习任务。 **CSV内容预览:** id,code_snippet,label 0,"def hello_world(): print('Hello, world!')","Python" 1,"public class HelloWorld { public static void main(String[] args) { System.out.println('Hello, world!'); }","Java" 2,"<!DOCTYPE html> <html> <body> <h1>Hello World</h1> </body> </html>","HTML" 3,"class HelloWorld: def __init__(self): self.message = 'Hello, world!' def greet(self): print(self.message) ","Python" 4,"<script> function greet() { alert('Hello, world!'); } </script>","HTML" 本示例包含4行数据,每段代码片段均展示了对应编程语言的基础「Hello, world!」输出结构。「label」列准确标注了每段代码片段所属的编程语言体裁。对于希望训练并评估用于识别给定代码片段编程语言的机器学习模型的从业者而言,本示例提供了一份高质量的数据集。 **数据集来源:** 本数据集通过[无限数据集枢纽(Infinite Dataset Hub)](https://huggingface.co/spaces/infinite-dataset-hub/infinite-dataset-hub)与Microsoft/Phi-3-mini-4k-instruct模型,基于查询指令「python vs java vs html code identifier dataset」生成: - **数据集生成页面**:https://huggingface.co/spaces/infinite-dataset-hub/infinite-dataset-hub?q=python+vs+java+vs+html+code+identifier+dataset&dataset=CodeGenreClassifier&tags=Programming,+Language,+HTML,+Code+Identifier,+Genre+Classification - **模型**:https://huggingface.co/microsoft/Phi-3-mini-4k-instruct - **更多数据集**:https://huggingface.co/datasets?other=infinite-dataset-hub



