Font Size: a A A

Research On Formal Query Generation For Complex Questions In Knowledge Base Question Answering

Posted on:2022-07-06Degree:MasterType:Thesis
Country:ChinaCandidate:M ZhaoFull Text:PDF
GTID:2518306740982799Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Knowledge base question answering is a kind of advanced form of information retrieval,which has important research value and application prospect.According to the natural language question asked by users,after analysis and processing,the answers of the question are inquired or inferred from the knowledge base.Semantic parser is a direction of extensive research.It transforms natural language questions into the corresponding formal query statements of knowledge base,and finally the answers are obtained by executing the query over the knowledge base.This thesis focuses on the complex questions in question answering task over knowledge base,combined with the characteristics of multi-entity,multi-relation and multi-constraint of complex questions,through the semantic parser method,the complex questions are processed and analyzed,and the semantic elements are detected,and then transformed into formal query that can be understood by the knowledge base,so as to finish the question answering of knowledge base.The whole semantic parsing process includes four stages: entity linking,relation detection,constraint detection and formal query generation.Among them,the semantic elements(entity,relation,constraint)detected from the question in the first three stages and as the foundation of the fourth stage.Based on the existed tools to obtain the entity link results,this thesis proposes a multi-relation detection method for complex questions with multi-attention mechanism,proposes a multi-constraint detection method for complex questions,and proposes a formal query generation method for complex questions based on SPARQL-Tree as an intermediate state.The main contributions of this thesis are as follows:(1)The semantic element detection framework of complex questions is proposed.A method of multi-relation detection of complex questions with multi-attention mechanism is proposed.According to the different number of relation in question sentences,the encoder similarity of question sentences and candidate relations with different attention mechanism is compared,so that multiple relations in the question sentences can be detected.This paper proposes a method to detect multi-constraints in complex question sentences.For each common constraint in complex sentences,including query intention,sorting,filtering,etc.,different constraint recognition methods are adopted to complete constraint detection task.(2)For the generating steps of formal query,a complex query construction method based on SPARQL-Tree as the intermediate state is proposed.In order to make up for the huge semantic gap between complex question sentences and formal queries,this thesis proposes SPARQL-Tree as the intermediate state,and regards the generation of formal query statements as a tree generation process.Using SPARQL's own context free grammar,the decoding process of SPARQL-Tree is constructed coarse-to-fine,top-down,so as to get the overall structured skeleton of formal query statements,and then fill in semantic elements to enrich skeleton with details and get the final formal query.(3)This method is verified on three common complex questions datasets of question answering over knowledge base.The experimental results show that the method proposed in this thesis has achieved good performance,and the processing of complex problems has achieved good results.At the same time,the experiment analyzes the influence of semantic elements detection on the final formal query generation,and the effect of SPARQL-Tree as an intermediate state,which verifies the effectiveness of the proposed knowledge base question answering method.The significance of this work is to provide a complete set of effective and interpretable solutions for the question answering over knowledge base task of complex questions.By analyzing the whole process of question answering,the semantic parser process of complex sentences and the construction process of formal query can be understood effectively.At the same time,this method can also identify the causes of errors in the whole question answering task,which has reference significance for more complex question answering tasks in the future.
Keywords/Search Tags:Knowledge base, Complex questions, Semantic elements, Formal query generation, SPARQL-Tree
PDF Full Text Request
Related items