A New Data Structure for Processing Natural Language Database Queries

Richard Frost, Shane Peelar


Natural Language Query Interfaces (NLQIs) have once again captured the public imagination, but developing them has proven to be non-trivial. One way is by using a Compositional Semantics (CS) to directly compute the answer to a query from the meanings of its parts. The query is treated as an expression of a formal language, and interpreted directly with respect to a database which provides meanings for words, which are the basic components. The meanings of compound phrases in the query, and the answer to the query itself, are computed from their constituent words and phrases using semantic rules that are applied according to the query’s syntactic structure. Montague Semantics (MS), which is a type of CS, has been used in various NLQIs previously. MS accommodates common and proper nouns, adjectives, conjunction and disjunction, intransitive and binary transitive verbs, quantifiers, and intentional and modal constructs. MS does not provide an explicit denotation for n-ary transitive verbs nor does it provide an explanation of how to handle prepositional phrases. By adding events to MS and by introducing a new data structure, transitive verbs and prepositional phrases can be accommodated as well as other NL features that are often considered to be non-compositional.


Paper Citation