3.3.3 Putting Things in the Right Place II

Post-processing the output of our DCG for semantic construction: limits.

Things get even more complicated once we start considering quantified noun phrases. Quantified noun phrases are noun phrases that contain a determiner. For example the sentence ``A woman walks.'' contains the the quantified noun phrase ``a woman''. The meaning of this sentence is captured by the first order formula . Obviously, the contribution made to this formula by the word ``woman'' should be the one place predicate symbol . The verb ``walks'' contributes the predicate symbol . Thus, the determiner must contribute the quantifier and the pattern of the quantification. The lexical rules for the noun ``woman'' and the determiner ``a'' are as follows:

n(woman(_)) --> [woman].

det(exists(_,_&_)) --> [a].

The rule for the determiner ``a'' gives us a template for building a quantified first-order formula by supplying the information that the formula will be an existential quantification, and that there will be a conjunction in the scope of this quantification.

To combine determiner and noun to an NP, we need a suitable combination rule:

np(DetSem+NSem) --> det(DetSem),n(NSem).

But now what happens when we parse ``A woman walks.'' with our DCG? Try it yourself: s(Sem,[a,woman,walks],[])  . How do we arrive at exists(x,woman(x) & walk(x)) from there? Clearly ``inserting left into right'' isn't an option. All in all, simply inserting subterms of our complex representation into each other no longer looks like a feasible solution at all. Even if we had a systematic way of putting each of the subterms into its final place, we hardly could ensure that the arguments of the two predicates woman and walk are bound by the existential quantifier.

Try to extend the predicate!

In Exercise 3.1 you're asked to extend insertArgs/2 so that quantified formulae can be handled as well. This will confront you quite directly with the shortcomings of our naive approach, which we want to discuss next. So it's a good idea to do the exercise right away!

What we have learned...

We've managed to teach our DCG how to construct first-order formulae for some simple sentences quite quickly. But obvioulsy our approach is not yet very elaborate (as you could clearly see in the above exercise...). Its most severe shortcomings are:

Obviously, what we have just implemented is not a simple postprocessing step, but a little promising ad hoc improvisation. As soon as we want to scale it up only a little bit, it becomes unpleasantly complex.


Aljoscha Burchardt, Stephan Walter, Alexander Koller, Michael Kohlhase, Patrick Blackburn and Johan Bos
Version 1.2.5 (20030212)