<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">A system for translating natural language questions into SPARQL queries with neural networks: Preliminary results</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Manuel</forename><forename type="middle">Alejandro</forename><surname>Borroto</surname></persName>
							<email>manuel.borroto@unical.it</email>
							<affiliation key="aff0">
								<orgName type="institution">University of Calabria</orgName>
								<address>
									<addrLine>Via Pietro Bucci</addrLine>
									<postCode>87036</postCode>
									<settlement>Rende</settlement>
									<region>Cosenza</region>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Francesco</forename><surname>Ricca</surname></persName>
							<email>francesco.ricca@unical.it</email>
							<affiliation key="aff0">
								<orgName type="institution">University of Calabria</orgName>
								<address>
									<addrLine>Via Pietro Bucci</addrLine>
									<postCode>87036</postCode>
									<settlement>Rende</settlement>
									<region>Cosenza</region>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Bernardo</forename><surname>Cuteri</surname></persName>
							<email>bernardo.cuteri@unical.it</email>
							<affiliation key="aff0">
								<orgName type="institution">University of Calabria</orgName>
								<address>
									<addrLine>Via Pietro Bucci</addrLine>
									<postCode>87036</postCode>
									<settlement>Rende</settlement>
									<region>Cosenza</region>
									<country key="IT">Italy</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">A system for translating natural language questions into SPARQL queries with neural networks: Preliminary results</title>
					</analytic>
					<monogr>
						<idno type="ISSN">1613-0073</idno>
					</monogr>
					<idno type="MD5">3C99C4B11B39BF216F303ADB26BF64EB</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T02:53+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>Knowledge base</term>
					<term>Question Answering</term>
					<term>Neural network</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>The development of knowledge bases has gathered nowadays large volumes of information concerning multiple domains. Unfortunately, access to this information is complicated for those users unfamiliar with the SPARQL query language and the knowledge base definition. In this paper, we present preliminary results on a system for automatic translation of natural language questions into SPARQL queries. Our method uses Neural Machine Translation and Named Entity Recognition tasks that complement each other to obtain a final query ready to be executed. We demonstrate the potential of our approach by presenting its results on the Monument dataset, which is a recently released dataset for Question Answering on the well-known DBpedia knowledge base.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>Today we live in what is known as the Digital Age. How knowledge is generated and shared has changed dramatically, digital formats and the internet have made information much more accessible than the old non-virtual format. As evidence of this, we now have vast and complex knowledge bases which allow gathering large volumes of information through the intercommunication of thousands of datasets referring to various domains in what is known as Linked Data. This means that the people have access to a large amount of information never thought, and the DBpedia <ref type="bibr" target="#b0">[1]</ref> project is a real example of that, which is one of the most popular knowledge bases nowadays.</p><p>The problem is that the search and retrieval of the information stored in this way can be a hard task for lay users because it is necessary to know the structure of the knowledge base and the appropriate query languages, such as SPARQL <ref type="bibr" target="#b1">[2]</ref>. As a result, natural language Question Answering (QA) has taken a central role in the area of the Semantic Web to address such issues. A group of QA approaches, especially the most recent, have begun to take advantage of the great development achieved by Deep Learning and started to use deep neural networks to tackle the problem, proposing systems for the automatic translation from natural language questions to SPARQL queries, removing all technical complexity to the final users.</p><p>In this context, we propose a system for the automatic translation of natural language questions into SPARQL queries. More specifically we employ LSTM <ref type="bibr" target="#b2">[3]</ref> neural networks due to the proven effectiveness for Natural Language Processing that they have demonstrated. The system is consists of two parts. The first one translates the questions in natural language into a SPARQL template using an LSTM encoder-decoder model, which is the state-of-the-art for these types of tasks <ref type="bibr" target="#b3">[4]</ref>. Whereas the second part is a model for Named Entity Recognition <ref type="bibr" target="#b4">[5]</ref>, also based on LSTM networks, and responsible for extracting the entities from the question to finally combine the results and create a SPARQL query ready to be executed. Besides, we introduce a formal definition of a dataset format that greatly reduces the output space and is essential for the proper functioning of the system and also allows us to tackle the problem with the out-of-vocabulary (OOV) words of the training set, a major weakness of the majority of the related approaches today.</p><p>We demonstrate the potential of our approach by presenting its results on the Monument dataset, which is a recently released dataset for Question Answering on the well-known DBpedia knowledge base.</p><p>The remainder of the paper is structured as follows. Section 2, we talk about related works. In section 3, we go into the particular details of our approach. Section 4 focuses on the discussion of experiments and results. Finally, we provide some conclusions and aspects for future work.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Related Work</head><p>Pattern-based. The idea of employing query patterns for mapping questions to SPARQLqueries was already exploited in the literature <ref type="bibr" target="#b5">[6,</ref><ref type="bibr" target="#b6">7]</ref>. The approach presented by Pradel and Ollivier <ref type="bibr" target="#b5">[6]</ref> also adopts named entity recognition but applies a set of predefined rules to obtain all the query elements and their relationships. The approach by Steinmetz et. al <ref type="bibr" target="#b6">[7]</ref> has 4 phases, firstly, the question is parsed and the main focus is extracted, then general queries are generated from the phrases in natural language according to predefined patterns, and finally, makes a subject-predicate-object mapping of the general question to triples in RDF. Despite both of the above-mentioned approaches performed well in selected benchmarks, they rely on patterns and rules defined manually for all existing types of questions. A limit that is not present in our proposal.</p><p>Deep Learning-based. In the Seq2SQL approach <ref type="bibr" target="#b7">[8]</ref> an LSTM Seq2Seq model is used to translate from natural language to SQL queries. The interesting thing about this approach is that they use Reinforcement Learning to guide the learning. The usage Encoder-Decoder model based in LSTM with an attention mechanism to associate a vocabulary mapping between natural language and SPARQL also was proposed in the literature <ref type="bibr" target="#b8">[9]</ref> obtaining good results.</p><p>The Neural SPARQL Machines (NSpM) <ref type="bibr" target="#b9">[10]</ref> approach is based on the idea of modifying the SPARQL queries to treat them as a foreign language. To achieve this, they encoded the brackets, URIs, operators, and other symbols, making the tokenization process easier. The resulting dataset was introduced in a Seq2Seq model responsible for performing the question-query mapping. The same authors created the DBNQA dataset <ref type="bibr" target="#b10">[11]</ref>, and their model was tested on a subdomain referring to monuments and evaluated using the purely syntactic BLEU score <ref type="bibr" target="#b9">[10]</ref>. As a consequence, it performs well in reproducing the syntax of the gold query but is less able to generalize to unseen natural language questions and OOV words when compared with our approach.</p><p>The query building approach by Chen et al. <ref type="bibr" target="#b11">[12]</ref> features two stages. The first stage consists of predicting the query structure of the question and leverages the structure to constrain the generation of the candidate queries. The second stage performs a candidate query rank. As in our approach, Chen et al. <ref type="bibr" target="#b11">[12]</ref> uses BiLSTM networks, but query representation is based on abstract query graphs.</p><p>Also, we report that eight different models based on RNNs and CNNs were compared by Yin and colleagues <ref type="bibr" target="#b12">[13]</ref>. In this large experiment, the ConvS2S <ref type="bibr" target="#b13">[14]</ref> model proved to be the best.</p><p>For completeness, we studied another related line of work that aims to translate the natural language questions into SQL queries. The work proposed by Yu et. al <ref type="bibr" target="#b14">[15]</ref> introduces a largescale, complex, and cross-domain semantic parsing and text-to-SQL dataset. To validate the work contribution, they used the proposed dataset to train different models to convert text to SQL queries. Most of the models were based on a Seq2Seq architecture with attention, demonstrating an adequate performance. Another interesting case of study is the editing-based approach for text-to-SQL generation introduced by Zhang et. al <ref type="bibr" target="#b15">[16]</ref>. They implement a Seq2Seq model with Luong's attention, using BiLSTMs and BERT embeddings. The approach demonstrates to perform well on SParC and Spider datasets, outperforming the related work in some cases.</p><p>Our architecture addresses the issues connected with the translation resorting to specific tools, an aspect that is not present in mentioned works. Moreover, existing approaches based on NMT do nothing special to deal with OOV words.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Translating Natural Language Questions to SPARQL</head><p>Knowledge bases (KB) are a rich source of information related to a great variety of domains, which can be accessed by experts of formal query languages. The potential of exploiting knowledge bases can be greatly increased by allowing any user to query the ontology by posing questions in natural language.</p><p>In this paper, this problem is seen as the following Natural Language Processing task: Given an RDF knowledge base 𝑂 and a question 𝑄 𝑛𝑎𝑡 in natural language (to be answered using 𝑂), translate 𝑄 into a SPARQL query 𝑆 𝑄𝑛𝑎𝑡 such that the answer to 𝑄 𝑛𝑎𝑡 can be obtained by running 𝑆 𝑄𝑛𝑎𝑡 on the underlying ontology 𝑂.</p><p>The starting point is a training set containing a number of pairs ⟨𝑄 𝑛𝑎𝑡 , 𝐺 𝑄𝑛𝑎𝑡 ⟩, where 𝑄 𝑛𝑎𝑡 is a natural language question, and 𝐺 𝑄𝑛𝑎𝑡 is a SPARQL query, called the gold query. The gold query is a SPARQL query that models (i.e., allows to retrieve from 𝑂) the answers to 𝑄 𝑛𝑎𝑡 . The training set has to be used to learn how to answer questions posed in natural language using 𝑂, so that, given a question in natural language 𝑄 𝑛𝑎𝑡 , the QA system can generate a query 𝑆 ′ 𝑄𝑛𝑎𝑡 that is equivalent to the gold query 𝐺 𝑄𝑛𝑎𝑡 for 𝑄 𝑛𝑎𝑡 , i.e., such that </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>𝑎𝑛𝑠𝑤𝑒𝑟𝑠(𝑆 ′</head><p>𝑄𝑛𝑎𝑡 ) = 𝑎𝑛𝑠𝑤𝑒𝑟𝑠(𝐺 𝑄𝑛𝑎𝑡 ). <ref type="foot" target="#foot_0">1</ref> In particular, we approach this problem as a machine translation task, that is, we compute 𝑆 ′ 𝑄𝑛𝑎𝑡 as 𝑆 ′ 𝑄𝑛𝑎𝑡 = 𝑇 𝑟𝑎𝑛𝑠𝑙𝑎𝑡𝑒(𝑄 𝑛𝑎𝑡 ), where 𝑇 𝑟𝑎𝑛𝑠𝑙𝑎𝑡𝑒 is the translation function implemented by our QA System, called sparql-qa.</p><p>In the remainder, we first present an intermediate format conceived to boost the training time of the entire process and reduce the impact of words that reference individuals that are not mentioned in the training set, in turn, we describe our translation modules that take as input the dataset in the new format.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1.">A new data set format</head><p>In general, NL to SPARQL datasets are composed of a set of pairs ⟨𝑄 𝑛𝑎𝑡 , 𝐺 𝑄𝑛𝑎𝑡 ⟩. In such a common type of representation, the named entities found in the question are typically represented directly by their URIs in the SPARQL query, but this transformation is hard to learn from mere examples, and the trained system would fail if the transformation can not be described as simple rules. This is an issue, especially in large ontologies, where there is a huge number of resources.</p><p>A dataset in QQT is composed of a set of triples in the form ⟨𝑄𝑢𝑒𝑠𝑡𝑖𝑜𝑛, 𝑄𝑢𝑒𝑟𝑦𝑇 𝑒𝑚𝑝𝑙𝑎𝑡𝑒, 𝑇 𝑎𝑔𝑔𝑖𝑛𝑔⟩, where 𝑄𝑢𝑒𝑠𝑡𝑖𝑜𝑛 is a natural language question, and 𝑇 𝑎𝑔𝑔𝑖𝑛𝑔 marks which parts of 𝑄𝑢𝑒𝑠𝑡𝑖𝑜𝑛 are entities, and 𝑄𝑢𝑒𝑟𝑦𝑇 𝑒𝑚𝑝𝑙𝑎𝑡𝑒 is a SPARQL query template with the following modifications: (𝑖) The KB resources are replaced by one or more variables; (𝑖𝑖) A new triple is added for each variable in the form "?var rdfs:label placeholder". 𝑃 𝑙𝑎𝑐𝑒ℎ𝑜𝑙𝑑𝑒𝑟𝑠 are meant to be replaced by substrings of 𝑄𝑢𝑒𝑠𝑡𝑖𝑜𝑛 depending on 𝑇 𝑎𝑔𝑔𝑖𝑛𝑔.</p><p>In Table <ref type="table" target="#tab_0">1</ref> we show an example of a ⟨𝑄 𝑛𝑎𝑡 , 𝑄 𝑠𝑝𝑎𝑟𝑞𝑙 ⟩ pair for the question Who painted the Mona Lisa?, while Table <ref type="table" target="#tab_1">2</ref> shows the corresponding ⟨𝑄𝑢𝑒𝑠𝑡𝑖𝑜𝑛, 𝑄𝑢𝑒𝑟𝑦𝑇 𝑒𝑚𝑝𝑙𝑎𝑡𝑒, 𝑇 𝑎𝑔𝑔𝑖𝑛𝑔⟩ triple in the QQT format.</p><p>In table 2 the term $1 denotes a placeholder, where 1 means that it has to be replaced by the first entity occurring in the question, that is Mona Lisa as represented by 𝐵 and 𝐼 in Tagging. Note that, in the QQT format, the query template does not contain any DBpedia resource, thus the learning model (which is the neural network in our case) does not need to understand that Mona Lisa stands for the dbr:Mona_Lisa resource and the 𝑄𝑢𝑒𝑟𝑦𝑇 𝑒𝑚𝑝𝑙𝑎𝑡𝑒 is exactly the same for all questions asking the author of a given artwork.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.">The translation modules</head><p>Our approach consists of two deep neural networks, the first one specialized in Neural Machine Translation (NMT) based on the well-known Seq2Seq <ref type="bibr" target="#b3">[4]</ref> model and the second one used for extracting the entities from the question using the Named Entity Recognition (NER) technique.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.1.">Neural Machine Translation</head><p>The network focused on NMT is used to translate the question into a SPARQL 𝑄𝑢𝑒𝑟𝑦𝑇 𝑒𝑚𝑝𝑙𝑎𝑡𝑒. The network is based on an Encoder-Decoder model with Luong's attention <ref type="bibr" target="#b16">[17]</ref>, in which the Encoder extracts semantic content from the question in natural language and encodes it into a fixed-dimensional vector representation 𝑉 . Instead, the Decoder tries to decode 𝑉 into a sequence in the output language (𝑄𝑢𝑒𝑟𝑦𝑇 𝑒𝑚𝑝𝑙𝑎𝑡𝑒).</p><p>The Encoder is composed of an input layer that receives a question in natural language converted into a sequence of word-embeddings obtained by mean of FastText <ref type="bibr" target="#b17">[18]</ref>, in the form {𝑥 1 , 𝑥 2 , ..., 𝑥 𝑡 }, where 𝑥 𝑡 is the vector representation of the word 𝑡 in the sentence. Next, we use a Bidirectional LSTM (BiLSTM) to summarize {𝑥 1 , 𝑥 2 , ..., 𝑥 𝑡 } into 𝑉 , in forward and reverse orders. 𝑉 is formed by concatenating the last hidden states in the two directions.</p><p>On the other hand, during the training process, the Decoder is responsible for calculating the word-embeddings of the output language tokens (SPARQL), which is used together with the vector 𝑉 , provided by the Encoder, as input to a Luong-Decoder layer. This layer is responsible for decoding the sentence supported by the attention mechanism. Finally, the values are feed to a Fully Connected Network with a Softmax activation function that predicts the output sequence by calculating the conditional probability over the output vocabulary. Figure <ref type="figure" target="#fig_0">1</ref> shows the described network architecture.  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.2.">Named Entity Recognition</head><p>To perform the entity recognition, we created a BiLSTM-CRF <ref type="bibr" target="#b4">[5]</ref> network that constitutes state-of-the-art for this type of task. In this case, we again used FastText to obtain the wordembeddings and deal with OOV words. The model is composed of an input layer that receives the sequences of embeddings, followed by a BiLSTM connected to a Fully Connected layer. Finally, the information flows through a CRF layer that predicts the final sequence of tags. Figure <ref type="figure" target="#fig_1">2</ref> shows the described network architecture.</p><p>Finally, we mixed the results of both networks to obtain the final query 𝑆 ′ 𝑄𝑛𝑎𝑡 . Here, the placeholders in the 𝑄𝑢𝑒𝑟𝑦𝑇 𝑒𝑚𝑝𝑙𝑎𝑡𝑒 are replaced by the corresponding entities obtained with the NER network.</p><p>To better understand how sparql-qa works, we can translate, for example, the question: Where is Washington Monument located? First, the question is cleaned and split into tokens and then converted into a sequence of fastText word-embeddings. Then, the sequence is processed by the two networks used by our system. The NMT network translates the question into the corresponding QueryTemplate:</p><p>SELECT DISTINCT ?a WHERE { ?w dbo:location ?a . ?w rdfs:label $1 } successively the NER network calculates the tagging sequence: O O B I O, where it is indicated that the entity to be considered is Washington Monument (Positions 2 and 3 of the tagging sequence, respectively). Finally, in the composition phase, the results are mixed, obtaining the final query:</p><p>SELECT DISTINCT ?a WHERE { ?w dbo:location ?a .</p><p>?w rdfs:label "Washington Monument"@en }</p><p>It is important to note that the previous example describes the translation operation in general terms and does not go into the more complicated details of the process.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Experiments on Monument dataset</head><p>Setup. The Monument dataset was proposed as part of the Neural SPARQL Machines (NSpM) <ref type="bibr" target="#b9">[10]</ref> research. It contains 14,778 question-query pairs about the instances of type monument present in DBpedia. We compared our system with the state-of-the-art, thus, we have trained the Learner Module of NSpM as it was done in <ref type="bibr" target="#b9">[10]</ref>, where the authors proposed two instances of the Monument dataset that we will denote by Monumet300 and Monument600 containing 8,544 and 14,788 pairs, respectively. In both cases, the dataset split fixes 100 pairs for both validation and test set and keeps the rest for the training set. All the data is publicly available in the NSpM GitHub project. <ref type="foot" target="#foot_1">2</ref>We have implemented our system, called sparql-qa, by using Keras, a well-known framework for machine learning, on top of TensorFlow. We trained the networks by using Google Collaboratory, which is a virtual machine environment hosted in the cloud and based on Jupyter Notebooks. The environment provides 12GB of RAM and connects to Google Drive. To train our system, we first performed hyperparameter tuning focused on three metrics: embedding-size of the target language, batch size, and LSTM hidden units. The task was performed by using a grid search method. We set the number of epochs to 5, shuffling the dataset at the end of each one. After tuning, we set the hyperparameters of the two networks as follows: embedding-size is set to 300, LSTM hidden units are set to 96, and batch size is set to 64.</p><p>For comparing performance, we adopted the macro precision, recall, and F1-score measures, which are the most used ones to assess this kind of system. <ref type="table" target="#tab_2">3</ref> show that sparql-qa performs reasonably well, reaching F1-score values greater than 0.7. On the other hand, NSpM achieves better results.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Results. Results of the execution reported in Table</head><p>We have investigated why our system could not provide an optimal answer for some questions. This analysis evidenced that the performance of our approach is mainly affected by problems in the dataset. Indeed, there is a set of questions that lacks context to determine specific expected URIs. For example, for the question "What is Washington Monument related to?" our system uses "Washington Monument", but the gold query uses the specific URI: Wash-ington_Monument_(Baltimore). Note that there is no reference to Baltimore in the question text, and there are Washington Monuments also in Milwaukee and Philadelphia, according to DBPedia. Surprisingly, the compared system can often use the specific URI of the gold query even without context. Thus, we run another experiment to better outline the issue. We create a new test set of 200 pairs by using the templates provided by NSpM and a randomly selected set of unseen monument entities extracted from DBpedia. Table <ref type="table" target="#tab_3">4</ref> shows that our approach has the same good performance (F1 score greater than 0.78) and performs much better than NSpM that is not able to generalize to deal with OOV (F1 of 0.11).</p><p>Another cause that affects our approach is the correctness with which the named entities are written. Sometimes the entities mentioned in the question do not match the rdfs:label property value, and sometimes they are referenced using acronyms. In these cases, our system will not give the expected answers because it cannot reference the right DBpedia resources. To address these issues, we plan to use Named Entity Linking (NEL) <ref type="bibr" target="#b18">[19]</ref>, which allows us to determine accurately which DBpedia resources are present in the question.</p><p>Finally, for completeness, we report that the intermediate format allows us to save 40% of training time.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Conclusions and Future Work</head><p>The paper presents preliminary results on an approach for querying SPARQL knowledge bases by using natural language. We combine in our system both neural machine translation and named entity recognition modules and focus on attenuating the impact of the OOV words, an important issue that is not well considered in existing approaches. Our system showed good preliminary results on the Monument dataset and demonstrated a more general and robust behavior than state-of-the-art approaches.</p><p>In future work, we plan to extend our system to improve translation performance by integrating other NLP tools, such as Named Entity Linking and BERT contextual word embeddings. We also plan to extend our experiments by considering other well-known QA benchmarks.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Figure 1 :</head><label>1</label><figDesc>Figure 1: NMT neural network architecture</figDesc><graphic coords="5,90.13,471.69,213.31,170.02" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Figure 2 :</head><label>2</label><figDesc>Figure 2: NER neural network architecture</figDesc><graphic coords="5,334.30,481.36,167.40,145.80" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head>Table 1</head><label>1</label><figDesc>⟨𝑄𝑢𝑒𝑠𝑡𝑖𝑜𝑛, 𝑄𝑢𝑒𝑟𝑦⟩ pair for Who painted the Mona Lisa?</figDesc><table><row><cell>Question</cell><cell>Query</cell></row><row><cell>Who painted the</cell><cell>select ?a where</cell></row><row><cell>Mona Lisa?</cell><cell>{dbr:Mona_Lisa dbo:author ?a.}</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_1"><head>Table 2</head><label>2</label><figDesc>⟨𝑄𝑢𝑒𝑠𝑡𝑖𝑜𝑛, 𝑄𝑢𝑒𝑟𝑦𝑇 𝑒𝑚𝑝𝑙𝑎𝑡𝑒, 𝑇 𝑎𝑔𝑔𝑖𝑛𝑔⟩ triple for Who painted the Mona Lisa?</figDesc><table><row><cell>Question</cell><cell>QueryTemplate</cell><cell>Tagging</cell></row><row><cell>Who painted the</cell><cell>select ?a where</cell><cell></cell></row><row><cell>Mona Lisa?</cell><cell>{ ?w dbo:author ?a.</cell><cell>O O O B I O</cell></row><row><cell></cell><cell>?w rdfs:label $1 }</cell><cell></cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_2"><head>Table 3</head><label>3</label><figDesc>Comparison on Monument datasets.</figDesc><table><row><cell></cell><cell></cell><cell>Mon300</cell><cell></cell><cell></cell><cell>Mon600</cell></row><row><cell></cell><cell>P</cell><cell>R</cell><cell>F1</cell><cell>P</cell><cell>R</cell><cell>F1</cell></row><row><cell>NSpM</cell><cell cols="6">0.860 0.861 0.852 0.929 0.945 0.932</cell></row><row><cell cols="2">sparql-qa 0.78</cell><cell>0.78</cell><cell>0.78</cell><cell cols="3">0.791 0.791 0.791</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_3"><head>Table 4</head><label>4</label><figDesc>Comparison with OOV entities on Monument datasets.</figDesc><table><row><cell></cell><cell></cell><cell>Mon300</cell><cell></cell><cell></cell><cell>Mon600</cell></row><row><cell></cell><cell>P</cell><cell>R</cell><cell>F1</cell><cell>P</cell><cell>R</cell><cell>F1</cell></row><row><cell>NSpM</cell><cell cols="4">0.097 0.123 0.101 0.11</cell><cell>0.11</cell><cell>0.11</cell></row><row><cell cols="7">sparql-qa 0.795 0.795 0.795 0.785 0.785 0.785</cell></row></table></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0">Note that we are interested in computing the answers and not in syntactically reproducing the gold query.</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1">https://github.com/LiberAI/NSpM/tree/master/data</note>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Acknowledgments</head><p>This work was partially supported by the Italian Ministry of Economic Development (MISE) under projects "MAP4ID -Multipurpose Analytics Platform 4 Industrial Data", N. F/190138/01-03/X44.</p></div>
			</div>

			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Dbpedia-a large-scale, multilingual knowledge base extracted from wikipedia</title>
		<author>
			<persName><forename type="first">J</forename><surname>Lehmann</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Isele</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Jakob</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Jentzsch</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Kontokostas</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><forename type="middle">N</forename><surname>Mendes</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Hellmann</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Morsey</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Van Kleef</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Semantic Web</title>
		<imprint>
			<biblScope unit="volume">6</biblScope>
			<biblScope unit="page" from="167" to="195" />
			<date type="published" when="2015">2015</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<monogr>
		<author>
			<persName><surname>W3c</surname></persName>
		</author>
		<ptr target="https://www.w3.org" />
		<title level="m">Semantic web standards</title>
				<imprint>
			<date type="published" when="2014">2014</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Long short-term memory</title>
		<author>
			<persName><forename type="first">S</forename><surname>Hochreiter</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Schmidhuber</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Neural Computation</title>
		<imprint>
			<biblScope unit="volume">9</biblScope>
			<biblScope unit="page" from="1735" to="1780" />
			<date type="published" when="1997">1997</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Sequence to sequence learning with neural networks</title>
		<author>
			<persName><forename type="first">I</forename><surname>Sutskever</surname></persName>
		</author>
		<author>
			<persName><forename type="first">O</forename><surname>Vinyals</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Q</forename><forename type="middle">V</forename><surname>Le</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">NIPS</title>
		<imprint>
			<biblScope unit="page" from="3104" to="3112" />
			<date type="published" when="2014">2014</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<monogr>
		<title level="m" type="main">Bidirectional LSTM-CRF models for sequence tagging</title>
		<author>
			<persName><forename type="first">Z</forename><surname>Huang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Xu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Yu</surname></persName>
		</author>
		<idno>CoRR abs/1508.01991</idno>
		<imprint>
			<date type="published" when="2015">2015</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<monogr>
		<title level="m" type="main">Natural language query interpretation into sparql using patterns</title>
		<author>
			<persName><forename type="first">C</forename><surname>Pradel</surname></persName>
		</author>
		<author>
			<persName><forename type="first">O</forename><surname>Haemmerlé</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Hernandez</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2013">2013</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">From natural language questions to SPARQL queries: A pattern-based approach</title>
		<author>
			<persName><forename type="first">N</forename><surname>Steinmetz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Arning</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Sattler</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">BTW, volume P-289 of LNI</title>
				<meeting><address><addrLine>Bonn</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2019">2019</date>
			<biblScope unit="page" from="289" to="308" />
		</imprint>
		<respStmt>
			<orgName>Gesellschaft für Informatik</orgName>
		</respStmt>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<monogr>
		<title level="m" type="main">Seq2sql: Generating structured queries from natural language using reinforcement learning</title>
		<author>
			<persName><forename type="first">V</forename><surname>Zhong</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Xiong</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Socher</surname></persName>
		</author>
		<idno>CoRR abs/1709.00103</idno>
		<imprint>
			<date type="published" when="2017">2017</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<monogr>
		<title level="m" type="main">Semantic parsing natural language into SPARQL: improving target language representation with neural attention</title>
		<author>
			<persName><forename type="first">F</forename><forename type="middle">F</forename><surname>Luz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Finger</surname></persName>
		</author>
		<idno>CoRR abs/1803.04329</idno>
		<imprint>
			<date type="published" when="2018">2018</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">SPARQL as a foreign language</title>
		<author>
			<persName><forename type="first">T</forename><surname>Soru</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Marx</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Moussallem</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Publio</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Valdestilhas</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Esteves</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">B</forename><surname>Neto</surname></persName>
		</author>
		<ptr target="https://arxiv.org/abs/1708.07624" />
	</analytic>
	<monogr>
		<title level="m">SEMANTiCS 2017 -Posters and Demos</title>
				<imprint>
			<date type="published" when="2017">2017</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<monogr>
		<title level="m" type="main">Generating a large dataset for neural question answering over the DBpedia knowledge base</title>
		<author>
			<persName><forename type="first">A</forename><surname>Hartmann</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Marx</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Soru</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2018">2018</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">Formal query building with query structure prediction for complex question answering over knowledge base</title>
		<author>
			<persName><forename type="first">Y</forename><surname>Chen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><surname>Li</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Hua</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Qi</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">IJCAI</title>
				<imprint>
			<date type="published" when="2020">2020</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<monogr>
		<title level="m" type="main">Neural machine translating from natural language to SPARQL</title>
		<author>
			<persName><forename type="first">X</forename><surname>Yin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Gromann</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Rudolph</surname></persName>
		</author>
		<idno>CoRR abs/1906.09302</idno>
		<imprint>
			<date type="published" when="2019">2019</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<analytic>
		<title level="a" type="main">Convolutional sequence to sequence learning</title>
		<author>
			<persName><forename type="first">J</forename><surname>Gehring</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Auli</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Grangier</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Yarats</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><forename type="middle">N</forename><surname>Dauphin</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">ICML, volume 70 of Proc. of ML Research</title>
				<meeting><address><addrLine>PMLR</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2017">2017</date>
			<biblScope unit="page" from="1243" to="1252" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<monogr>
		<author>
			<persName><forename type="first">T</forename><surname>Yu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Zhang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Yang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Yasunaga</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Wang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Z</forename><surname>Li</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Ma</surname></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><surname>Li</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Q</forename><surname>Yao</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Roman</surname></persName>
		</author>
		<idno type="arXiv">arXiv:1809.08887</idno>
		<title level="m">Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task</title>
				<imprint>
			<date type="published" when="2018">2018</date>
		</imprint>
	</monogr>
	<note type="report_type">arXiv preprint</note>
