Datasets:

Modalities:
Tabular
Text
Formats:
parquet
Languages:
English
ArXiv:
Tags:
code
DOI:
Libraries:
Datasets
Dask
License:
jugalgajjar commited on
Commit
93218be
·
1 Parent(s): 713d53e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -39
README.md CHANGED
@@ -9,47 +9,47 @@ tags:
9
 
10
  ## Dataset Description
11
 
12
- This dataset contains filtered and processed code samples from 10 popular programming languages: C, C++, C#, Go, Java, JavaScript, Python, Ruby, Scala, and TypeScript. The dataset was created by filtering source code based on quality metrics, removing outliers, and standardizing the format for machine learning and code analysis applications.
13
 
14
  ### Key Features
15
 
16
  - **Cleaned and Filtered Code**: Samples have been processed to remove outliers in terms of line length and code size
17
- - **Quality Metrics**: Each sample includes metadata about average line length and line count
18
  - **Multi-language Support**: 10 programming languages represented in separate subsets
19
  - **Consistent Format**: All samples follow the same Parquet structure for easy processing
20
 
21
  ### Dataset Size
22
 
23
- The complete dataset is approximately 12GB in size. Individual language files vary in size, with the largest being C++ (2GB) and the smallest being Scala (665MB).
24
 
25
  ### Dataset Statistics
26
 
27
  | Language | Sample Count | Avg. Line Length | Avg. Line Count |
28
- |------------|--------------|-----------------|------------------|
29
- | C | 1,752,078 | 28.07 | 61.85 |
30
- | C++ | 1,769,333 | 28.16 | 87.99 |
31
- | C# | 1,763,508 | 29.53 | 44.29 |
32
- | Go | 1,751,120 | 25.18 | 68.26 |
33
- | Java | 1,779,659 | 30.84 | 54.35 |
34
- | JavaScript | 1,718,133 | 27.68 | 44.07 |
35
- | Python | 1,764,099 | 32.68 | 54.66 |
36
- | Ruby | 1,756,771 | 27.35 | 27.34 |
37
- | Scala | 952,890 | 35.30 | 44.38 |
38
- | TypeScript | 1,738,885 | 29.17 | 36.84 |
39
 
40
  ## Dataset Structure
41
 
42
  The dataset is organized with separate Parquet files for each programming language:
43
- - `c.parquet` - C language samples
44
- - `cpp.parquet` - C++ language samples
45
- - `c-sharp.parquet` - C# language samples
46
- - `go.parquet` - Go language samples
47
- - `java.parquet` - Java language samples
48
- - `javascript.parquet` - JavaScript language samples
49
- - `python.parquet` - Python language samples
50
- - `ruby.parquet` - Ruby language samples
51
- - `scala.parquet` - Scala language samples
52
- - `typescript.parquet` - TypeScript language samples
53
 
54
  Within each file, data is stored with the following schema:
55
 
@@ -58,6 +58,9 @@ Within each file, data is stored with the following schema:
58
  - code: string (the complete code content)
59
  - avg_line_length: float (average character count per line)
60
  - line_count: integer (total number of lines in the code)
 
 
 
61
  ```
62
 
63
  Each sample is stored as a row in the Parquet file with these four columns.
@@ -84,7 +87,7 @@ from datasets import load_dataset
84
 
85
  ```python
86
  dataset = load_dataset(
87
- "jugalgajjar/Filtered-StarCoder-Dataset-Mini"
88
  )
89
  ```
90
 
@@ -92,8 +95,8 @@ dataset = load_dataset(
92
 
93
  ```python
94
  dataset = load_dataset(
95
- "jugalgajjar/Filtered-StarCoder-Dataset-Mini",
96
- data_files="scala.parquet"
97
  )
98
  ```
99
 
@@ -101,8 +104,8 @@ dataset = load_dataset(
101
 
102
  ```python
103
  dataset = load_dataset(
104
- "jugalgajjar/Filtered-StarCoder-Dataset-Mini",
105
- data_files="scala.parquet",
106
  streaming=True
107
  )
108
  ```
@@ -122,9 +125,9 @@ except Exception as e:
122
 
123
  You can also manually download specific language files from the Hugging Face repository page:
124
 
125
- 1. Visit `https://huggingface.co/datasets/jugalgajjar/Filtered-StarCoder-Dataset-Mini`
126
  2. Navigate to the "Files" tab
127
- 3. Click on the language file you want to download (e.g., `python.parquet`)
128
  4. Use the download button to save the file locally
129
 
130
  ## Dataset Creation
@@ -137,13 +140,10 @@ This dataset was created through the following process:
137
  4. Samples were filtered to remove excessively long or short code examples
138
  5. Data was normalized and standardized across languages
139
  6. Metadata (average line length and line count) was calculated for each sample
140
- 7. Final data was serialized in the efficient Parquet format for optimal storage and access speed
141
-
142
- The processing pipeline included steps to:
143
- - Remove code samples with abnormal line lengths (potential formatting issues)
144
- - Filter out extremely long files (exceeding the 90th percentile)
145
- - Ensure consistent formatting and structure
146
- - Generate useful metadata for each example
147
 
148
  ## Citation
149
 
@@ -155,7 +155,7 @@ If you use this dataset in your research or project, please cite it as follows:
155
    title = {Filtered CodeStar Dataset Mini},
156
    year = {2025},
157
    publisher = {HuggingFace},
