Ling187/287: Grammar Engineering

Homework Assignment for Week 8

Due: Wednesday, May 31 (by midnight)
Submit assignments electronically to both professors (kaplan "at" parc.com and thking "at" parc.com)


Turn in: the final grammar you end up (eng-week8.lfg or lang-week8.lfg)
Please name your grammar with name-eng-week8.lfg

There is one grammar this week which will be the basis for option 1 or a reference for option 2:

IMPORTANT: Do either option 1 or option 2. Basically, you can extend the current English grammar to cover more constructions or you can write a grammar for some other language.

If you put a file called xlerc in the directory with your grammar and in xlerc you put:

  create-parser eng-week8.lfg

then whenever you start xle in that directory, it will automatically load eng-week8.lfg. This will save a lot of time when making and testing changes.


OPTION 1: Extended English

There is a grammar eng-week8.lfg. (This does not use the sublexical rules; if you prefer, you can use the grammar you turned in last week for the sublexical rules as a starting point.)

Extend the grammar to cover more of English. Some ideas for things to could be added:

You are welcome to come up with others that you are interested in. If you get stuck on what a plausible LFG analysis of a construction would look like, either send us email or choose a different construction. For many of these, especially the copulas, there are several reasonable analyses.

Make sure to put comments in your grammar.

Create a testsuite for the new constructions that you added, including some things that should not be parsed (for example, if you do modals, the grammar should not parse the girls should to laugh).

For development and debugging purposes, turn off the fragments; you can comment them back in when you are finished.

OPTION 2: New Language

Write a grammar for another language. It should at least cover transitive and intransitive verbs and basic noun phrases. You can either use a language you know some of or base your analysis on a description in, for example, a linguistics paper or textbook. Do not worry if you end up with some linguistically incorrect analyses for certain constructions in the language; this homework is about implementing the analysis you wish to have, as opposed to getting the ideal analysis of a given language.

XLE can use accented characters and other alphabets (how to do this is in the documentation). However, for this homework, it is probably easiest to transliterate into the English alphabet. So, for example, French parlé could be parle or parlE where the capital E differentiates it from the usual e.

Make sure to put comments in your grammar.

Create a testsuite of what the grammar should cover. In the comments, put roughly what the sentences mean. For example:

   # He sleeps

   il dort

   # He reads a book

   il lit un livre

Find at least one construction that is different than English and implement that. For example, for French, object pronouns appear before the verb instead of after it (il le lit : he it reads). If everything you can think of is like English, then implement at least one construction that is not in the eng-week8.lfg grammar. For many languages, the c-structure will need to be much different than that for English, even though the same f-structures will be appropriate. This will happen with, for example, verb final languages (Japanese, Hindi), verb second languages (German), and "free" word order languages in general (Russian).

Turn in:


If you have any questions, you can send us email or call us (Ron: 812-4348; Tracy: 812-4808).