Datasets:

Modalities:
Text
Formats:
csv
Libraries:
Datasets
pandas
File size: 3,563 Bytes
a31d217
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dac812f
 
 
 
 
 
 
 
a31d217
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
## Dataset Card for `Text2Sparql-Clean`

### 🧾 Dataset Summary

`Text2Sparql-Clean` is a **clean, standardized, and multilingual dataset** for the task of translating natural language questions into SPARQL queries over the **DBpedia** knowledge graph. It aggregates and harmonizes four widely-used benchmarks in the text-to-SPARQL research field:

* **QALD (versions 1–9)**
* **LC-QuAD 1.0**
* **Orange/paraqa-sparqltotext**
* **julioc-p/Question-Sparql**

The dataset includes questions in **English** and **Spanish**, making it a valuable resource for both **monolingual** and **cross-lingual** question answering over knowledge graphs.

This is the **second official version** of the dataset.

---

### 🛠️ Key Features and Improvements

This dataset goes beyond simple aggregation. It includes several **important improvements** over the original datasets:

***Standardized SPARQL queries**: All queries were revised to **include the necessary PREFIX declarations**, ensuring compatibility with DBpedia’s SPARQL endpoint.
***Syntactic and semantic validation**: Every SPARQL query was checked for **syntactic correctness** and **semantic executability**. Faulty or malformed queries were either **fixed** or **removed**.
***Clean, high-quality corpus**: The result is a **clean dataset** where all queries are **both executable and meaningful**, enabling reliable model training and evaluation.

---

### ✅ Supported Tasks

* **Text-to-SPARQL generation**
  → Given a natural language question, generate the corresponding SPARQL query over DBpedia.

---

### 🌍 Languages

* **English** (`en`)
* **Spanish** (`es`)

---

### 📁 Dataset Format

Each data instance contains:

* `question`: The question in natural language (English or Spanish)
* `query`: The corresponding SPARQL query
* `dataset-id`: Original dataset source (e.g., `QALD-X`, `LCQUAD`, `Orange`, `JULIOC`)

---

### 🔧 Dataset Creation Process

This dataset is the result of a **comprehensive curation pipeline**:

1. **Aggregation** of four public datasets into a unified structure.
    * **QALD 1-9**: https://github.com/ag-sc/QALD
    * **LC-QuAD 1.0**: https://github.com/AskNowQA/LC-QuAD
    * **Paraqa-SparqlToText**: https://huggingface.co/datasets/Orange/paraqa-sparqltotext
    * **Question-Sparql**: https://huggingface.co/datasets/julioc-p/Question-Sparql
2. **Normalization** of query formats and syntax, resulting in all queries with PREFIX.
3. **Insertion of missing PREFIX declarations** to ensure compliance with DBpedia standards.
4. **Execution validation**: All queries were tested against a DBpedia SPARQL endpoint. Queries that failed were either corrected (if trivial) or removed.
5. **Language consistency checks** for both English and Spanish questions.

---

### 💡 Use Cases

* Training and evaluating **text-to-SPARQL models**
* Developing **multilingual semantic parsers**
* Enabling **cross-lingual question answering** over structured knowledge graphs
* Fine-tuning large language models on **knowledge-graph-to-text** tasks

---

### 📚 Citation

If you use this dataset in your research, please cite:

```
@misc{text2sparql-clean,
  author = {Marcos Gôlo, Paulo do Carmo, Edgard Marx, Ricardo Marcacini},
  title = {text2sparql-clean: Natural Language Text to SPARQL for DBpedia Cleaned Dataset},
  year = {2025},
  howpublished = {\url{https://huggingface.co/datasets/aksw/Text2Sparql-Clean}},
}
```

---

### 🪪 Licensing

license: apache-2.0

Check each dataset’s original repository for full licensing terms.

---