Datasets:
File size: 10,772 Bytes
5b0b1f1 9eb1f03 e1b8743 5b0b1f1 e1b8743 5b0b1f1 e1b8743 fe15328 9eb1f03 e1b8743 9eb1f03 e1b8743 da79e84 e1b8743 5b0b1f1 daabe6d 9eb1f03 daabe6d 9eb1f03 e1b8743 9eb1f03 daabe6d 9eb1f03 e1b8743 9eb1f03 e1b8743 9eb1f03 e1b8743 9eb1f03 5b0b1f1 9eb1f03 5b0b1f1 9eb1f03 5b0b1f1 9eb1f03 5b0b1f1 daabe6d e1b8743 daabe6d e1b8743 daabe6d e1b8743 daabe6d e1b8743 5b0b1f1 4a30124 | 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 | ---
language:
- zh
license: apache-2.0
task_categories:
- text-generation
tags:
- code
- multilingual
- legesher
- tiny-aya-expedition
- language-decoded
- native-code
- arxiv:2408.10914
- arxiv:2603.11510
- arxiv:2211.15533
- arxiv:2510.09591
- arxiv:1809.05053
- arxiv:2308.16884
- arxiv:2106.06937
- arxiv:2210.03057
pretty_name: Language Decoded — Community Code
size_categories:
- 1K<n<10K
configs:
- config_name: zh
data_files:
- split: train
path: data/zh/train-*.parquet
- split: validation
path: data/zh/validation-*.parquet
dataset_info:
- config_name: zh
features:
- name: filename
dtype: string
- name: content
dtype: string
- name: extension
dtype: string
- name: source
dtype: string
- name: license
dtype: string
- name: quality_tier
dtype: string
- name: sha256
dtype: string
- name: byte_size
dtype: int64
- name: total_lines
dtype: int64
- name: cjk_ratio
dtype: float64
- name: has_cjk
dtype: bool
splits:
- name: train
num_bytes: 23921213
num_examples: 3137
- name: validation
num_bytes: 2506431
num_examples: 349
download_size: 10076444
dataset_size: 26427644
---
# Language Decoded — Community Code
Natively-authored multilingual code for the **Language Decoded** project (part of [Cohere's Tiny Aya Expedition](https://aya.for.ai)). This dataset contains code written by developers in non-English programming languages and code with significant CJK content — **not** mechanically transpiled or LLM-translated from English.
> **Experiment and proposed paper title:** _Language Decoded: Exploring the Impact of Native Code on Multilingual Models_
This data serves as the corpus for **Condition 3** ("Mixed Native Sources") and is intended to serve as the corpus for **Condition 4** ("Community-Contributed Native Code") in the Language Decoded experimental ladder. See [legesher/language-decoded-experiments](https://huggingface.co/datasets/legesher/language-decoded-experiments) for the canonical project description.
## How Condition 3 and Condition 4 differ
Both conditions deal with native-language code, but they ask different questions:
- **Condition 3 ("Mixed Native Sources")** uses code pulled from real-world public-source repositories — incidentally available code that humans wrote in or with the target language. Phase 3 trained `condition-3-zh-5k` from data assembled here.
- **Condition 4 ("Community-Contributed Native Code")**'s design goal is **code whose problem-solving logic is itself native** — written as if a native speaker were approaching the problem, not English code that was later translated. Currently pending sufficient direct community contributions to assemble a stable training corpus; in neither Phase 2 nor Phase 3 evaluation. Cond-5's fully-translated data served as Phase 3's practical proxy because gathering native-authored code at scale proved difficult.
If you'd like to contribute Python (or other-language) code where you approached the problem in your native target language, the contribution interface is the [`legesher/legesher-native-code`](https://huggingface.co/spaces/legesher/legesher-native-code) HF Space — contributions there feed into the cond-4 corpus.
## Available Configs
| Config | Language | Files | Description |
| ------ | -------- | ----- | --------------------------------------------- |
| `zh` | Chinese | 3,486 | Natively Chinese-authored code from 5 sources |
Native code for Spanish and Urdu is not yet available.
## Schema
| Column | Type | Description |
| -------------- | ------ | ----------------------------------------------------- |
| `filename` | string | Unique file identifier |
| `content` | string | Full file content |
| `extension` | string | File extension (e.g., `.py`, `.java`, `.wy`, `.qi`) |
| `source` | string | Origin dataset or project |
| `license` | string | SPDX license identifier or `UNKNOWN` |
| `quality_tier` | string | Quality tier: A (highest), B, C, D |
| `sha256` | string | SHA-256 hash of file content for deduplication |
| `byte_size` | int64 | File size in bytes |
| `total_lines` | int64 | Number of lines in the file |
| `cjk_ratio` | float | Ratio of CJK characters to total non-whitespace chars |
| `has_cjk` | bool | Whether the file contains any CJK characters |
## Chinese (`zh`) Source Breakdown
| Source | Files | Extensions | Description |
| -------------------- | ----- | ------------------ | ------------------------------------------------------------------------------------------------------------ |
| `thestack` | 1,948 | .py, .js, .java, … | Code from The Stack with CJK in comments, strings, identifiers |
| `program_in_chinese` | 703 | .java, .js, .ts, … | [Program in Chinese](https://github.com/program-in-chinese) — code with Chinese identifiers |
| `qi` | 239 | .qi | [Qi](https://github.com/nicevoice/qi) — Chinese-syntax programming language |
| `mulan` | 166 | .ul | [Mulan](https://github.com/MulanRevive/mulan-rework) — Chinese programming language |
| `wenyan` | 81 | .wy | [Wenyan](https://github.com/wenyan-lang/wenyan) — Classical Chinese programming language (20K+ GitHub stars) |
### Quality Tier Distribution
| Tier | Count | Description |
| ---- | ----- | ------------------------- |
| A | 778 | High quality, rich CJK |
| B | 1,158 | Good quality |
| C | 789 | Moderate quality |
| D | 412 | Lower quality, sparse CJK |
### File Type Distribution
| Extension | Count | Extension | Count |
| --------- | ----- | --------- | ----- |
| .py | 2,003 | .ul | 166 |
| .java | 288 | .wy | 81 |
| .qi | 239 | .ts | 59 |
| .js | 205 | .c | 36 |
| Others | 59 | | |
## Usage
```python
from datasets import load_dataset
# Load Chinese native code
ds = load_dataset("legesher/language-decoded-community", "zh")
train = ds["train"] # 3,137 files
val = ds["validation"] # 349 files
# Filter by source
wenyan = train.filter(lambda x: x["source"] == "wenyan")
# Filter by quality
high_quality = train.filter(lambda x: x["quality_tier"] in ("A", "B"))
```
## Relationship to Other Datasets
- **[legesher/language-decoded-data](https://huggingface.co/datasets/legesher/language-decoded-data)**: The main training data hub. Holds the per-condition training corpora (cond-1 raw English, cond-2 Legesher-transpiled, cond-3 mixed native sources, cond-4 native-authored, cond-5 fully translated via `c4ai-aya-expanse-32b`).
- **[legesher/language-decoded-experiments](https://huggingface.co/datasets/legesher/language-decoded-experiments)**: The canonical project source-of-truth — experiment tracking, evaluation results, analysis, and the full experimental ladder.
- **[legesher/language-decoded-lora](https://huggingface.co/legesher/language-decoded-lora)**: LoRA adapters trained on the per-condition corpora.
- This repo stores the **raw native code** with full metadata. The blended and native training datasets used for fine-tuning live in `language-decoded-data`.
## Limitations
- **Chinese only**: Currently limited to Chinese-language code. Native code for Spanish and Urdu is not yet available.
- **License uncertainty**: Some files (particularly from `thestack`) have `UNKNOWN` licenses. These were included because they appeared in The Stack's permissive-license subset, but individual file licenses could not always be verified.
- **Quality variation**: Quality tiers are assigned heuristically based on CJK content ratio, file size, and structural indicators. Tier D files may contain minimal native-language content.
- **Non-Python files included**: Unlike the Phase 3 training corpora for cond-1, cond-2, and cond-5 — which are Python-only — this dataset includes code in multiple programming languages (Python, Java, JavaScript, Wenyan, Qi, Mulan, etc.). This reflects the reality of native-language programming ecosystems and is intentional for cond-3.
- **CJK-heavy bias**: Files were selected partly based on CJK character presence, which may over-represent code with Chinese comments/strings rather than code with Chinese-language syntax.
- **Native-authored ≠ scraped**: Although this corpus comes closer to native-authored code than the transpiled (cond-2) or fully-translated (cond-5) corpora, the inclusion criteria are based on CJK presence and source provenance, not on whether the original author was thinking in the target language while writing the code. Cond-4 will eventually distinguish that more cleanly via direct contribution.
## Citation
```bibtex
@misc{language-decoded-2026,
title={Language Decoded: Exploring the Impact of Native Code on Multilingual Models},
author={Madison Edgar and Saad Ahmed Bazaz and Tom Sherborne and Rashik Shahjahan and Khojasteh Mirza and Sarah Jawaid and Rafay Mustafa and Sohaib Ahmed Bazaz},
year={2026},
publisher={Hugging Face},
url={https://huggingface.co/datasets/legesher/language-decoded-community}
}
```
## License
Apache 2.0
## Attribution & takedown
Portions of this dataset derive from publicly available code
repositories (natively-authored code scraped from public GitHub and Gitee
repositories, plus community contributions collected with consent via
the collection Space), collected under a best-effort license review. If you are the author of code
included here and believe it was included improperly, or you would
like attribution added or your code removed:
- open a discussion on this repository's **Community** tab, or
- email Madi Edgar at **support@legesher.com** (the maintainer listed in
`CITATION.cff`).
We commit to citing, and on request from authors removing, any source
identified as improperly included. Removals are propagated in a new
dataset revision; prior revisions remain in git history unless a
takedown requires otherwise.
|