Automated SPARQL Template for Flexible Question Answering

Dewi Wardani (1), Andreas Wijaya (2), Ardhi Wijayanto (3), Maria Ulfah Siregar (4), Yessi Yunitasari (5)
(1) Department of Data Science, Universitas Sebelas Maret, Surakarta, Central Java, Indonesia
(2) Department of Informatics, Universitas Sebelas Maret, Surakarta, Central Java, Indonesia
(3) Department of Informatics, Universitas Sebelas Maret, Surakarta, Central Java, Indonesia
(4) Department of Informatics, UIN Sunan Kalijaga, Yogyakarta, Indonesia
(5) Department of Information Technology, Universitas PGRI Madiun, East Java, Indonesia
Fulltext View | Download
How to cite (IJASEIT) :
Wardani, Dewi, et al. “Automated SPARQL Template for Flexible Question Answering”. International Journal on Advanced Science, Engineering and Information Technology, vol. 14, no. 4, Aug. 2024, pp. 1185-91, doi:10.18517/ijaseit.14.4.18975.
The knowledge bases required the query language SPARQL, which consists of subject, property, and object. SPARQL is a structured query language and is difficult to understand. That issue becomes a problem in natural language processing queries. One situation in question answering is how to translate natural language into a structural SPARQL. This work aims to develop an automated SPARQL template algorithm regardless of the pattern structure of the query triples. It provides a more varied SPARQL query for data retrieval named Flexible SPARQL. This approach initially lies in combining elements of RDF with basic techniques of natural language processing to generate a template of SPARQL. In this work, the approach to making automatic templates is proposed without regard to the pattern of the triple structure or the location of the subject and object. Template-based research that exists today still uses rules to determine the position of subjects, objects, and properties in the SPARQL structure. Therefore, this work used the QALD 7 question set and DBpedia dataset. The previous systems utilized the same questions and data sets. Despite the simple proposed approaches that do not use complex, sophisticated techniques, they have shown promising results compared to the previous systems. The accuracy result from 215 questions is 73% and micro-Recall 0.701, micro-Precision 0.664, micro-F-Measure 0.682, macro-Recall 0.711, macro-Precision 0.592, macro-F-Measure 0.646. Overall, the Flexible SPARQL system has higher results on several measurements that define a promising approach. However, it's important to note that Flexible SPARQL generally tends to fail at generating complex SPARQL, which is a limitation of the system.

D. Diefenbach, A. Both, K. Singh, and P. Maret, “Towards a question answering system over the Semantic Web,” Semantic Web, vol. 11, no. 3, pp. 421–439, Apr. 2020, doi: 10.3233/sw-190343.

N. D. To and M. Reformat, “Question-Answering System with Linguistic Terms over RDF Knowledge Graphs,” 2020 IEEE International Conference on Systems, Man, and Cybernetics (SMC), Oct. 2020, doi: 10.1109/smc42975.2020.9282949.

S. Wang, J. Jiao, and X. Zhang, “A Semantic Similarity-based Subgraph Matching Method for Improving Question Answering over RDF,” Companion Proceedings of the Web Conference 2020, Apr. 2020, doi: 10.1145/3366424.3382698.

A. Saxena, A. Tripathi, and P. Talukdar, “Improving Multi-hop Question Answering over Knowledge Graphs using Knowledge Base Embeddings,” Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, 2020, doi:10.18653/v1/2020.acl-main.412.

Y. Qiu, Y. Wang, X. Jin, and K. Zhang, “Stepwise Reasoning for Multi-Relation Question Answering over Knowledge Graph with Weak Supervision,” Proceedings of the 13th International Conference on Web Search and Data Mining, Jan. 2020, doi:10.1145/3336191.3371812.

R. G. Athreya, S. K. Bansal, A.-C. N. Ngomo, and R. Usbeck, “Template-based Question Answering using Recursive Neural Networks,” 2021 IEEE 15th International Conference on Semantic Computing (ICSC), Jan. 2021, doi: 10.1109/icsc50631.2021.00041.

A. K. Dileep, A. Mishra, R. Mehta, S. Uppal, J. Chakraborty, and S. K. Bansal, “Template-based Question Answering analysis on the LC-QuAD2.0 Dataset,” 2021 IEEE 15th International Conference on Semantic Computing (ICSC), Jan. 2021, doi:10.1109/icsc50631.2021.00079.

X. Lin and Y. Zhang, “Knowledge Graph Post-Processing for QA Systems,” 2021 7th International Conference on Computing and Artificial Intelligence, Apr. 2021, doi: 10.1145/3467707.3467758.

T. Souza Costa, S. Gottschalk, and E. Demidova, “Event-QA,” Proceedings of the 29th ACM International Conference on Information & Knowledge Management, Oct. 2020, doi:10.1145/3340531.3412760.

M. Del Tredici, G. Barlacchi, X. Shen, W. Cheng, and A. de Gispert, “Question Rewriting for Open-Domain Conversational QA,” Proceedings of the 30th ACM International Conference on Information & Knowledge Management, Oct. 2021, doi:10.1145/3459637.3482164.

P. Qin et al., “Unified QA-aware Knowledge Graph Generation Based on Multi-modal Modeling,” Proceedings of the 30th ACM International Conference on Multimedia, Oct. 2022, doi:10.1145/3503161.3551604.

