Instruct-to-SPARQL
收藏资源简介:
Instruct-to-SPARQL是一个包含自然语言指令和SPARQL查询配对的数据集,通过爬取Wikipedia页面和教程获取真实WikiData SPARQL查询示例。数据集共有2.8k个示例,分为训练、验证和测试集。
Instruct-to-SPARQL is a dataset comprising pairs of natural language instructions and SPARQL queries, obtained by scraping Wikipedia pages and tutorials for real-world WikiData SPARQL query examples. The dataset contains a total of 2.8k examples, divided into training, validation, and test sets.
数据集概述
名称: Instruct-to-SPARQL
描述: 该数据集包含自然语言指令与SPARQL查询的配对,通过爬取Wikipedia页面和教程获取实际的WikiData SPARQL查询示例。数据集总计2.8k个示例,分为训练集、验证集和测试集。
数据集特征
- id: 每个示例的唯一标识符。
- instructions: 自然语言指令和问题的列表。
- sparql_raw: 爬取并清理后的SPARQL查询。
- sparql_annotated: 带注释和前缀的SPARQL查询。
- sparql_query: 用于检索数据的最终带前缀的SPARQL查询。
- complexity: 查询复杂度:简单、中等或复杂。
- complexity_description: 查询复杂度的描述。
- query_results: 执行SPARQL查询得到的结果。
数据集创建过程
- 数据收集: 爬取Wikipedia页面和教程以获取实际的WikiData SPARQL查询示例。
- 数据清洗: 清洗收集的数据以确保一致性和正确性。
- 数据增强: 通过添加额外示例增强数据集的多样性。
- 自然语言生成: 生成与SPARQL查询对应的自然语言指令。
模型评估指标
-
机器翻译指标:
- BLEU: 通过计算n-gram精度衡量生成SPARQL查询与参考SPARQL查询的相似度。
- ROUGE: 通过计算n-gram召回率和最长公共子序列衡量生成SPARQL查询与参考SPARQL查询的重叠度。
-
执行结果指标:
- Overlap Coefficient: 衡量目标和生成SPARQL查询结果集的相似度。
- Jaccard Similarity: 衡量目标和生成SPARQL查询结果集的交集与并集的比例。
引用信息
@dataset{instruct_to_sparql, author = {Mehdi Ben Amor, Alexis Strappazon, Michael Granitzer, Jelena Mitrovic}, title = {Instruct-to-SPARQL}, year = {2024}, howpublished = {https://huggingface.co/datasets/PaDaS-Lab/Instruct-to-SPARQL}, note = {A dataset of natural language instructions and corresponding SPARQL queries} }




