Abstract
In this paper, we introduce an algorithm for determining the grammatical validity of a sentence in polynomial time. The algorithm works by encoding the English words based on word type which we call components. A sentence can be described both algebraically and geometrically. Our algorithm generates the geometric portion called underlinks from the generalized reductions of the algebraic portion. Underlinks uniquely determine the reduction of the components leading to the empty string. This is the mathematical basis for determining if a sentence is valid. We also provide a proof for the algorithm’s time complexity of \(\mathcal {O}(n^2)\) along with a Python implementation. This paper is part of a bigger project where we explore the combination of a sentence’s grammar and meaning. This is done by combining two compact closed categories; pregroups represent the grammar of a sentence, and finite dimensional vector spaces describe the meaning of a sentence. Together one compact closed category is created, representing both aspects of the sentence.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Preller, A.: Toward discourse representation via pregroup grammars. J. Logic Lang. Inf. 16(2), 173–194 (2007)
Coecke, B., Sadrzadeh, M., Clarky, S.: Mathematical foundations for a compositional distributional model of meaning. CoRR arXiv:1003.4394 (2010)
Lambek, J.: From word to sentence: a computational algebraic approach to grammar (2008)
GitHub for the code. https://github.com/ItBeCharlie/SentenceValidity
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendix A: Code
Appendix A: Code



Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
DeGennaro, C., McDonald, A., Suchy, A. (2024). An Algorithm for Detecting Sentence Validity. In: Arai, K. (eds) Intelligent Computing. SAI 2024. Lecture Notes in Networks and Systems, vol 1016. Springer, Cham. https://doi.org/10.1007/978-3-031-62281-6_40
Download citation
DOI: https://doi.org/10.1007/978-3-031-62281-6_40
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-62280-9
Online ISBN: 978-3-031-62281-6
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)