kaushik-harsh-99 commited on
Commit
c57c7da
·
verified ·
1 Parent(s): 0c1c094

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +161 -0
README.md CHANGED
@@ -1,3 +1,164 @@
1
  ---
 
 
 
2
  license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+
5
  license: mit
6
+
7
+ task_categories:
8
+ - text-classification
9
+
10
+ task_ids:
11
+ - multiclass-classification
12
+
13
+ tags:
14
+ - code
15
+ - source-code
16
+ - programming-languages
17
+ - language-identification
18
+ - language-classification
19
+ - code-classification
20
+ - machine-learning
21
+ - classification
22
+ - benchmark
23
+ - code-intelligence
24
+ - software-engineering
25
+
26
+ pretty_name: Programming Language Classification Dataset
27
+
28
+ size_categories:
29
+ - 1M<n<10M
30
  ---
31
+
32
+ # Programming Language Classification Dataset
33
+
34
+ A large-scale, balanced dataset for programming language identification from source code snippets.
35
+
36
+ ## Overview
37
+
38
+ This dataset contains **1.664 million cleaned and labeled source code samples** across **16 programming languages**, specifically designed for programming language classification and identification tasks.
39
+
40
+ Unlike many code datasets that are primarily built for code generation or retrieval, this dataset was curated specifically for language classification. Significant effort was invested in deduplication, quality filtering, class balancing, and evaluation split construction to create a reliable benchmark for training and evaluating language identification models.
41
+
42
+ ### Key Features
43
+
44
+ - 1.664 million labeled samples
45
+ - 16 programming languages
46
+ - Class-balanced dataset
47
+ - Multi-stage deduplication pipeline
48
+ - Quality-filtered samples
49
+ - Fixed train/validation/test splits
50
+ - Suitable for both traditional ML and neural approaches
51
+
52
+ ## Supported Languages
53
+
54
+ | Language |
55
+ |-----------|
56
+ | Assembly |
57
+ | C |
58
+ | C++ |
59
+ | C# |
60
+ | CSS |
61
+ | Dart |
62
+ | Go |
63
+ | HTML |
64
+ | Java |
65
+ | JavaScript |
66
+ | Kotlin |
67
+ | Lua |
68
+ | Markdown |
69
+ | Python |
70
+ | Rust |
71
+ | TypeScript |
72
+
73
+ ## Dataset Statistics
74
+
75
+ | Split | Samples per Language | Total Samples |
76
+ |---------|---------:|---------:|
77
+ | Train | 100,000 | 1,600,000 |
78
+ | Validation | 2,000 | 32,000 |
79
+ | Test | 2,000 | 32,000 |
80
+ | Total | 104,000 | 1,664,000 |
81
+
82
+ The dataset is fully balanced across all languages to reduce class imbalance and evaluation bias.
83
+
84
+ ## Data Format
85
+
86
+ Samples are stored in JSONL format.
87
+
88
+ ```json
89
+ {
90
+ "content": "def hello_world():\n print('Hello World')",
91
+ "label": "Python"
92
+ }
93
+ ```
94
+
95
+ ## Source Dataset
96
+
97
+ This dataset was derived from:
98
+
99
+ https://huggingface.co/datasets/lumees/github-code-2025-language-split
100
+
101
+ The original dataset was language-separated and used as the foundation for further processing, cleaning, filtering, balancing, and dataset construction.
102
+
103
+ ## Dataset Construction Pipeline
104
+
105
+ The dataset was created through a multi-stage processing pipeline.
106
+
107
+ ### 1. Language-Based Collection
108
+
109
+ Source code was collected from the source dataset and organized by programming language.
110
+
111
+ ### 2. Code Chunk Generation
112
+
113
+ Large source files were segmented into smaller code snippets suitable for language classification tasks.
114
+
115
+ This increases sample diversity while making training more efficient.
116
+
117
+ ### 3. Multi-Stage Deduplication
118
+
119
+ Several rounds of deduplication were applied to reduce repeated and near-duplicate code fragments.
120
+
121
+ The objective was to improve diversity and reduce memorization of highly repetitive samples.
122
+
123
+ ### 4. Quality Filtering
124
+
125
+ A custom filtering pipeline was applied to remove low-quality samples.
126
+
127
+ Filtering stages included:
128
+
129
+ - Low-information sample detection
130
+ - Repetitive content removal
131
+ - Character distribution analysis
132
+ - Symbol-density analysis
133
+ - Structural code heuristics
134
+ - Corrupted fragment removal
135
+
136
+ Conservative filtering thresholds were intentionally used to preserve valid code across languages with very different syntactic structures such as Assembly, CSS, HTML, Markdown, and Python.
137
+
138
+ ### 5. Balanced Sampling
139
+
140
+ Many languages originally contained substantially different numbers of samples.
141
+
142
+ To prevent majority-language bias, a balanced subset was created for every language.
143
+
144
+ Each language contributes exactly:
145
+
146
+ - 100,000 training samples
147
+ - 2,000 validation samples
148
+ - 2,000 test samples
149
+
150
+ ### 6. Split Construction
151
+
152
+ Validation and test sets were sampled independently for each language to ensure balanced and reliable evaluation.
153
+
154
+ ## Design Goals
155
+
156
+ The dataset was built with the following objectives:
157
+
158
+ - Balanced language representation
159
+ - Reduced duplication
160
+ - High sample diversity
161
+ - Reliable evaluation splits
162
+ - Efficient classifier training
163
+ - Support for both classical ML and neural approaches
164
+