158
-   howpublished = {\url{https://huggingface.co/datasets/jugalgajjar/Filtered-StarCoder-Dataset-Mini}}
159
  }
160
  ```
161
 
 
9
 
10
  ## Dataset Description
11
 
12
+ The MultiLang Code Parser Dataset (MLCPD) is a comprehensive multi-language code dataset designed to benchmark language-agnostic AI code parsers. It currently offers a filtered version of the StarCoder dataset, parsed with language-specific parsers, with future plans to unify outputs into a standard JSON format for complete AST representation.
13
 
14
  ### Key Features
15
 
16
  - **Cleaned and Filtered Code**: Samples have been processed to remove outliers in terms of line length and code size
17
+ - **Quality Metrics**: Each sample includes metadata about average line length and line count of code along with AST node count and error count
18
  - **Multi-language Support**: 10 programming languages represented in separate subsets
19
  - **Consistent Format**: All samples follow the same Parquet structure for easy processing
20
 
21
  ### Dataset Size
22
 
23
+ The complete dataset is approximately 35GB in size. Individual language files vary in size, with the largest being C++ (5.85GB) and the smallest being Ruby (1.71GB).
24
 
25
  ### Dataset Statistics
26
 
27
  | Language | Sample Count | Avg. Line Length | Avg. Line Count |
28
+ |------------|--------------|------------------|-----------------|
29
+ | C | 700,821 | 28.08 | 61.76 |
30
+ | C++ | 707,641 | 28.16 | 87.88 |
31
+ | C# | 705,203 | 29.53 | 44.26 |
32
+ | Go | 700,331 | 25.18 | 68.22 |
33
+ | Java | 711,922 | 30.85 | 54.40 |
34
+ | JavaScript | 687,775 | 27.69 | 44.15 |
35
+ | Python | 706,126 | 32.67 | 54.70 |
36
+ | Ruby | 703,473 | 27.35 | 27.41 |
37
+ | Scala | 702,833 | 35.30 | 44.38 |
38
+ | TypeScript | 695,597 | 29.18 | 36.89 |
39
 
40
  ## Dataset Structure
41
 
42
  The dataset is organized with separate Parquet files for each programming language:
43
+ - `c_parsed_1.parquet` ... `c_parsed_4.parquet` - C language samples
44
+ - `cpp_parsed_1.parquet` ... `cpp_parsed_4.parquet` - C++ language samples
45
+ - `c_sharp_parsed_1.parquet` ... `c_sharp_parsed_4.parquet` - C# language samples
46
+ - `go_parsed_1.parquet` ... `go_parsed_4.parquet` - Go language samples
47
+ - `java_parsed_1.parquet` ... `java_parsed_4.parquet` - Java language samples
48
+ - `javascript_parsed_1.parquet` ... `javascript_parsed_4.parquet` - JavaScript language samples
49
+ - `python_parsed_1.parquet` ... `python_parsed_4.parquet` - Python language samples
50
+ - `ruby_parsed_1.parquet` ... `ruby_parsed_4.parquet` - Ruby language samples
51
+ - `scala_parsed_1.parquet` ... `scala_parsed_4.parquet` - Scala language samples
52
+ - `typescript_parsed_1.parquet` ... `typescript_parsed_4.parquet` - TypeScript language samples
53
 
54
  Within each file, data is stored with the following schema:
55
 
 
58
  - code: string (the complete code content)
59
  - avg_line_length: float (average character count per line)
60
  - line_count: integer (total number of lines in the code)
61
+ - lang_specific_parse: string (tree-sitter parsed output of the code sample)
62
+ - ast_node_count: integer (total number of nodes in the AST)
63
+ - num_errors: integer (total number of errors in the code)
64
  ```
65
 
66
  Each sample is stored as a row in the Parquet file with these four columns.
 
87
 
88
  ```python
89
  dataset = load_dataset(
90
+ "jugalgajjar/MultiLang-Code-Parser-Dataset"
91
  )
92
  ```
93
 
 
95
 
96
  ```python
97
  dataset = load_dataset(
98
+ "jugalgajjar/MultiLang-Code-Parser-Dataset",
99
+ data_files="python_parsed_1.parquet"
100
  )
101
  ```
102
 
 
104
 
105
  ```python
106
  dataset = load_dataset(
107
+ "jugalgajjar/MultiLang-Code-Parser-Dataset",
108
+ data_files="python_parsed_1.parquet",
109
  streaming=True
110
  )
111
  ```
 
125
 
126
  You can also manually download specific language files from the Hugging Face repository page:
127
 
128
+ 1. Visit `https://huggingface.co/datasets/jugalgajjar/MultiLang-Code-Parser-Dataset`
129
  2. Navigate to the "Files" tab
130
+ 3. Click on the language file you want to download (e.g., `python_parsed_1.parquet`)
131
  4. Use the download button to save the file locally
132
 
133
  ## Dataset Creation
 
140
  4. Samples were filtered to remove excessively long or short code examples
141
  5. Data was normalized and standardized across languages
142
  6. Metadata (average line length and line count) was calculated for each sample
143
+ 7. Data was serialized in the efficient Parquet format for optimal storage and access speed
144
+ 8. Code samples from each language were parsed using language-specific tree-sitter parsers
145
+ 9. Metadata (AST node count and number of errors in the code) were recorded for each sample
146
+ 10. Final data was split into four files and stored in the Parquet format
 
 
 
147
 
148
  ## Citation
149
 
 
155
    title = {Filtered CodeStar Dataset Mini},
156
    year = {2025},
157
    publisher = {HuggingFace},
158
+   howpublished = {\url{https://huggingface.co/datasets/jugalgajjar/MultiLang-Code-Parser-Dataset}}
159
  }
160
  ```
161