CircularBalls commited on
Commit
c604969
·
verified ·
1 Parent(s): 0dab479

Initialize Plaincode CNL dataset card

Browse files
Files changed (1) hide show
  1. README.md +158 -0
README.md ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: Plaincode CNL 100k
3
+ language:
4
+ - code
5
+ - en
6
+ - es
7
+ - fr
8
+ - pt
9
+ - zh
10
+ - hi
11
+ tags:
12
+ - code
13
+ - python
14
+ - plaincode
15
+ - controlled-natural-language
16
+ - semantic-roundtrip
17
+ size_categories:
18
+ - 100K<n<1M
19
+ configs:
20
+ - config_name: default
21
+ data_files:
22
+ - split: train
23
+ path: data/train-*.jsonl.gz
24
+ ---
25
+
26
+ # Plaincode CNL 100k
27
+
28
+ This dataset is generated with Plaincode by streaming Python source files, projecting each accepted Python module/function into the current controlled-natural-language surfaces, and enforcing strict exact Python roundtrip proof for every emitted language.
29
+
30
+ ## Included surfaces
31
+
32
+ - Python source
33
+ - English CNL (`en`)
34
+ - Spanish CNL (`es`)
35
+ - French CNL (`fr`)
36
+ - Portuguese CNL (`pt`)
37
+ - Mandarin CNL (`zh`)
38
+ - Hindi CNL (`hi`)
39
+
40
+ ## Acceptance gate
41
+
42
+ A row is accepted only when every requested CNL surface reverses back to the exact original Python bytes through Plaincode proof:
43
+
44
+ - `sha_exact_ok == true`
45
+ - `char_exact_ok == true`
46
+ - `byte_exact_ok == true`
47
+ - `exact_ok == true`
48
+ - `reverse_ast_ok == true`
49
+ - `reverse_compile_ok == true`
50
+
51
+ The public CNL fields must not contain private CST/proof transport markers.
52
+
53
+ ## Schema
54
+
55
+ Each row contains:
56
+
57
+ - `row_id`
58
+ - `source`: Python code, sha256, counts, compile status, and source metadata
59
+ - `plaincode_cnl`: `{lang: cnl_text}` for `en/es/fr/pt/zh/hi`
60
+ - `roundtrip_python`: `{lang: recovered_python}`
61
+ - `proof`: strict proof dictionary per language
62
+ - `strict_exact_by_language`
63
+ - `semantic_family`: AST-derived tags for diversity inspection
64
+ - `row_sha256`
65
+
66
+ ## Generation stats
67
+
68
+ ```json
69
+ {
70
+ "accepted_rows": 0,
71
+ "completed_shards": [],
72
+ "duplicates": 0,
73
+ "family_counts": {},
74
+ "filter_reasons": {},
75
+ "filtered_candidates": 0,
76
+ "hf_repo_id": "CircularBalls/plaincode-cnl-100k",
77
+ "languages": [
78
+ "en",
79
+ "es",
80
+ "fr",
81
+ "pt",
82
+ "zh",
83
+ "hi"
84
+ ],
85
+ "projection_failures": 0,
86
+ "run_id": "run_20260528_214053_utc",
87
+ "seen_candidates": 0,
88
+ "shards_completed": 0,
89
+ "source_label_counts": {},
90
+ "source_specs": [
91
+ {
92
+ "config": "Python-mit",
93
+ "dataset": "codeparrot/github-code-clean",
94
+ "enabled": true,
95
+ "label": "github_code_clean_python_mit",
96
+ "split": "train",
97
+ "trust_remote_code": false,
98
+ "weight": 4
99
+ },
100
+ {
101
+ "config": "Python-apache-2.0",
102
+ "dataset": "codeparrot/github-code-clean",
103
+ "enabled": true,
104
+ "label": "github_code_clean_python_apache_2_0",
105
+ "split": "train",
106
+ "trust_remote_code": false,
107
+ "weight": 3
108
+ },
109
+ {
110
+ "config": "Python-bsd-3-clause",
111
+ "dataset": "codeparrot/github-code-clean",
112
+ "enabled": true,
113
+ "label": "github_code_clean_python_bsd_3",
114
+ "split": "train",
115
+ "trust_remote_code": false,
116
+ "weight": 2
117
+ },
118
+ {
119
+ "config": "Python-bsd-2-clause",
120
+ "dataset": "codeparrot/github-code-clean",
121
+ "enabled": true,
122
+ "label": "github_code_clean_python_bsd_2",
123
+ "split": "train",
124
+ "trust_remote_code": false,
125
+ "weight": 2
126
+ },
127
+ {
128
+ "config": "Python-isc",
129
+ "dataset": "codeparrot/github-code-clean",
130
+ "enabled": true,
131
+ "label": "github_code_clean_python_isc",
132
+ "split": "train",
133
+ "trust_remote_code": false,
134
+ "weight": 1
135
+ },
136
+ {
137
+ "config": "Python-cc0-1.0",
138
+ "dataset": "codeparrot/github-code-clean",
139
+ "enabled": true,
140
+ "label": "github_code_clean_python_cc0",
141
+ "split": "train",
142
+ "trust_remote_code": false,
143
+ "weight": 1
144
+ }
145
+ ],
146
+ "started_utc": "2026-05-28T21:40:55+00:00",
147
+ "strict_gate_failures": 0,
148
+ "target_accepted_rows": 100000
149
+ }
150
+ ```
151
+
152
+ ## Intended use
153
+
154
+ Training/evaluating semantic projection, code-to-CNL, CNL-to-code, multilingual controlled-language alignment, and exact roundtrip experiments.
155
+
156
+ ## Source/license note
157
+
158
+ Rows retain source metadata where available, including license fields exposed by upstream datasets. The default generator configuration prioritizes permissive-ish Python source configs. Review upstream licenses before redistribution or commercial use.