Text2SPARQL: Grammar Pre-training for Text-to-QDMR Semantic Parsers from Intermediate Question Decompositions
摘要
Most methods for converting language inquiries into executable database queries rely mainly on annotated training datasets. However, annotating a training dataset with queries is difficult due to the high cost of query-language knowledge. We used intermediate question representations connected to the corresponding databases to solve this problem. We employed grammar pre-training to elucidate the nuanced connections between databases and questions, facilitating a comprehensive understanding. To effectively capture the inherent relationships within the grammar of QDMR (Question Decomposition Meaning Representation), the decoder is pre-trained independently of the encoder. This separate pre-training method improves model robustness and speeds convergence. We utilized the flooding-level technique to tackle the difficulties associated with local extrema in the training process. Grammar pre-training efficiently enhances comprehension of QDMR grammar in the text-to-QDMR parsing module. Our system consists of a rule-based transpiler and a neural semantic parser. The neural semantic parser translates natural language inquiries into intermediate representations, whereas the transpiler converts intermediate representations into the SPARQL query language. Our system facilitates the transformation of language questions into SPARQL queries, allowing for effective and convenient querying of knowledge graphs and semantic web resources. Remarkably, our method achieves competitive execution accuracy on the Spider dataset. The proposed method improves execution accuracy by 65.2% on the test set and 83.6% on the development set. Our codes and data were openly available (https://github.com/cskyan/Text2SPARQL) .