Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,90 @@
|
|
| 1 |
---
|
| 2 |
license: openmdw-1.1
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: openmdw-1.1
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pretty_name: S
|
| 6 |
---
|
| 7 |
+
|
| 8 |
+
# Code Syntax Dataset (S)
|
| 9 |
+
|
| 10 |
+
A large-scale, high‑quality dataset for teaching large language models to identify and correct common syntax errors across **30+ programming languages**.
|
| 11 |
+
Contains **500,000+ unique examples** (≈110 MB) with English explanations – no artificial padding.
|
| 12 |
+
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
## 📊 Dataset Format
|
| 16 |
+
|
| 17 |
+
The dataset is provided as a **single CSV file** with the following columns:
|
| 18 |
+
|
| 19 |
+
| Column | Type | Description |
|
| 20 |
+
|--------|------|-------------|
|
| 21 |
+
| `wrong_code` | string | Code snippet containing a syntax error |
|
| 22 |
+
| `correct_code` | string | The corrected version of the same snippet |
|
| 23 |
+
| `explanation` | string | Concise, plain‑English explanation of the mistake and fix |
|
| 24 |
+
| `language` | string | Programming language (e.g., `Python`, `JavaScript`, `Rust`) |
|
| 25 |
+
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
## 🧠 Languages Covered
|
| 29 |
+
|
| 30 |
+
The dataset includes examples from **30+ languages** and technologies:
|
| 31 |
+
|
| 32 |
+
| Category | Languages |
|
| 33 |
+
|----------|-----------|
|
| 34 |
+
| **General‑purpose** | Python, JavaScript, TypeScript, Java, C#, C++, Rust, Go, Ruby, PHP, Perl, Swift, Kotlin, R, MATLAB |
|
| 35 |
+
| **Web** | HTML, CSS |
|
| 36 |
+
| **Database** | SQL (MySQL/PostgreSQL‑style) |
|
| 37 |
+
| **Shell / Scripting** | Bash, PowerShell |
|
| 38 |
+
| **Markup / Config** | YAML, JSON, XML, Markdown |
|
| 39 |
+
| **Backend / Node.js** | Express, fs, JWT, bcrypt, Mongoose |
|
| 40 |
+
|
| 41 |
+
---
|
| 42 |
+
|
| 43 |
+
## 💡 Example Entries
|
| 44 |
+
|
| 45 |
+
Here are a few sample rows to illustrate the dataset content:
|
| 46 |
+
|
| 47 |
+
| wrong_code | correct_code | explanation | language |
|
| 48 |
+
|------------|--------------|-------------|----------|
|
| 49 |
+
| `if x > 5\n print('hello')` | `if x > 5:\n print('hello')` | Colon missing after if. | Python |
|
| 50 |
+
| `console.log('world'` | `console.log('world')` | Close parenthesis. | JavaScript |
|
| 51 |
+
| `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 |
|
| 52 |
+
| `SELECT name age FROM users;` | `SELECT name, age FROM users;` | Missing comma between columns. | SQL |
|
| 53 |
+
|
| 54 |
+
Each example is **unique** – variable names, numbers, and string values are randomised, ensuring a wide variety of patterns for robust model training.
|
| 55 |
+
|
| 56 |
+
---
|
| 57 |
+
|
| 58 |
+
## 🎯 Use Cases
|
| 59 |
+
|
| 60 |
+
- **Fine‑tuning LLMs** – train models to correct erroneous code or to generate correct code from buggy input.
|
| 61 |
+
- **Building code‑review assistants** – create tools that automatically detect and suggest fixes for common syntax mistakes.
|
| 62 |
+
- **Educational materials** – use the dataset as a large, searchable bank of common programming pitfalls.
|
| 63 |
+
- **Benchmarking** – evaluate how well models understand language‑specific syntax rules.
|
| 64 |
+
|
| 65 |
+
---
|
| 66 |
+
|
| 67 |
+
## 📈 Dataset Statistics
|
| 68 |
+
|
| 69 |
+
| Metric | Value |
|
| 70 |
+
|--------|-------|
|
| 71 |
+
| Total rows | ~500,000 – 550,000 |
|
| 72 |
+
| File size | ≈110 MB (uncompressed CSV) |
|
| 73 |
+
| Languages | 30+ |
|
| 74 |
+
| Unique templates | 130+ error patterns, each parameterised with random values |
|
| 75 |
+
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
+
## 📄 License
|
| 79 |
+
|
| 80 |
+
This dataset is released under the **Open Metadata License (OpenMDW v1.1)** – you are free to use, modify, and distribute it for any purpose, subject to the terms of that license.
|
| 81 |
+
|
| 82 |
+
---
|
| 83 |
+
|
| 84 |
+
## 🙋 Contributions & Feedback
|
| 85 |
+
|
| 86 |
+
If you have suggestions for additional languages, error patterns, or improvements, feel free to reach out or open an issue. We welcome contributions to make this dataset even more comprehensive.
|
| 87 |
+
|
| 88 |
+
---
|
| 89 |
+
|
| 90 |
+
**Happy training!** 🚀
|