CoolFace
Datasetpublic

aksw/Text2SPARQL-Clean

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… See the full description on the dataset page: https://huggingface.co/datasets/aksw/Text2SPARQL-Clean.

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes8downloads
Dataset Card

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