license:mit size_categories:n<1K format:csv modality:text library:datasets library:pandas library:mlcroissant library:polars region:us infinite-dataset-hub synthetic
---
license: mit
tags:
- infinite-dataset-hub
- synthetic
---

# CodeComparative

tags: Python, Java, HTML, Code Identifier, Classification

_Note: This is an AI-generated dataset so its content may be inaccurate or false_

**Dataset Description:**

The 'CodeComparative' dataset comprises various code snippets in Python, Java, and HTML, alongside a label indicating the primary programming language used. The dataset is designed for classification tasks to identify and categorize the primary language of a given code snippet.


**CSV Content Preview:**

```csv

snippet,labels

"print('Hello, World!')",Python

"public class HelloWorld {",Java

"<html><body><h1>Hello, World!</h1></body></html>",HTML

"import sys;",Python

"System.out.println('Hello, World!');",Java

"<script>alert('Hello, World!');</script>",HTML

"class Main { public static void main(String[] args) { System.out.println('Hello, World!'); }}",Java

"def main():",Python

"print('Hello, World!')",Python

```

**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=CodeComparative&tags=Python,+Java,+HTML,+Code+Identifier,+Classification
- **Model**: https://huggingface.co/microsoft/Phi-3-mini-4k-instruct
- **More Datasets**: https://huggingface.co/datasets?other=infinite-dataset-hub
