PATR Exercise 1


Graded Exercises

The following exercises should be done in order. They are roughly graded as follows: * means easy and ** means harder.
  1. *
    1. Create a working directory
    2. Save grammar.grm and lexicon.lex in that directory
    3. Try out the following sentences:
      • uther sleeps
      • Uther sleeps
      • uther sleep
    4. Try "help" which gives you a list of commands and then "help cmd" to find out about any particular command


  2. * Add the words "he" and "him" to lexicon.lex. Make the grammar accept "he sleeps" and reject "him sleeps" and "him sleep"
  3. * Add feature specifications to the first grammar rule so that the subject of the sentence is explicitly marked in the feature structure of the S

  4. ** Modify the first grammar and lexicon to parse sentences with verbs that take complements, i.e. that can successfully analyse 
    1. Uther storms Cornwall
    2. Uther gave Arthur Cornwall

    but that rejects sentences with the wrong number of complements for the verb e.g. Uther sleeps Cornwall


  5. *Modify grammar to parse "Uther wants to sleep". Hint: You need to produce the following syntactic structure.

       NP              VP 
       |         _______|_______
       n        VP             S 
     Uther      |           ___|____
                v           to sleep

    Apart from the entry for "want", exactly one more grammar rule is required

    You may wish to consult this

    Patr Reference Manual