From Natural Language Processing to Knowledge Graphs: A Categorical Framework for Translating Sentences into RDF Graphs
Description
This thesis develops, in a mathematically complete and self-contained manner, a compositional translation from a fragment of natural language into the Resource Description Framework (RDF), the graph-based knowledge representation language of the Semantic Web. The translation, due in outline to Delpeuch and Preller, rests on three pillars: pregroup grammars, which recognise grammatical sentences through an efficient type-logical calculus; compact closed categories, which organise the syntax–semantics interface; and free semimodules over the Boolean semiring, whose tensor cube hosts RDF graphs as algebraic objects. Our contribution is one of mathematical consolidation and completion. We give full proofs of the results that the original literature states without proof or only sketches: the Switching Lemma for free pregroups, the Decomposition Lemma for first-order lexica, the monoidality of the category of morphisms with side effects, the translation theorem producing one RDF triple per property word, and the theorem that truth in extensional models is preserved by, and reflected in, the induced RDF interpretations. Along the way we repair several subtle gaps: the derivational order on a free pregroup is a preorder rather than a partial order; unrestricted symmetry would collapse word order and over-generate, so reductions must be planar; the tensor operation on side effects fails the interchange law without a kernel condition, for which we give an explicit counterexample; and the uniqueness of bases over the Boolean semiring, tacitly assumed throughout the construction, is established as a lemma. Finally we delimit the expressive power of the framework — negation and universal quantification are provably not representable — and discuss extensions and the place of such symbolic–compositional translations alongside modern statistical language models.
Files
main.pdf
Additional details
References
- Wojciech Buszkowski. Lambek grammars based on pregroups. In Logical Aspects of Computational Linguistics (LACL 2001), volume 2099 of Lecture Notes in Computer Science, pages 95–109, Berlin, Heidelberg, 2001. Springer.
- Stephen Clark, Bob Coecke, and Mehrnoosh Sadrzadeh. A compositional distributional model of meaning. In Peter Bruza, William Lawless, and Keith van Rijsbergen, editors, Proceedings of the Second Quantum Interaction Symposium (QI-2008), Oxford, UK, 2008. College Publications.
- Bob Coecke, Mehrnoosh Sadrzadeh, and Stephen Clark. Mathematical foundations for a compositional distributional model of meaning. Linguistic Analysis, 36(1–4):345–384, 2010.
- Richard Cyganiak, David Wood, and Markus Lanthaler. RDF 1.1 concepts and abstract syntax. W3c recommendation, W3C, February 2014.
- Sylvain Degeilh and Anne Preller. Efficiency of pregroups and the French noun phrase. Journal of Logic, Language and Information, 14(4):423–444, 2005.
- Antonin Delpeuch and Anne Preller. From natural language to RDF graphs with pregroups. In Proceedings of the EACL 2014 Workshop on Type Theory and Natural Language Semantics (TTNLS), pages 55– 62, Gothenburg, Sweden, April 2014. Association for Computational Linguistics
- Jonathan S. Golan. Semirings and their Applications. Springer Science & Business Media, 1999.
- Aidan Hogan, Eva Blomqvist, Michael Cochez, Claudia d'Amato, Gerard de Melo, Claudio Gutiérrez, Sabrina Kirrane, José Emilio Labra Gayo, Roberto Navigli, Sebastian Neumaier, Axel-Cyrille Ngonga Ngomo, Axel Polleres, Sabbir M. Rashid, Anisa Rula, Lukas Schmelzeisen, Juan Sequeda, Steffen Staab, and Antoine Zimmermann. Knowledge graphs. ACM Computing Surveys, 54(4):1–37, 2021.
- Patrick Hayes and Brian McBride. RDF semantics. W3c recommendation, W3C, February 2004.
- Dimitri Kartsaklis, Ian Fan, Richie Yeung, Anna Pearson, Robin Lorenz, Alexis Toumi, Giovanni de Felice, Konstantinos Meichanetzidis, Stephen Clark, and Bob Coecke. lambeq: An efficient high-level Python library for quantum NLP, 2021.
- Dimitri Kartsaklis, Mehrnoosh Sadrzadeh, and Stephen Pulman. Separating disambiguation from composition in distributional semantics. In Proceedings of the 17th Conference on Computational Natural Language Learning (CoNLL), pages 114–123, Sofia, Bulgaria, August 2013. Association for Computational Linguistics
- Joachim Lambek. The mathematics of sentence structure. American Mathematical Monthly, 65(3):154–170, 1958.
- Joachim Lambek. From categorial grammar to bilinear logic. In Peter Schroeder-Heister and Kosta Došen, editors, Substructural Logics, pages 207–237. Oxford University Press, 1993.
- Joachim Lambek. Type grammar revisited. In Alain Lecomte, François Lamarche, and Guy Perrier, editors, Logical Aspects of Computational Linguistics, volume 1582 of Lecture Notes in Computer Science, pages 1–27. Springer, Berlin, Heidelberg, 1999.
- Saunders Mac Lane. Categories for the Working Mathematician, volume 5 of Graduate Texts in Mathematics. Springer-Verlag, New York, 1971
- Eugenio Moggi. Notions of computation and monads. Information and Computation, 93(1):55–92, 1991.
- Anne Preller and Joachim Lambek. Free compact 2-categories. Mathematical Structures in Computer Science, 17(1):1–32, 2007.
- Shirui Pan, Linhao Luo, Yufei Wang, Chen Chen, Jiapu Wang, and Xindong Wu. Unifying large language models and knowledge graphs: A roadmap. IEEE Transactions on Knowledge and Data Engineering, 36(7):3580–3599, 2024.
- John Power and Edmund Robinson. Premonoidal categories and notions of computation. Mathematical Structures in Computer Science, 7(5):453– 468, 1997.
- Anne Preller. From sentence to concept: Predicate logic and quantum logic in compact closed categories. In Claudia Casadio, Bob Coecke, Michael Moortgat, and Philip Scott, editors, Categories and Types in Logic, Language, and Physics, volume 8222 of Lecture Notes in Computer Science, pages 247–264. Springer, 2014.
- Mehrnoosh Sadrzadeh, Stephen Clark, and Bob Coecke. The Frobenius anatomy of word meanings I: subject and object relative pronouns. Journal of Logic and Computation, 23(6):1293–1317, 2013.
- Peter Selinger. A survey of graphical languages for monoidal categories. In Bob Coecke, editor, New Structures for Physics, volume 813 of Lecture Notes in Physics, pages 289–355. Springer, Berlin, Heidelberg, 2011.