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 querydataset-id: Original dataset source (e.g.,QALD-X,LCQUAD,Orange,JULIOC)
๐ง Dataset Creation Process
This dataset is the result of a comprehensive curation pipeline:
- 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
- Normalization of query formats and syntax, resulting in all queries with PREFIX.
- Insertion of missing PREFIX declarations to ensure compliance with DBpedia standards.
- Execution validation: All queries were tested against a DBpedia SPARQL endpoint. Queries that failed were either corrected (if trivial) or removed.
- 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.