遇见数据集

Orange/lc_quad2-sparqltotext

收藏
Hugging Face2024-01-11 更新2024-04-19 收录
官方服务:

资源简介:

--- dataset_info: features: - name: uid dtype: int32 - name: NNQT_question dtype: string - name: paraphrased_question dtype: string - name: question dtype: string - name: simplified_query dtype: string - name: sparql_dbpedia18 dtype: string - name: sparql_wikidata dtype: string - name: answer list: string - name: solved_answer list: string - name: subgraph dtype: string - name: template dtype: string - name: template_id dtype: string - name: template_index dtype: int32 splits: - name: train num_bytes: 241621115 num_examples: 21101 - name: validation num_bytes: 11306539 num_examples: 3010 - name: test num_bytes: 21146458 num_examples: 6024 download_size: 79003648 dataset_size: 274074112 task_categories: - question-answering - text-generation tags: - qa - knowledge-graph - sparql language: - en --- # Dataset Card for LC-QuAD 2.0 - SPARQLtoText version ## Table of Contents - [Dataset Card for LC-QuAD 2.0 - SPARQLtoText version](#dataset-card-for-lc-quad-20---sparqltotext-version) - [Table of Contents](#table-of-contents) - [Dataset Description](#dataset-description) - [Dataset Summary](#dataset-summary) - [New field `simplified_query`](#new-field-simplified_query) - [New split "valid"](#new-split-valid) - [Supported tasks](#supported-tasks) - [Languages](#languages) - [Dataset Structure](#dataset-structure) - [Types of questions](#types-of-questions) - [Data splits](#data-splits) - [Additional information](#additional-information) - [Related datasets](#related-datasets) - [Licencing information](#licencing-information) - [Citation information](#citation-information) - [This version of the corpus (with normalized SPARQL queries)](#this-version-of-the-corpus-with-normalized-sparql-queries) - [Original version](#original-version) ## Dataset Description - **Paper:** [SPARQL-to-Text Question Generation for Knowledge-Based Conversational Applications (AACL-IJCNLP 2022)](https://aclanthology.org/2022.aacl-main.11/) - **Point of Contact:** Gwénolé Lecorvé ### Dataset Summary Special version of [LC-QuAD 2.0](https://huggingface.co/datasets/lc_quad) for the SPARQL-to-Text task #### New field `simplified_query` New field is named "simplified_query". It results from applying the following step on the field "query": * Replacing URIs with a simpler format with prefix "resource:", "property:" and "ontology:". * Spacing the delimiters `(`, `{`, `.`, `}`, `)`. * Adding diversity to some filters which test a number (`contains ( ?var, 'number' )` can become `contains ?var = number` * Randomizing the variables names * Shuffling the clauses #### New split "valid" A validation set was randonly extracted from the test set to represent 10% of the whole dataset. ### Supported tasks - Knowledge-based question-answering - Text-to-SPARQL conversion - SPARQL-to-Text conversion ### Languages - English ## Dataset Structure The corpus follows the global architecture from the original version of CSQA (https://amritasaha1812.github.io/CSQA/). There is one directory of the train, dev, and test sets, respectively. Dialogues are stored in separate directories, 100 dialogues per directory. Finally, each dialogue is stored in a JSON file as a list of turns. ### Types of questions Comparison of question types compared to related datasets: | | | [SimpleQuestions](https://huggingface.co/datasets/OrangeInnov/simplequestions-sparqltotext) | [ParaQA](https://huggingface.co/datasets/OrangeInnov/paraqa-sparqltotext) | [LC-QuAD 2.0](https://huggingface.co/datasets/OrangeInnov/lcquad_2.0-sparqltotext) | [CSQA](https://huggingface.co/datasets/OrangeInnov/csqa-sparqltotext) | [WebNLQ-QA](https://huggingface.co/datasets/OrangeInnov/webnlg-qa) | |--------------------------|-----------------|:---------------:|:------:|:-----------:|:----:|:---------:| | **Number of triplets in query** | 1 | ✓ | ✓ | ✓ | ✓ | ✓ | | | 2 | | ✓ | ✓ | ✓ | ✓ | | | More | | | ✓ | ✓ | ✓ | | **Logical connector between triplets** | Conjunction | ✓ | ✓ | ✓ | ✓ | ✓ | | | Disjunction | | | | ✓ | ✓ | | | Exclusion | | | | ✓ | ✓ | | **Topology of the query graph** | Direct | ✓ | ✓ | ✓ | ✓ | ✓ | | | Sibling | | ✓ | ✓ | ✓ | ✓ | | | Chain | | ✓ | ✓ | ✓ | ✓ | | | Mixed | | | ✓ | | ✓ | | | Other | | ✓ | ✓ | ✓ | ✓ | | **Variable typing in the query** | None | ✓ | ✓ | ✓ | ✓ | ✓ | | | Target variable | | ✓ | ✓ | ✓ | ✓ | | | Internal variable | | ✓ | ✓ | ✓ | ✓ | | **Comparisons clauses** | None | ✓ | ✓ | ✓ | ✓ | ✓ | | | String | | | ✓ | | ✓ | | | Number | | | ✓ | ✓ | ✓ | | | Date | | | ✓ | | ✓ | | **Superlative clauses** | No | ✓ | ✓ | ✓ | ✓ | ✓ | | | Yes | | | | ✓ | | | **Answer type** | Entity (open) | ✓ | ✓ | ✓ | ✓ | ✓ | | | Entity (closed) | | | | ✓ | ✓ | | | Number | | | ✓ | ✓ | ✓ | | | Boolean | | ✓ | ✓ | ✓ | ✓ | | **Answer cardinality** | 0 (unanswerable) | | | ✓ | | ✓ | | | 1 | ✓ | ✓ | ✓ | ✓ | ✓ | | | More | | ✓ | ✓ | ✓ | ✓ | | **Number of target variables** | 0 (⇒ ASK verb) | | ✓ | ✓ | ✓ | ✓ | | | 1 | ✓ | ✓ | ✓ | ✓ | ✓ | | | 2 | | | ✓ | | ✓ | | **Dialogue context** | Self-sufficient | ✓ | ✓ | ✓ | ✓ | ✓ | | | Coreference | | | | ✓ | ✓ | | | Ellipsis | | | | ✓ | ✓ | | **Meaning** | Meaningful | ✓ | ✓ | ✓ | ✓ | ✓ | | | Non-sense | | | | | ✓ | ### Data splits Text verbalization is only available for a subset of the test set, referred to as *challenge set*. Other sample only contain dialogues in the form of follow-up sparql queries. | | Train | Validation | Test | | --------------------- | ---------- | ---------- | ---------- | | Questions | 21,000 | 3,000 | 6,000 | | NL question per query | 1 | | Characters per query | 108 (± 36) | | Tokens per question | 10.6 (± 3.9) | ## Additional information ### Related datasets This corpus is part of a set of 5 datasets released for SPARQL-to-Text generation, namely: - Non conversational datasets - [SimpleQuestions](https://huggingface.co/datasets/OrangeInnov/simplequestions-sparqltotext) (from https://github.com/askplatypus/wikidata-simplequestions) - [ParaQA](https://huggingface.co/datasets/OrangeInnov/paraqa-sparqltotext) (from https://github.com/barshana-banerjee/ParaQA) - [LC-QuAD 2.0](https://huggingface.co/datasets/OrangeInnov/lcquad_2.0-sparqltotext) (from http://lc-quad.sda.tech/) - Conversational datasets - [CSQA](https://huggingface.co/datasets/OrangeInnov/csqa-sparqltotext) (from https://amritasaha1812.github.io/CSQA/) - [WebNLQ-QA](https://huggingface.co/datasets/OrangeInnov/webnlg-qa) (derived from https://gitlab.com/shimorina/webnlg-dataset/-/tree/master/release_v3.0) ### Licencing information * Content from original dataset: CC-BY 3.0 * New content: CC BY-SA 4.0 ### Citation information #### This version of the corpus (with normalized SPARQL queries) ```bibtex @inproceedings{lecorve2022sparql2text, title={SPARQL-to-Text Question Generation for Knowledge-Based Conversational Applications}, author={Lecorv\'e, Gw\'enol\'e and Veyret, Morgan and Brabant, Quentin and Rojas-Barahona, Lina M.}, journal={Proceedings of the Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the International Joint Conference on Natural Language Processing (AACL-IJCNLP)}, year={2022} } ``` #### Original version ```bibtex @inproceedings{dubey2017lc2, title={LC-QuAD 2.0: A Large Dataset for Complex Question Answering over Wikidata and DBpedia}, author={Dubey, Mohnish and Banerjee, Debayan and Abdelkawi, Abdelrahman and Lehmann, Jens}, booktitle={Proceedings of the 18th International Semantic Web Conference (ISWC)}, year={2019}, organization={Springer} } ```

