File size: 1,707 Bytes
9d56ac6
0807ad2
9d56ac6
0807ad2
 
9d56ac6
 
 
 
0c8d8e0
9d56ac6
 
0807ad2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: Legesher Native Code Submission
emoji: 🌍
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 6.11.0
app_file: app.py
pinned: false
hf_oauth: true
---

# Native Code Submission Portal

A Gradio web app for collecting natively-written Legesher Python code from native speakers of Chinese, Spanish, and Urdu.

Part of **Language, Decoded β€” Expedition Tiny Aya** (Condition 4: Strictly Native Code).

---

## What this does

Contributors open the app, pick an exercise, write their solution in their native language using Legesher, run it to confirm it works, then submit. Submissions are saved to a HuggingFace dataset.

The app uses the Legesher Python API (`TokenTranslator`) to transpile native-language code to standard Python for execution β€” so contributors can see their code actually run in the browser.

---

## Run locally

**Prerequisites:** Python 3.10+

```bash
cd native-code-submission
pip install -r requirements.txt
python app.py
```

---

## Folder structure

```
native-code-submission/
β”œβ”€β”€ app.py              # Main Gradio app
β”œβ”€β”€ exercises.json      # Exercise prompts (zh/es/ur, tiers 1–3)
β”œβ”€β”€ requirements.txt    # Python dependencies
β”œβ”€β”€ references/         # Legesher keyword reference per language
β”‚   β”œβ”€β”€ zh.md
β”‚   β”œβ”€β”€ es.md
β”‚   └── ur.md
└── wheels/             # Bundled Legesher wheels (not on PyPI)
```

---

## Related issues

- AYA-128 β€” Exercise design (Done)
- AYA-129 β€” Native code criteria (Done) β€” [criteria doc](https://linear.app/legesher-research/document/native-code-criteria-qualification-disqualification-and-quality-rubric-5705fc83d6e8)
- AYA-127 β€” Submission flow design (this)