Exercise 5, Grammar Development

For this exercise you can work with grammar4.lfg, which has integrated two OT-Marks to constrain PP-ambiguity. Alternatively, you can look at what has been added in grammar4.lfg and use it as a model while continuing work on your own grammar version.


Expand your grammar to include pronouns. The following sentences should work:

Make sure the following sentences are rejected as ungrammatical (for the right reasons):


The new grammar grammar4.lfg already contains two OT-Marks. They prefer local PP-attachment and choose an OBL analysis over an ADJUNCT analysis where there is a choice. This is fine for the most part, but causes problems elsewhere.

However, the OT-Marks are not yet producing quite the right result. For example, in the first two examples below the OBL-AG reading is being ruled out. Get it back in and see if you can constrain the PP readings in some other way.

  1. the dog was given a bone by the gorilla
  2. a bone was given to the dog by the gorilla
  3. the dog ate the bone by the tree
  4. the dog by the tree ate the bone

You had to introduce constraints on subject-verb agreement for the first part of this exercise. See if you can change your grammar so that it also allows for ungrammatical sentences, but marks them via an OT-mark.


Go through your testsuite and try to regenerate each sentence. Note down what your results are. When there should be only one possibility but there are more, think about whether and how you can fix it. If you can fix it (easily), then do so.

One possibility is to constrain some of the possibilities by using OT-Marks. If want to do this, then you can make up relevant OT-Marks and rank them on the hierarchy called GENOPTIMALITYORDER (already included in grammar4.lfg).

Hand in a brief description of where your grammar overgenerated and what you did to fix it. Also include a list of cases that are still problematic.

Relevant Reading Material

XLE Documentation on Support for Optimality Theory for information on how to use OT-Marks.

XLE Documentation on the generator.

XLE Documentation on the FS-Chart Window and packed representations.

Frank, Anette, Tracy Holloway King, Jonas Kuhn, und John T. Maxwell III. 1998. Optimality Theory Style Constraint Ranking in Large-scale LFG Grammars. Proceedings of the LFG 98 Conference. CSLI Online Publications.