At the beginning of the chapter we briefly illustrated a method of building semantic representations on the basis of a syntactic parse, using the grammar framework developed in Chapter 9. This time, rather than constructing an SQL query, we will build a logical form. One of our guiding ideas for designing such grammars is the Principle of Compositionality. (Also known as Frege's Principle; see [Partee, 1995] for the formulation given.)
Principle of Compositionality: the meaning of a whole is a function of the meanings of the parts and of the way they are syntactically combined.
We will assume that the semantically relevant parts of a complex expression are given by a theory of syntactic analysis. Within this chapter, we will take it for granted that expressions are parsed against a context-free grammar. However, this is not entailed by the Principle of Compositionality.
Our goal now is to integrate the construction of a semantic representation in a manner that can be smoothly with the process of parsing. (29) illustrates a first approximation to the kind of analyses we would like to build.
In (29), the SEM value at the root node shows a semantic representation for the whole sentence, while the SEM values at lower nodes show semantic representations for constituents of the sentence. Since the values of SEM have to be treated in a special manner, they are distinguished from other feature values by being enclosed in angle brackets.
So far, so good, but how do we write grammar rules that will give us this kind of result? Our approach will be similar to that adopted for the grammar sqlO.fcfg at the start of this chapter, in that we will assign semantic representations to lexical nodes, and then compose the semantic representations for each phrase from those of its child nodes. However, in the present case we will use function application rather than string concatenation as the mode of composition. To be more specific, suppose we have NP and VP constituents with appropriate values for their SEM nodes. Then the SEM value of an S is handled by a rule like (30). (Observe that in the case where the value of SEM is a variable, we omit the angle brackets.)
NP[SEM-<(cyril)>] VP[SEM=<bark>] Cyril IV[SEM=<\X,bark >]
(30) S[SEM=<?vp(?np)>] -> NP[SEM=?subj] VP[SEM=?vp]
(30) tells us that given some SEM value ?subj for the subject NP and some SEM value ?vp for the VP, the SEM value of the S parent is constructed by applying ?vp as a function expression to ?np. From this, we can conclude that ?vp has to denote a function which has the denotation of ?np in its domain. (30) is a nice example of building semantics using the principle of compositionality.
To complete the grammar is very straightforward; all we require are the rules shown here:
VP[SEM=?v] -> IV[SEM=?v] NP[SEM=<cyril>] -> 'Cyril' IV[SEM=<\x.bark(x)>] -> 'barks'
The VP rule says that the parent's semantics is the same as the head child's semantics. The two lexical rules provide non-logical constants to serve as the semantic values of Cyril and barks respectively. There is an additional piece of notation in the entry for barks which we will explain shortly.
Before launching into compositional semantic rules in more detail, we need to add a new tool to our kit, namely the A-calculus. This provides us with an invaluable tool for combining expressions of first-order logic as we assemble a meaning representation for an English sentence.
Was this article helpful?