File size: 5,475 Bytes
8b1e89d
 
 
 
 
 
 
 
 
 
 
 
 
 
727d98a
8b1e89d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
---
pretty_name: CoffeeScript Code Suite
language:
- code
license:
- mit
- apache-2.0
- bsd-2-clause
- bsd-3-clause
- isc
size_categories:
- 10K<n<100K
task_categories:
- text-generation
- translation
tags:
- code
- coffeescript
- javascript
- translation
- completion
- permissive-license
source_datasets:
- original
configs:
- config_name: default
  data_files:
  - split: train
    path: train.jsonl
  - split: validation
    path: validation.jsonl
  - split: test
    path: test.jsonl
---

# CoffeeScript Code Suite

CoffeeScript Code Suite is a public code dataset built from permissively licensed open-source CoffeeScript repositories. It is designed for three practical uses:

1. CoffeeScript domain adaptation and continued pretraining through `raw_corpus` examples.
2. CoffeeScript completion training through `completion` examples.
3. CoffeeScript and JavaScript translation training through `coffee_to_js` and `js_to_coffee` examples.

The dataset was assembled automatically from public GitHub repositories and includes both current repository snapshots and selected historical file versions from git history. Each record keeps source provenance so downstream users can audit where the code came from.

## Dataset Summary

- Name: `CoffeeScript Code Suite`
- Suggested Hub repo name: `brody/coffeescript-code-suite`
- Records: `49,491`
- Training split: `44,535`
- Validation split: `2,481`
- Test split: `2,475`
- Source repositories: `79`
- Raw candidate chunks: `14,682`
- Compilable translation chunks: `10,313`

### Record Types

- `raw_corpus`: raw CoffeeScript snippets for code-language modeling.
- `completion`: prefix-to-continuation CoffeeScript completion samples.
- `coffee_to_js`: CoffeeScript to JavaScript translation pairs.
- `js_to_coffee`: JavaScript to CoffeeScript translation pairs.

## Data Schema

Each line is a JSON object. Common fields:

```json
{
  "id": "owner/repo:path:chunk:type",
  "type": "coffee_to_js",
  "prompt": "Convert this CoffeeScript to JavaScript...\n```coffeescript\n...\n```",
  "response": "...",
  "source_lang": "CoffeeScript",
  "target_lang": "JavaScript",
  "repo": "owner/repo",
  "path": "src/example.coffee",
  "license": "MIT",
  "commit": "abcdef123456",
  "stars": 1234,
  "source_url": "https://github.com/owner/repo/blob/abcdef123456/src/example.coffee",
  "line_start": 1,
  "line_end": 42
}
```

Notes:

- `raw_corpus` records have an empty `prompt` and the CoffeeScript snippet in `response`.
- `completion` records use a CoffeeScript prefix in `prompt` and the continuation in `response`.
- Translation records contain executable source/target code pairs when compilation succeeded.

## Source Collection Policy

The dataset builder uses the following collection policy:

- public GitHub repositories only
- permissive licenses only
- current repository snapshots plus selected historical CoffeeScript file versions
- CoffeeScript files only
- vendor, build, generated, docs, demos, and example-heavy paths filtered out
- exact deduplication over normalized chunks

Accepted license families in this release:

- MIT
- Apache-2.0
- BSD-2-Clause
- BSD-3-Clause
- ISC

## Construction Process

The dataset was built with an automated pipeline that:

1. discovers public CoffeeScript repositories
2. clones repositories locally
3. extracts `.coffee` files from repository heads and git history
4. splits files into training-sized chunks
5. compiles CoffeeScript chunks to JavaScript when possible
6. creates completion and translation samples
7. removes exact duplicates
8. splits records into train, validation, and test sets

## Quality Notes

Strengths:

- source provenance is retained for every record
- dataset contains real-world CoffeeScript from multiple projects rather than synthetic-only samples
- includes both direct code modeling and translation-style supervision
- historical versions increase stylistic and temporal diversity

Limitations:

- this is an automatically generated dataset, not a hand-curated benchmark
- some projects contribute more samples than others
- `raw_corpus` and `completion` include chunks that may not compile in isolation
- translation pairs only exist for chunks that compiled successfully
- exact deduplication is applied, but near-duplicate code may still remain

## Intended Uses

Recommended uses:

- continued pretraining or domain adaptation for code models with CoffeeScript support
- SFT for CoffeeScript completion
- JavaScript/CoffeeScript translation experiments
- retrieval and evaluation experiments on legacy JavaScript ecosystem code

Less suitable uses:

- legal or security-sensitive compliance analysis
- benchmark claims about general programming ability
- direct deployment without additional filtering, evaluation, and safety review

## Split Sizes

```text
train.jsonl       44,535
validation.jsonl   2,481
test.jsonl         2,475
total             49,491
```

## Build Summary

```json
{
  "repos": 79,
  "files": 10586,
  "chunks": 14682,
  "candidates": 14682,
  "compiled_ok": 10313,
  "compile_failed": 4369,
  "examples": 49491,
  "train": 44535,
  "validation": 2481,
  "test": 2475
}
```

## Provenance

Each record contains:

- repository name
- repository-relative path
- source commit
- source URL
- license label

This makes the dataset auditable and easier to extend or prune.

## Citation

If you use this dataset, cite the dataset repository and the original upstream repositories referenced in the provenance fields.