W. Ali, M. Saleem, B. Yao, A. Hogan, and A.-C. N. Ngomo, “A survey of RDF stores & SPARQL engines for querying knowledge graphs,” The VLDB Journal, vol. 31, no. 3, pp. 1–26, Nov. 2021, doi:10.1007/s00778-021-00711-3.

D. Wardani and M. Susmawati, “SESS: Utilization of SPIN for Ethnomedicine Semantic Search,” Proceedings of the 2022 International Conference on Computer, Control, Informatics and Its Applications, Nov. 2022, doi: 10.1145/3575882.3575912.

K. S. Gan, P. Anthony, K. O. Chin, and A. R. Hamdan, “Enforcing Social Semantic in FIPA-ACL Using SPIN,” Smart Innovation, Systems and Technologies, pp. 3–13, Jun. 2019, doi: 10.1007/978-981-13-8679-4_1.

C. Wang and X. Zhang, “Q-BERT: A BERT-based Framework for Computing SPARQL Similarity in Natural Language,” Companion Proceedings of the Web Conference 2020, Apr. 2020, doi:10.1145/3366424.3382699.

P. Kaur, and P. Nand, "Towards Transparent Governance by Unifying Open Data," IAENG International Journal of Computer Science, vol. 48, no.4, pp986-1004, 2021

A. Ben Ayed, I. Biskri, and J.-G. Meunier, “An Enhanced Lucene based System for Efficient Document/Information Retrieval,” Computer Science & Information Technology, Jul. 2020, doi:10.5121/csit.2020.100913.

Y. Tan, Y. Chen, G. Qi, W. Li, and M. Wang, “MLPQ: A Dataset for Path Question Answering over Multilingual Knowledge Graphs,” Big Data Research, vol. 32, p. 100381, May 2023, doi:10.1016/j.bdr.2023.100381.

A. Perevalov, D. Diefenbach, R. Usbeck, and A. Both, “QALD-9-plus: A Multilingual Dataset for Question Answering over DBpedia and Wikidata Translated by Native Speakers,” 2022 IEEE 16th International Conference on Semantic Computing (ICSC), Jan. 2022, doi: 10.1109/icsc52841.2022.00045.

R. Frosini, A. Poulovassilis, P. T. Wood, and A. Calí, “Optimisation Techniques for Flexible SPARQL Queries,” ACM Transactions on the Web, vol. 16, no. 4, pp. 1–44, Nov. 2022, doi: 10.1145/3532855.

A. Calì, R. Frosini, A. Poulovassilis, and P. T. Wood, “Flexible Querying for SPARQL,” On the Move to Meaningful Internet Systems: OTM 2014 Conferences, pp. 473–490, 2014, doi: 10.1007/978-3-662-45563-0_28.

D. Q. Nguyen, D. Q. Nguyen, and S. B. Pham, “Ripple Down Rules for question answering,” Semantic Web, vol. 8, no. 4, pp. 511–532, Jan. 2017, doi: 10.3233/sw-150204.

E. Adhim and D. Wardani, “Improving the Result of Question Answering System with Semantic Similarity Method Based on Hierarchy in Ontology,” Proceedings of the 2021 International Conference on Computer, Control, Informatics and Its Applications, Oct. 2021, doi: 10.1145/3489088.3489095.

X. Yin, D. Gromann, and S. Rudolph, “Neural machine translating from natural language to SPARQL,” Future Generation Computer Systems, vol. 117, pp. 510–519, Apr. 2021, doi:10.1016/j.future.2020.12.013.

D. Punjani and E. Tsalapati, “Question Answering Engines for Geospatial Knowledge Graphs,” Geospatial Data Science, pp. 257–282, Jun. 2023, doi: 10.1145/3581906.3581922.

M. Bakhshi, M. Nematbakhsh, M. Mohsenzadeh, and A. M. Rahmani, “Data-driven construction of SPARQL queries by approximate question graph alignment in question answering over knowledge graphs,” Expert Systems with Applications, vol. 146, p. 113205, May 2020, doi: 10.1016/j.eswa.2020.113205.

N. Bölücü and B. Can, “A Cascaded Unsupervised Model for PoS Tagging,” ACM Transactions on Asian and Low-Resource Language Information Processing, vol. 20, no. 1, pp. 1–23, Jan. 2021, doi:10.1145/3447759.

D. Diefenbach, K. Singh, and P. Maret, “WDAqua-core1: A Question Answering service for RDF Knowledge Bases,” Companion of the The Web Conference 2018 on The Web Conference 2018 - WWW ’18, 2018, doi: 10.1145/3184558.3191541.

R. Huang and L. Zou, “Natural language question answering over RDF data,” Proceedings of the 2013 ACM SIGMOD International Conference on Management of Data, Jun. 2013, doi:10.1145/2463676.2463725.

Y.H. Chen, E. J.-L. Lu, and T.-A. Ou, “Intelligent SPARQL Query Generation for Natural Language Processing Systems,” IEEE Access, vol. 9, pp. 158638–158650, 2021, doi: 10.1109/access.2021.3130667.

S. Liang, K. Stockinger, T. M. de Farias, M. Anisimova, and M. Gil, “Querying knowledge graphs in natural language,” Journal of Big Data, vol. 8, no. 1, Jan. 2021, doi: 10.1186/s40537-020-00383-w.

D. Wardani, “Complete W3C-Semantic’s Interpretations of AP-RDF,” IAENG International Journal of Computer Science, vol. 49, no. 3, 2022.

Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 International License.

Authors who publish with this journal agree to the following terms:

    1. Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
    2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
    3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).