|
Download README.md from salmane11/Dialect2SQL: direct link, hf CLI and curl.
- Browser
- Download file 4.36 kB
-
https://huggingface.co/datasets/salmane11/Dialect2SQL/resolve/main/README.md
- Command line
-
hf download hf://datasets/salmane11/Dialect2SQL/README.md
-
curl -L -o README.md https://huggingface.co/datasets/salmane11/Dialect2SQL/resolve/main/README.md
4.36 kB
| configs: | |
| - config_name: default | |
| data_files: | |
| - split: Dialect2SQL | |
| path: Dialect2SQL.csv | |
| - split: train | |
| path: train.csv | |
| - split: validation | |
| path: validation.csv | |
| - split: test | |
| path: test.csv | |
| task_categories: | |
| - text-generation | |
| - translation | |
| language: | |
| - en | |
| - ar | |
| tags: | |
| - text-to-sql | |
| - question-to-sql | |
| - nlq-to-sql | |
| - SQL | |
| - english-to-sql | |
| - low-resource-languages | |
| - darija | |
| - Arabic-dialect | |
| size_categories: | |
| - 1K<n<10K | |
| # Dialect2SQL | |
| ## Dataset Description | |
| **Dialect2SQL** is a novel dataset designed for the **Text-to-SQL** task in **Arabic dialects**, with a particular focus on **Moroccan Darija**. | |
| It provides natural language questions written in Darija, paired with corresponding SQL queries and database schemas. | |
| The dataset enables research on **low-resource natural language interfaces to databases (NLIDB)** in non-standard Arabic varieties. | |
| --- | |
| ## Dataset Summary | |
| Dialect2SQL aims to bridge the gap between Arabic dialects and structured query understanding. | |
| The dataset consists of manually and semi-automatically curated **Darija–SQL** pairs mapped to realistic database schemas spanning multiple domains (e.g., education, e-commerce, banking, and transportation). | |
| Each entry contains: | |
| - a **Darija** question (`darija_question`) | |
| - an optional **English translation** (`en_question`) | |
| - the **SQL query** (`sql`) | |
| - the **database schema** (`db_schema`) | |
| - the **database name** (`db_id`) | |
| --- | |
| ## Supported Tasks and Leaderboards | |
| ### Task: Text-to-SQL / NLQ-to-SQL | |
| Given a natural language question written in **Darija (Moroccan Arabic)**, the goal is to generate the correct **SQL query** that retrieves the requested information. | |
| **Example Task:** | |
| | Field | Example | | |
| |-------|----------| | |
| | `darija_question` | شحال من تلميذ عندو أكثر من 15 ف الرياضيات؟ | | |
| | `en_question` | How many students scored more than 15 in mathematics? | | |
| | `sql` | SELECT COUNT(*) FROM Grades WHERE subject = 'Mathematics' AND grade > 15; | | |
| | `db_schema` | CREATE TABLE Grades(student_id number, subject varchar, grade real); | | |
| | `db_id` | School_DB | | |
| --- | |
| ## Languages | |
| - **Darija (Moroccan Arabic)** — primary source language | |
| - **English** — provided for reference and cross-lingual studies | |
| --- | |
| ## Data Splits | |
| | Split | Size (approx.) | Description | | |
| |-------|----------------|-------------| | |
| | `train` | ~7,000 | Main training set | | |
| | `validation` | ~1,000 | Development split | | |
| | `test` | ~1,000 | Evaluation split | | |
| | `Dialect2SQL` | full dataset | Combined dataset file | | |
| --- | |
| ## Dataset Structure | |
| Each row in the dataset includes: | |
| | Column | Description | | |
| |---------|--------------| | |
| | `db_id` | Database identifier | | |
| | `db_schema` | SQL table definitions | | |
| | `darija_question` | Question in Moroccan Darija | | |
| | `en_question` | English translation (optional) | | |
| | `sql` | Target SQL query | | |
| --- | |
| ## Use Cases | |
| - Fine-tuning **text-to-SQL models** for Arabic dialects | |
| - Research on **multilingual and dialectal NLIDB systems** | |
| - **Cross-lingual transfer learning** for SQL understanding | |
| - Evaluating **low-resource adaptation** of code LLMs (e.g., Qwen, StarCoder, Codex) | |
| --- | |
| ## Limitations | |
| - The dataset currently focuses on **Moroccan Darija**, and performance may not generalize to other Arabic dialects. | |
| - Some questions are written using **Arabic script**, while others mix **Latin characters** (Arabizi), reflecting real user input diversity. | |
| - SQL coverage is limited to **single-domain, schema-bounded** tasks. | |
| --- | |
| ## Citation | |
| If you use this dataset, please cite the following paper: | |
| ```bibtex | |
| @inproceedings{chafik2025dialect2sql, | |
| title={Dialect2SQL: A Novel Text-to-SQL Dataset for Arabic Dialects with a Focus on Moroccan Darija}, | |
| author={Chafik, Salmane and Ezzini, Saad and Berrada, Ismail}, | |
| booktitle={Proceedings of the 4th Workshop on Arabic Corpus Linguistics (WACL-4)}, | |
| pages={86--92}, | |
| year={2025} | |
| } | |
| @article{10.1145/3787497, | |
| author = {Chafik, Salmane and Ezzini, Saad and Berrada, Ismail}, | |
| title = {DarijaDB: Unlocking Text-to-SQL for Arabic Dialects}, | |
| year = {2026}, | |
| publisher = {Association for Computing Machinery}, | |
| address = {New York, NY, USA}, | |
| issn = {2375-4699}, | |
| url = {https://doi.org/10.1145/3787497}, | |
| doi = {10.1145/3787497}, | |
| journal = {ACM Trans. Asian Low-Resour. Lang. Inf. Process.}, | |
| month = jan | |
| } | |