Exercise 4, Grammar Development

For this exercise you can work with grammar3.lfg, which contains first rules for adjectives and more complex rules for PPs. The grammar also makes a start on integrating punctuation.

Adjectives and Adverbs

Expand your grammar so that it includes Adjectives and Adverbs. That is, the following sentences should work (and provide sound linguistic analyses).

You will need to add adverbs to your lexicon and make sure that you expand your rules to allow adverbs. Note that you should also change your treatment of adjectives, so that you have something like the following:

NP --> (D)
       AP*: ! $ (^ ADJUNCT);
       N. 

AP --> Adv*: ! $ (^ ADJUNCT);
      A.

That is, you should introduce an Adjective Phrase (AP) and allow adverbs to modify adjectives within this AP.

PPs and constraining equations

The grammar grammar3.lfg already contains a start on implementing PPs. Overall, you should be able to treat three kinds of PPs: Adjuncts (with semantic Ps), OBLs with both semantic and non-semantic Ps.

The following sentences should work. Note that some of them will get more than one possible reading. This is okay as long as the correct one is among them. We will learn next time how to constrain the space of possibilities.

Note that in addition to the PPs in the VP, which are already there to some extent in grammar3.lfg, you are required to provide for the possibilities of PPs within an NP.

Punctuation

The grammar has made a start on integrating punctuation. You can add in more types. Here are some sample lexical entries. You will need to add them to appropriate places in the c-structure rules. Note that STMT-TYPE stands for "Statment Type".

.  PERIOD  * (^ CLAUSE-TYPE) = declarative.

,  COMMA * . 

!  EXCL * (^ CLAUSE-TYPE) = exclamative. 

?  QM * (^ CLAUSE-TYPE) = interrogative. 

Change your grammar so that the following sentence works:


Relevant Reading Material