3.7 Exercises

Exercises for the chapter on -based semantics construction.

Exercise 3.1

Add a clause to insertArgs/2 (see Section 3.3.2) in firstAttempt.pl that handles quantified sentences like ``A man walks.''

[Hint: If you follow the pattern of the clauses of insertArgs/2 already given, you may run into trouble with your new clause since terms like exists(_A,_B&_C)+man(_D)+walk(_E) also match on one of the first two clauses. You may either catch this inside the respective clause or simply put your clause above the other clauses.]

Exercise 3.2

Look at the semantics construction in Section 3.4.5 again. Work through the functional applications and -reductions required to build the VP and S representations. Make sure you understand the role-reversing idea used in the TV semantic representation.

Exercise 3.3

Starting off from our treatment of transitive verbs (Section 3.4.5), how would you handle ditransitive verbs such as ``offer''? Give a semantic representation for ``offer'', as well as semantically annotated grammar rules to analyse sentences like ``Mary offers John a siamese cat.''

Exercise 3.4

Find a suitable -expression for the determiner ``no'' and add it to our implementation of -calculus. Test your solution with sentences like ``No man walks.''

Extend our implementation of -based semantic construction accordingly.

Exercise 3.5

[This is a mid-term project]

betaConversion.pl: View Download

We could prevent accidental variable bindings as shown in Section 3.5.7 once and for all if we had a module doing -conversion.

Design such a module and include it as a preprocessing step in a new driver predicate for -conversion:

 alphaBetaConvert(F@A,Result):-
    alphaConvert(F,ConvertedF),
    betaConvert(ConvertedF@A,Result).
 

Please comment your code and provide a short documentation. The documentation should include a brief description of the problem and of your solution.

Test your module on some examples and include your results in the documentation. Does your program support the use of Prolog atoms to represent first order variables (i.e could you for instance write lambda(x walks(x)) instead of lambda(X walks(X)))?

Please contact us if you would like to do this exercise as your mid-term project.


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