General
Material
Lecture 1
Lecture 2
Lecture 3
Lecture 4
Lecture 5

Simple extensions to the DCG

Now make some simple extensions to the DCG. For example:

  • Add further words to the lexicon.
  • Extend the grammar so that it can also handle ditransitive verbs of the form:
    the barkeeper gives her a sword
    Solution
  • Extend the grammar so that it can also handle nouns which are modified by a prepositional phrase:
    the nurse with the eye patch whistles
    Solution

Back to the practical session of day 4.