1. Given the following grammar for a fragment of English :
1. S -> NP VP
2. NP -> DET N
3. NP -> N
4. VP -> V
5. VP -> V NP
6. DET -> (any lexical item that is in the lexicon
as a determiner)
7. N -> (any lexical item that is a noun)
8. V -> (any lexical item that is a verb)
(a) Show a parse tree for the sentence The
cat eats the mice .
(b) Show a traditional labelled bracketing for
The cat eats the mice, corresponding to the parse tree above.
(c) Using SGML and the Penn Treebank tagset,
describe the parse tree from (a) in this format, too.
2. Using the DCG below as the model for handling of semantics and syntax of a language by one grammar description,
(a) Write your own DCG for doques
(all the questions in English posed by starting with the word do)
(b) (Optional) Use your grammar from (a) to derive
the semantics read(ques_pres, you,English)
for do you read English sentence.
.........
(1)
whques ( WhQues_Sem, WhQues_Sen, WhQues_SenRest )
-->
whsubj ( Number, WhSubj_Sem, WhQues_Sen, Rest1 ),
whpred ( Number, Tense, [ WhSubj_Sem, WhObj_Sem ], WhQues_Sem,
Rest1, Rest2 ),
whobj ( WhObj_Sem, Rest2, WhQues_SenRest ).
.........
(2)
whsubj ( X, who, [ who|WhSubjRest ], WhSubjRest ).
(3)
whsubj ( X, what, [ what|WhSubjRest ], WhSubjRest ).
.........
(4)
whpred ( sing, perf, [ Subj, Obj ], wrote ( who, this ),
[ wrote | WhPredRest ], WhPredRest ).
.........
(5)
whobj ( this, [ this | WhObjRest ], WhObjRest ).