Abstract
We describe how we used a Triple Pattern Fragments (TPF) interface and the Comunica knowledge graph querying framework to enable live SPARQL queries over ConceptNet, one of largest knowledge graphs for commonsense reasoning publicly available on the Web. Despite being a Linked Data resource, the official ConceptNet is not published in RDF and does not support SPARQL. Instead, it provides a RESTful API for live queries, which are restricted to simple triple patterns. This limited API makes it hard for users to search for non-trivial patterns in the graph and hinders the possibility of federated queries offered by SPARQL. There have been attempts to convert ConceptNet to RDF but such proposals tend to quickly become obsolete. In this paper, we take a different route. We use TPF to expose a low-level RDF query interface to ConceptNet. This low-level interface is built on top of the ConceptNet API and can be used by TPF-compatible SPARQL engines such as Comunica. Using this approach, we were able evaluate non-trivial SPARQL queries, including federated queries, over ConceptNet on-the-fly. Our experiments showed that overhead incurred is small and can be further reduced by optimizing ConceptNet’s internal edge representation. We argue that such overhead is justified by the gains in expressivity and flexibility. Moreover, the overall approach is general and can be extended to other non-RDF knowledge graphs.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
https://github.com/commonsense/ConceptNet5 (fda1b39, Sep. 7, 2021.).
- 14.
https://github.com/LinkedDataFragments/Server.js (b8cc6e3, Nov. 11, 2022.).
- 15.
https://github.com/comunica/comunica (e4b91d5, Nov. 25, 2022.).
References
Cai, H., Zhao, F., Jin, H.: Commonsense knowledge construction with concept and pretrained model. In: Zhao, X., Yang, S., Wang, X., Li, J. (eds.) WISA 2022. LNCS, vol. 13579, pp. 40–51. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-20309-1_4
Chen, H., Trouve, A., Murakami, K.J., Fukuda, A.: An introduction to question answering with ConceptRDF. In: Proceedings of 2nd IEEE International Conference on Computational Intelligence and Applications (ICCIA), Beijing, China, 8–11 September 2017, pp. 537–541. IEEE (2017). https://doi.org/10.1109/CIAPP.2017.8167275
Chen, H., Trouve, A., Murakami, K.J., Fukuda, A.: A concise conversion model for improving the RDF expression of ConceptNet knowledge base. In: Lu, H., Xu, X. (eds.) Artificial Intelligence and Robotics. SCI, vol. 752, pp. 213–221. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-69877-9_23
Cyganiak, R., Wood, D., Lanthaler, M.: RDF 1.1 concepts and abstract syntax. W3C recommendation, W3C (2014). http://www.w3.org/TR/2014/REC-rdf11-concepts-20140225/
Fernández, J.D., Martínez-Prieto, M.A., Gutiérrez, C., Polleres, A., Arias, M.: Binary RDF representation for publication and exchange (HDT). J. Web Semant. 19, 22–41 (2013). https://doi.org/10.1016/j.websem.2013.01.002
Fielding, R.T.: Architectural styles and the design of network-based software architectures. Ph.D. thesis, University of California, Irvine (2000)
Grassi, M., Piazza, F.: Towards an RDF encoding of ConceptNet. In: Liu, D., Zhang, H., Polycarpou, M., Alippi, C., He, H. (eds.) ISNN 2011. LNCS, vol. 6677, pp. 558–565. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21111-9_63
Lehmann, J., et al.: DBpedia - a large-scale, multilingual knowledge base extracted from Wikipedia. Semant. Web 6, 167–195 (2015). https://doi.org/10.3233/SW-140134
Lin, B.Y., Wu, Z., Yang, Y., Lee, D.H., Ren, X.: RiddleSense: reasoning about riddle questions featuring linguistic creativity and commonsense knowledge. In: Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pp. 1504–1515. ACL (2021). https://doi.org/10.18653/v1/2021.findings-acl.131
Longley, D., Kellogg, G., Lanthaler, M., Sporny, M., Lindström, N.: JSON-LD 1.1 processing algorithms and API. W3C recommendation, W3C (2020). https://www.w3.org/TR/json-ld11-api/
Miller, G.A.: WordNet: a lexical database for english. Commun. ACM 38(11), 39–41 (1995). https://doi.org/10.1145/219717.219748
Najmi, E., Hashmi, K., Malik, Z., Rezgui, A., Khanz, H.U.: ConceptOnto: an upper ontology based on ConceptNet. In: Proceedings of the IEEE/ACS 11th International Conference on Computer Systems and Applications (AICCSA), pp. 366–372. IEEE (2014). https://doi.org/10.1109/AICCSA.2014.7073222
Najmi, E., Malik, Z., Hashmi, K., Rezgui, A.: ConceptRDF: an RDF presentation of ConceptNet knowledge base. In: Proceedings of 7th International Conference on Information and Communication Systems (ICICS), pp. 145–150. IEEE (2016)
Pérez, J., Arenas, M., Gutierrez, C.: Semantics and complexity of SPARQL. ACM Trans. Database Syst. 34(3), 16:1–16:45 (2009). https://doi.org/10.1145/1567274.1567278
Prud’hommeaux, E., Buil-Aranda, C.: SPARQL 1.1 federated query. W3C recommendation, W3C (2013). https://www.w3.org/TR/2013/REC-sparql11-federated-query-20130321/
Singh, P.: The public acquisition of commonsense knowledge. In: Proceedings of the AAAI Spring Symposium: Acquiring (and Using) Linguistic (and World) Knowledge for Information Access. AAAI (2002)
Speer, R., Chin, J., Havasi, C.: ConceptNet 5.5: an open multilingual graph of general knowledge. In: Proceedings of the 31st AAAI Conference on Artificial Intelligence (AAAI-17), San Francisco, California, USA, 4–9 February 2017, pp. 4444–4451. AAAI (2017)
Speer, R., Lowry-Duda, J.: ConceptNet at SemEval-2017 task 2: extending word embeddings with multilingual relational knowledge. In: Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), Vancouver, Canada, August 2017, pp. 85–89. ACL (2017). https://doi.org/10.18653/v1/S17-2008
Sporny, M., Longley, D., Kellogg, G., Lanthaler, M., Champin, P.A., Lindström, N.: JSON-LD 1.1: a JSON-based serialization for linked data. W3C recommendation, W3C (2020). https://www.w3.org/TR/json-ld/
Taelman, R., Van Herwegen, J., Vander Sande, M., Verborgh, R.: Comunica: a modular SPARQL query engine for the web. In: Vrandečić, D., et al. (eds.) ISWC 2018. LNCS, vol. 11137, pp. 239–255. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-00668-6_15
Tamilselvam, S., Nagar, S., Mishra, A., Dey, K.: Graph based sentiment aggregation using ConceptNet ontology. In: Proceedings of the 8th International Joint Conference on Natural Language Processing, Taipei, Taiwan, November 2017 (Volume 1: Long Papers), pp. 525–535. Asian Federation of Natural Language Processing (2017)
Vardi, M.Y.: The complexity of relational query languages (extended abstract). In: Proceedings of the 14th Annual ACM Symposium on Theory of Computing (STOC 1982), San Francisco, California, USA, May 1982, pp. 137–146. ACM (1982). https://doi.org/10.1145/800070.802186
Verborgh, R., Sande, M.V., Colpaert, P., Coppens, S., Mannens, E., de Walle, R.V.: Web-scale querying through linked data fragments. In: Proceedings of the Workshop on Linked Data on the Web co-located with the 23rd International World Wide Web Conference (WWW 2014), Seoul, Korea, 8 April 2014. CEUR-WS.org (2014)
Verborgh, R., et al.: Triple pattern fragments: a low-cost knowledge graph interface for the web. J. Web Semantics 37–38, 184–206 (2016). https://doi.org/10.1016/j.websem.2016.03.003
Vrandečić, D., Krötzsch, M.: WikiData: a free collaborative knowledgebase. Commun. ACM 57(10), 78–85 (2014). https://doi.org/10.1145/2629489
W3C SPARQL working group: SPARQL 1.1 overview. W3C recommendation, W3C (2013). http://www.w3.org/TR/2013/REC-sparql11-overview-20130321/
Ye, S., Xie, Y., Chen, D., Xu, Y., Yuan, L., Zhu, C., Liao, J.: Improving commonsense in vision-language models via knowledge graph riddles (2022). https://doi.org/10.48550/ARXIV.2211.16504
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Machado, M., Lima, G., Soares, E., Uceda-Sosa, R., Cerqueira, R. (2023). Enabling Live SPARQL Queries over ConceptNet Using Triple Pattern Fragments. In: Pesquita, C., et al. The Semantic Web. ESWC 2023. Lecture Notes in Computer Science, vol 13870. Springer, Cham. https://doi.org/10.1007/978-3-031-33455-9_39
Download citation
DOI: https://doi.org/10.1007/978-3-031-33455-9_39
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-33454-2
Online ISBN: 978-3-031-33455-9
eBook Packages: Computer ScienceComputer Science (R0)