</biblStruct>

<biblStruct xml:id="b15">
	<monogr>
		<author>
			<persName><forename type="first">R</forename><surname>Zhang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Yu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><forename type="middle">Y</forename><surname>Er</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Shim</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Xue</surname></persName>
		</author>
		<author>
			<persName><forename type="first">X</forename><forename type="middle">V</forename><surname>Lin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Shi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Xiong</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>Socher</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Radev</surname></persName>
		</author>
		<idno type="arXiv">arXiv:1909.00786</idno>
		<title level="m">Editing-based sql query generation for cross-domain context-dependent questions</title>
				<imprint>
			<date type="published" when="2019">2019</date>
		</imprint>
	</monogr>
	<note type="report_type">arXiv preprint</note>
</biblStruct>

<biblStruct xml:id="b16">
	<monogr>
		<author>
			<persName><forename type="first">M</forename><surname>Luong</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><surname>Pham</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">D</forename><surname>Manning</surname></persName>
		</author>
		<idno type="arXiv">arXiv:1508.04025</idno>
		<title level="m">Effective approaches to attention-based neural machine translation</title>
				<imprint>
			<date type="published" when="2015">2015</date>
		</imprint>
	</monogr>
	<note type="report_type">arXiv preprint</note>
</biblStruct>

<biblStruct xml:id="b17">
	<analytic>
		<title level="a" type="main">Enriching word vectors with subword information</title>
		<author>
			<persName><forename type="first">P</forename><surname>Bojanowski</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Grave</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Joulin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Mikolov</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">TACL</title>
		<imprint>
			<biblScope unit="volume">5</biblScope>
			<biblScope unit="page" from="135" to="146" />
			<date type="published" when="2017">2017</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b18">
	<analytic>
		<title level="a" type="main">Entity linking with a knowledge base: Issues, techniques, and solutions</title>
		<author>
			<persName><forename type="first">W</forename><surname>Shen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Wang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Han</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">IEEE Transactions on Knowledge and Data Engineering</title>
		<imprint>
			<biblScope unit="volume">27</biblScope>
			<biblScope unit="page" from="443" to="460" />
			<date type="published" when="2014">2014</date>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
