Datasets:

Modalities:
Text
Formats:
csv
Languages:
English
License:
Gugu8's picture
Update README.md
d00e20d verified
|
Raw
History Blame Contribute Delete
3.19 kB
---
license: other
license_name: open-data-attribution-training-disclosure-license-odatl-1.0
license_link: LICENSE
language:
- en
tags:
- synthetic
- code
size_categories:
- 100M<n<1B
---
# Code-Syntax-Expanded
A **massive, high-quality synthetic dataset** for training LLMs to identify and correct syntax errors across **33 programming languages**. Contains **5+ million unique examples** (~1.1 GB) with English explanations – no artificial padding, no duplicate rows.
---
## 📊 Dataset Overview
| Property | Value |
|----------|-------|
| **Total rows** | 5,000,000+ |
| **File size** | ~1.1 GB (uncompressed CSV) |
| **Languages** | 33 |
| **Unique templates** | 160+ error patterns |
| **Format** | CSV (4 columns) |
| **License** | ODA-TL v1.0 |
---
## 📁 Dataset Structure
Each row contains:
| Column | Description |
|--------|-------------|
| `wrong_code` | Code snippet containing a syntax error |
| `correct_code` | Corrected version of the snippet |
| `explanation` | Concise English explanation of the error and fix |
| `language` | Programming language (e.g., `Python`, `JavaScript`, `Rust`) |
---
## 🧠 Languages Covered
### General Purpose
Python, JavaScript, TypeScript, Java, C#, C++, Rust, Go, Ruby, PHP, Perl, Swift, Kotlin, R, MATLAB, Scala, Lua, Dart
### Web Technologies
HTML, CSS
### Database
SQL (MySQL/PostgreSQL-style)
### Shell & Scripting
Bash, PowerShell
### Markup & Configuration
YAML, JSON, XML, Markdown
### Backend & Frameworks
Node.js (Express, fs, JWT, bcrypt, Mongoose)
---
## 📈 Dataset Statistics
| Language | Examples (approximate) | Key Error Types |
|----------|------------------------|-----------------|
| Python | 350,000+ | Missing colons, indentation, `==` vs `=`, imports |
| JavaScript | 300,000+ | Missing parentheses, `===` vs `==`, const reassignment |
| Rust | 200,000+ | Borrow checker, moves, mutable references |
| Java | 250,000+ | Semicolons, type mismatches, array bounds |
| SQL | 200,000+ | Missing commas, WHERE typos, quoting |
| HTML/CSS | 250,000+ | Nesting, self-closing tags, attribute quoting |
| Others | 3,200,000+ | Language-specific syntax rules |
---
## 🎯 Use Cases
- **Fine-tuning LLMs** for code correction and syntax repair
- **Building code review assistants** that detect common mistakes
- **Teaching programming** with a massive bank of error/fix examples
- **Benchmarking** model understanding of language-specific syntax
- **Creating educational tools** for learning programming languages
---
## 💡 Example Entries
| wrong_code | correct_code | explanation | language |
|------------|--------------|-------------|----------|
| `if x > 5\n print('hello')` | `if x > 5:\n print('hello')` | Colon missing after if. | Python |
| `console.log('world'` | `console.log('world')` | Close parenthesis. | JavaScript |
| `let mut x=5; let r1=&mut x; let r2=&mut x;` | `let mut x=5; { let r1=&mut x; } let r2=&mut x;` | Only one mutable borrow allowed. | Rust |
| `SELECT name age FROM users;` | `SELECT name, age FROM users;` | Missing comma between columns. | SQL |
| `<p>Hello <b>world!</p></b>` | `<p>Hello <b>world!</b></p>` | Improper nesting of tags. | HTML |
---