المحاضرة 10 معالجة اللغات الطبيعية
description
Transcript of المحاضرة 10 معالجة اللغات الطبيعية
1
معالجة اللغات الطبيعية رابعة حاسب محاضرة (١٠)
دكتور/ أحمد الحربى
Questions
1- For each sentence below, draw a parse tree that is consistent with
the following grammar and corresponds to the semantically correct
interpretation of the sentence.
S NP VP
VP verb
VP verb NP
VP verb NP NP
VP verb NP PP
VP verb NP PP PP
PP prep NP
NP NP1
NP NP1 PP
NP1 art noun
NP1 adj noun
NP1 art adj noun
NP1 noun
2
(a) The small boy threw his hat into the tree.
(b) Mary gave George of the Jungle a book.
(c) The man on the moon drank water from Earth from a cup.
2- Consider the sentence:
Hot air balloons have been floating over the mountains in Utah for the balloon
festival.
Assume the correct parse is:
(s (np (np1 (adj hot) (noun air)) (noun balloons))
(vp (aux have) (aux been) (verb floating)
(pp (prep over) (np (art the) (noun mountains)
(pp (prep in) (np (noun utah)))))
(pp (prep for) (np (art the) (np2 (noun balloon) (noun festival))))))
Suppose your parser generates the following parse:
(s (np (adj hot) (np2 (noun air) (noun balloons)))
(vp (aux have) (verb been)
(np (gerund floating))
(pp (prep over) (np (art the) (noun mountains)))
(pp (prep in) (np (noun utah)
(pp (prep for)
(np (art the)
(np2 (noun balloon) (noun festival))))))))