Exercise 2, Grammar Development
Feature Unification, Testsuites, Templates with Arguments
Download grammar2.lfg and take a good look
at it. Either work with this grammar or with your own grammar.
Expand your grammar (or grammar2.lfg) so that the following sentences also work:
- the girl gave the dog a bone
- the girl gives the gorilla bananas
- gorillas devour bananas
- a gorilla devours bananas
These sentences should not work: the girl give the gorilla
bananas, gorillas devours bananas, gorilla devour bananas, gorillas
devours banana. That is, make sure that
subject-verb agreement works right and that singular count nouns
appear with a determiner.
Note 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).
The verb give ist a three-place verb. Assume the following
subcateogrization frame: SUBJ, OBJ, OBJ2. NB: the object is always
to the right of the verb in English.
Your grammar should contain the following:
Please submit your exericses to Maike Müller (uni
konstanz Addresse) by the 13.5.2014 at 10 am.
- 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.