提供机构:
Orange
原始信息汇总

数据集概述

名称: LC-QuAD 2.0

版本: 特殊版本

任务: SPARQL-to-Text

描述: 该数据集是LC-QuAD 2.0的一个特殊版本,专门为SPARQL-to-Text任务设计。

搜集汇总
数据集介绍
Orange/lc_quad2-sparqltotext 数据集图片
构建方式
在知识图谱问答领域,SPARQL查询与自然语言之间的转换是构建智能对话系统的核心挑战之一。Orange/lc_quad2-sparqltotext数据集基于经典的LC-QuAD 2.0语料库进行深度改造,专为SPARQL-to-Text任务而设计。其构建方式独具匠心:在原始数据基础上新增了'simplified_query'字段,通过将URI替换为简洁的'resource:'、'property:'和'ontology:'前缀,规范化分隔符间距,为数值过滤器注入多样性表达,随机化变量名称并重排子句顺序,从而生成多样化的简化查询形式。此外,从原始测试集中随机抽取10%样本构成验证集,形成训练集21,101条、验证集3,010条、测试集6,024条的均衡划分,为模型训练提供了严谨的数据支撑。
特点
该数据集在知识驱动型自然语言处理领域展现出独特优势。其核心特色在于丰富的查询类型覆盖,从单三元组到多三元组、从合取到析取与排除逻辑、从直连拓扑到链式与混合结构,全面涵盖复杂查询模式。变量类型涵盖无类型、目标变量与内部变量,比较子句支持字符串、数值与日期三种形式,答案类型覆盖开放实体、封闭实体、数值与布尔值,答案基数从零至多,目标变量从零到二,彰显出无与伦比的多样性。每个查询仅对应一条自然语言表述,字符数均值108±36,词元数10.6±3.9,确保了数据的一致性与可解析性,为SPARQL-to-Text任务提供了高质量的训练基准。
使用方法
在基于知识的对话系统开发中,该数据集为SPARQL查询到自然语言的生成提供了标准化接口。使用方法灵活多样:研究者可直接加载预划分的训练、验证与测试集,利用'question'字段作为自然语言目标,'simplified_query'或'sparql_dbpedia18'作为输入查询,构建序列到序列的生成模型。数据集的字段设计支持多任务学习,可同时用于知识图谱问答、Text-to-SPARQL与SPARQL-to-Text三类任务。建议采用基于Transformer的架构,通过'uid'字段追踪样本唯一性,利用'template_id'与'template_index'进行查询模板分析,结合'answer'与'solved_answer'评估生成结果的事实准确性,从而在知识密集型场景中优化模型的语义理解与表达能力。
背景与挑战
背景概述
LC-QuAD 2.0 SPARQL-to-Text版本是由Gwénolé Lecorvé等研究人员于2022年在AACL-IJCNLP会议上提出的,旨在解决知识图谱问答系统中SPARQL查询到自然语言文本的生成问题。该数据集基于LC-QuAD 2.0原始版本,由Orange Innovation团队构建,核心研究目标是将复杂的结构化查询转化为人类可读的表述,以支持知识驱动的对话应用。通过引入简化查询字段、变量随机化及分句打乱等规范化处理,该数据集显著提升了模型对语义多样性的适应能力,为知识图谱问答、文本到SPARQL转换及SPARQL到文本生成等任务提供了标准化基准,对推动语义解析与自然语言生成交叉领域的发展具有重要影响。
当前挑战
该数据集面临的核心挑战在于SPARQL查询到自然语言文本生成过程中的语义保真性与多样性平衡。具体而言,1)领域问题层面,知识图谱问答需处理查询中多三元组、逻辑连接符(如析取、排除)及比较子句等复杂结构,模型需准确捕捉查询意图并生成符合语法与常识的自然语言表述,同时应对变量类型、答案基数及未回答场景带来的不确定性。2)构建过程中,对原始LC-QuAD 2.0查询进行规范化处理时,需在保持语义不变的前提下引入变量重命名、分句打乱及过滤器多样性,这增加了数据一致性维护的难度;此外,验证集从测试集中随机抽取10%可能导致分布偏移,影响模型泛化评估的可靠性。
常用场景
经典使用场景
LC-QuAD 2.0的SPARQL-to-Text版本是知识图谱问答领域中的一项重要资源,其核心应用场景在于将结构化的SPARQL查询语句转化为自然语言问题。该数据集包含超过三万个样本,每个样本均配备了原始问题、改写问题及对应的简化SPARQL查询,为训练端到端的神经序列生成模型提供了高质量的对齐数据。研究者常基于此构建能够理解复杂图查询逻辑并生成流畅英文问句的系统,尤其适用于需要处理多三元组、逻辑连接符及比较子句的复杂查询场景,从而推动知识驱动对话系统的语义理解能力迈向新高度。
解决学术问题
该数据集精准回应了知识图谱问答中一个长期存在的学术挑战:如何弥合形式化查询语言与自然语言之间的语义鸿沟。传统的问答系统往往依赖手工规则或模板将SPARQL映射为问题,但缺乏泛化能力。LC-QuAD 2.0的SPARQL-to-Text版本通过提供大规模、多样化的查询-问题平行语料,使得模型能够学习到从图结构逻辑到人类表达习惯的深层映射规律。这不仅促进了可解释性问答的进展,也为评估生成式语言模型对知识图谱的推理能力建立了标准化基准,其影响辐射至知识推理、对话生成及语义解析等多个交叉领域。
衍生相关工作
基于该数据集的研究催生了一系列经典工作,其中最具代表性的是Lecorvé等人于AACL-IJCNLP 2022发表的SPARQL-to-Text问题生成论文,该工作首次系统性地提出了标准化SPARQL查询的预处理流程,并验证了简化查询对生成质量的提升效果。此外,该数据集与SimpleQuestions、ParaQA及CSQA等同系列资源共同构成了SPARQL-to-Text任务的五大基准,推动了多源知识图谱上的跨领域迁移学习研究。后续工作还探索了结合预训练语言模型(如T5、BART)进行查询-问题对齐的微调策略,以及利用对比学习增强模型对查询拓扑结构的感知能力,进一步拓展了知识图谱自然语言接口的理论边界。
以上内容由遇见数据集搜集并总结生成
二维码
社区交流群
二维码
科研交流群
商业服务