11.4.6 Driver predicate

A driver predicate that outputs a DRS, translated the DRS into first-order logic and display the results.

It remains to design a driver predicate that gives the sentence to the DCG, outputs the DRS, translated the DRS into first-order logic and display the results as well.


For instance, suppose we want to build the DRS for the discourse that contains of the sentence ``John walks'' followed by \nl{A woman smokes}. To do this, consult the file drt.pl, start the DRT parser (by typing drt. at the Prolog prompt), and type in an example discourse:

?- drt.
> A man loves a woman. He smokes.
1 drs([A,B],[smoke(A),male(A),love(B,A),woman(A),man(B)])
1 exists(A,exists(B,smoke(A) & (male(A) & (love(B,A) & (woman(A) & man(B))))))

Note that the lists are built from right to left; that is, the most recent information comes first in the list.

Exercise 11.3

Change the program in such a way that proper names are floated to the top DRS. There are two ways of doing this. The first method is using an explicit DRS that collects all proper names, which then will be merged with the DRS of the sentence once it is parsed. Another method, more elegant but also more technically demanding, is to extend the stack of DRSs that we already use for threading with a global DRS (first member of the stack) to collect all proper name information.

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