File size: 10,235 Bytes
d2e8b37 793ba01 d2e8b37 793ba01 d2e8b37 2ddf24d d2e8b37 2ddf24d d2e8b37 2ddf24d 793ba01 2ddf24d d2e8b37 793ba01 2ddf24d d2e8b37 | 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 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | ---
pretty_name: Plaincode CNL 100k
language:
- code
- en
- es
- fr
- pt
- zh
- hi
tags:
- code
- python
- plaincode
- controlled-natural-language
- semantic-roundtrip
size_categories:
- 100K<n<1M
configs:
- config_name: default
data_files:
- split: train
path: data/train-*.jsonl.gz
---
# Plaincode CNL 100k
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. The public row schema is one language per row: one accepted Python source emits sibling rows for en/es/fr/pt/zh/hi linked by python_source_id.
## Included surfaces
- Python source
- English CNL (`en`)
- Spanish CNL (`es`)
- French CNL (`fr`)
- Portuguese CNL (`pt`)
- Mandarin CNL (`zh`)
- Hindi CNL (`hi`)
## Acceptance gate
A row is accepted only when every requested CNL surface reverses back to the exact original Python bytes through Plaincode proof:
- `sha_exact_ok == true`
- `char_exact_ok == true`
- `byte_exact_ok == true`
- `exact_ok == true`
- `reverse_ast_ok == true`
- `reverse_compile_ok == true`
The public CNL fields must not contain private CST/proof transport markers.
## Schema
Each row is ordered for readability and training use:
1. `source_code`: the original Python source, first in the JSON object
2. `cnl`: `{"language": "en/es/fr/pt/zh/hi", "text": "..."}`
3. `ids`: row/source/run IDs linking sibling rows from the same Python source
4. `cnl_siblings`: sibling language list/count and all-language strictness flag
5. `roundtrip`, `proof`, `strict_exact`: reverse/proof data
6. `source_stats`, `source_metadata`, `semantic_family`, `engine`, `row_sha256`: inspection metadata at the bottom
The data shard writer preserves JSON key order. It does not sort keys alphabetically.
## Generation stats
```json
{
"accepted_python_sources": 5756,
"accepted_rows": 5756,
"completed": false,
"completed_shards": [
"train-00000.jsonl.gz",
"train-00001.jsonl.gz"
],
"duplicates": 0,
"emitted_language_rows": 34536,
"family_counts": {
"async": 62,
"classes": 2997,
"comprehensions": 950,
"context_managers": 678,
"exceptions": 1488,
"functions": 4439,
"generators": 216,
"imports": 5286,
"lambda": 357,
"loops": 2202,
"simple_module": 124
},
"filter_reasons": {
"auto_generated": 368,
"skipped_path_pattern": 372,
"syntax_error:\"\\ \" is an invalid escape sequence. Did you mean \"\\\\ \"? A raw string is also an option.": 2,
"syntax_error:\"\\$\" is an invalid escape sequence. Did you mean \"\\\\$\"? A raw string is also an option.": 1,
"syntax_error:\"\\%\" is an invalid escape sequence. Did you mean \"\\\\%\"? A raw string is also an option.": 2,
"syntax_error:\"\\(\" is an invalid escape sequence. Did you mean \"\\\\(\"? A raw string is also an option.": 4,
"syntax_error:\"\\*\" is an invalid escape sequence. Did you mean \"\\\\*\"? A raw string is also an option.": 1,
"syntax_error:\"\\+\" is an invalid escape sequence. Did you mean \"\\\\+\"? A raw string is also an option.": 1,
"syntax_error:\"\\-\" is an invalid escape sequence. Did you mean \"\\\\-\"? A raw string is also an option.": 3,
"syntax_error:\"\\.\" is an invalid escape sequence. Did you mean \"\\\\.\"? A raw string is also an option.": 16,
"syntax_error:\"\\/\" is an invalid escape sequence. Did you mean \"\\\\/\"? A raw string is also an option.": 4,
"syntax_error:\"\\:\" is an invalid escape sequence. Did you mean \"\\\\:\"? A raw string is also an option.": 1,
"syntax_error:\"\\<\" is an invalid escape sequence. Did you mean \"\\\\<\"? A raw string is also an option.": 2,
"syntax_error:\"\\?\" is an invalid escape sequence. Did you mean \"\\\\?\"? A raw string is also an option.": 1,
"syntax_error:\"\\A\" is an invalid escape sequence. Did you mean \"\\\\A\"? A raw string is also an option.": 3,
"syntax_error:\"\\D\" is an invalid escape sequence. Did you mean \"\\\\D\"? A raw string is also an option.": 1,
"syntax_error:\"\\M\" is an invalid escape sequence. Did you mean \"\\\\M\"? A raw string is also an option.": 1,
"syntax_error:\"\\S\" is an invalid escape sequence. Did you mean \"\\\\S\"? A raw string is also an option.": 3,
"syntax_error:\"\\W\" is an invalid escape sequence. Did you mean \"\\\\W\"? A raw string is also an option.": 4,
"syntax_error:\"\\[\" is an invalid escape sequence. Did you mean \"\\\\[\"? A raw string is also an option.": 3,
"syntax_error:\"\\]\" is an invalid escape sequence. Did you mean \"\\\\]\"? A raw string is also an option.": 1,
"syntax_error:\"\\c\" is an invalid escape sequence. Did you mean \"\\\\c\"? A raw string is also an option.": 1,
"syntax_error:\"\\d\" is an invalid escape sequence. Did you mean \"\\\\d\"? A raw string is also an option.": 29,
"syntax_error:\"\\h\" is an invalid escape sequence. Did you mean \"\\\\h\"? A raw string is also an option.": 1,
"syntax_error:\"\\i\" is an invalid escape sequence. Did you mean \"\\\\i\"? A raw string is also an option.": 1,
"syntax_error:\"\\j\" is an invalid escape sequence. Did you mean \"\\\\j\"? A raw string is also an option.": 1,
"syntax_error:\"\\l\" is an invalid escape sequence. Did you mean \"\\\\l\"? A raw string is also an option.": 2,
"syntax_error:\"\\m\" is an invalid escape sequence. Did you mean \"\\\\m\"? A raw string is also an option.": 3,
"syntax_error:\"\\o\" is an invalid escape sequence. Did you mean \"\\\\o\"? A raw string is also an option.": 2,
"syntax_error:\"\\p\" is an invalid escape sequence. Did you mean \"\\\\p\"? A raw string is also an option.": 1,
"syntax_error:\"\\s\" is an invalid escape sequence. Did you mean \"\\\\s\"? A raw string is also an option.": 16,
"syntax_error:\"\\w\" is an invalid escape sequence. Did you mean \"\\\\w\"? A raw string is also an option.": 13,
"syntax_error:\"\\y\" is an invalid escape sequence. Did you mean \"\\\\y\"? A raw string is also an option.": 1,
"syntax_error:\"\\|\" is an invalid escape sequence. Did you mean \"\\\\|\"? A raw string is also an option.": 2,
"syntax_error:\"is not\" with 'int' literal. Did you mean \"!=\"?": 3,
"syntax_error:\"is not\" with 'str' literal. Did you mean \"!=\"?": 3,
"syntax_error:\"is\" with 'int' literal. Did you mean \"==\"?": 7,
"syntax_error:\"is\" with 'str' literal. Did you mean \"==\"?": 8,
"syntax_error:'(' was never closed": 19,
"syntax_error:'bool' object is not callable; perhaps you missed a comma?": 1,
"syntax_error:'break' in a 'finally' block": 1,
"syntax_error:'return' in a 'finally' block": 7,
"syntax_error:'return' outside function": 1,
"syntax_error:'u' and 'r' prefixes are incompatible": 5,
"syntax_error:'yield from' inside async function": 1,
"syntax_error:Expected one or more names after 'import'": 1,
"syntax_error:Function parameters cannot be parenthesized": 4,
"syntax_error:Lambda expression parameters cannot be parenthesized": 1,
"syntax_error:Missing parentheses in call to 'exec'. Did you mean exec(...)?": 1,
"syntax_error:Missing parentheses in call to 'print'. Did you mean print(...)?": 696,
"syntax_error:expected ':'": 5,
"syntax_error:expected an indented block after class definition on line 5": 1,
"syntax_error:expected an indented block after function definition on line 13": 1,
"syntax_error:expected an indented block after function definition on line 25": 1,
"syntax_error:inconsistent use of tabs and spaces in indentation": 28,
"syntax_error:invalid character '…' (U+2026)": 1,
"syntax_error:invalid decimal literal": 12,
"syntax_error:invalid hexadecimal literal": 3,
"syntax_error:invalid non-printable character U+00A0": 1,
"syntax_error:invalid syntax": 62,
"syntax_error:invalid syntax. Perhaps you forgot a comma?": 5,
"syntax_error:leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers": 8,
"syntax_error:unexpected indent": 7,
"syntax_error:unindent does not match any outer indentation level": 1,
"syntax_error:unmatched ')'": 4,
"syntax_error:unmatched '}'": 1,
"syntax_error:unterminated string literal (detected at line 116)": 1,
"syntax_error:unterminated triple-quoted string literal (detected at line 19)": 1,
"syntax_error:unterminated triple-quoted string literal (detected at line 430)": 1,
"syntax_error:unterminated triple-quoted string literal (detected at line 81)": 1,
"too_large": 534,
"too_many_ast_nodes": 3,
"too_many_lines": 34,
"too_small": 162
},
"filtered_candidates": 2504,
"finished_utc": "2026-05-30T15:40:07+00:00",
"hf_repo_id": "CircularBalls/plaincode-cnl-100k-by-language",
"languages": [
"en",
"es",
"fr",
"pt",
"zh",
"hi"
],
"projection_failures": 3,
"resume_accepted_rows": 0,
"resume_skipped_accepted_rows": 0,
"resume_start_shard": 0,
"row_schema": "source-code-first-one-language-per-row-v2",
"run_id": "run_20260530_153047_utc",
"seen_candidates": 8264,
"shards_completed": 2,
"source_label_counts": {
"github_code_clean_python_mit_single": 5756
},
"source_specs": [
{
"config": "Python-mit",
"dataset": "codeparrot/github-code-clean",
"enabled": true,
"label": "github_code_clean_python_mit_single",
"split": "train",
"trust_remote_code": false,
"weight": 1
}
],
"started_utc": "2026-05-30T15:30:49+00:00",
"strict_gate_failures": 0,
"target_accepted_rows": 100000,
"updated_utc": "2026-05-30T15:40:07+00:00"
}
```
## Intended use
Training/evaluating semantic projection, code-to-CNL, CNL-to-code, multilingual controlled-language alignment, and exact roundtrip experiments.
## Source/license note
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.
|