Practical Work 3
Templates with Arguments
grammar2.lfg and take a good look
at it. Expand it so that the following sentences are assigned a sound
- the girl gave the dog a bone
- the girl gives the gorilla bananas
- gorillas devour bananas
- a gorilla devours bananas
The verb give ist a three-place verb. Assume the following
subcateogrization frame: SUBJ, OBJ, OBJ2. Assume that the object is always to the right
of the verb in English.
Your grammar should contain the following:
- A template for transitive verbs
- A template for intransitive verbs
- A template for ditransitive verbs
- A template OPT-TRANS that calls up templates for transitive and
intransitive verbs (for verbs like eat, which can be used
transitively or intransitively).
- Templates for for number and person so that this information can
be called up via templates in the noun entries.
- All your verbal lexical entries should call up their
subcategorization information, their subject-verb agreement
information and their tense-aspect-moood information via templates.
These sentences should not work:
That is, make sure that
subject-verb agreement works right and that singular count nouns
appear with a determiner (e.g., cf. Lesson 2 for the count noun
- the girl give the gorilla
- gorillas devours bananas
gorilla devour bananas
Remember that there are several ways to formulate constraints on
- = assigns a value to an attribute (e.g., (^ DEF) = +)).
- ~= says that an attribute should not have this value
(e.g., (^ DEF) ~= +)).
- =c says an attribute is constrained to have a certain
value, but that this value should be provided in another part of
clause (e.g., (^ DEF) =c +)). This is called a
- Just providing the attribute and no value is a so-called
existential contraint, e.g., (^ DEF). This means that this
attribute is considered to exist and that a value must be provided
by another part of the clause.
Create a testsuite of sample sentences and keep testing your
progress with respect to the testsuite (see XLE
Documentation for many details). Remember to do regression
testing to make sure your grammar does not lose capabilities you had
Lexical Rules, First look at PPs
The file grammar2.lfg also already
contains a lexical rule for the passive. It also contains a
simplified treatment of PPs. Use these as a basis for building a
lexical rule for the English Dative Shift. See the part on
templates and lexical rules in the XLE documentation for more
This lexical rule should interact with the lexical rule for the
passive so that one can also parse passives of ditransitive verbs.
Update your templates for transitive and ditransitive verbs using
the two lexical rules (in interaction, if applicable).
Expand your grammar so that the following sentences also work:
- the girl gives a bone to the dog
- the zookeeper gave a banana to the gorilla
- the dog was given a bone by the girl
- a bone was given to the dog by the girl
These sentences should not work:
- the girl gave to the dog a
- the dog was given by the girl a bone
That is, you need to
make sure that the NPs and PPs appear in the right order.
Be sure to add all of the sentences to your (growing) testsuite.
Mark the ones that should not work with a 0!. See the part on Test
Files and Tree Banks in the XLE user documentation for more
Your grammar should contain (at least) the following:
- Lexical rules for passive and Dative Shift in the TEMPLATE section.
- C-structure rules in the RULES section which allow for OBLs
- The LEXICON section has to be expanded to take care of any new