In: Computer Science
(1) a. sentence generation
The sentence you need to generate is shown below:
Sentence: John fed a bear in the park.
In this question, you should start from the target structure, a sentence (= S). Then you expand S by applying the rule S --> S PP. There is another rule that can expand S, namely S --> NP VP. However, if you apply S --> NP VP before S --> S PP, you will not be able to include PP. Therefore, S --> S PP is the correct rule to apply first, as has been given in the table below (together with two other steps). Remember to insert the lexical items when you get to a leaf node like D or N where no rule can be further applied. If your answers are correct, then all the 14 blanks should be filled.
The rules and lexicon that you need to generate the sentence are given as below:
Rules:
S --> NP VP
NP --> D NP
VP --> V PP
VP --> V NP
S --> S PP
PP --> P NP
AdjP --> Adv Adj
NP --> N
CP --> C S
Lexicon:
V --> saw, kicked, fed
P --> in, at
D --> a, the
N --> John, bear, park
You will need only a subset of the rules for this question.
Step
Sentence generating process
0 S
1 S --> S PP
2 S --> NP VP
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Done!
(1) b. Expand the rules and lexicon
What do you need to add to the previous rules and lexicon if you want to generate the following sentence:
The boy saw a brown bear in the park.
New rule(s) that needs to be added:
____________________
New lexical item(s) that needs to be added:
_____________________
______________________
PLEASE GIVE IT A THUMBS UP, I SERIOUSLY NEED ONE, IF YOU NEED ANY MODIFICATION THEN LET ME KNOW, I WILL DO IT FOR YOU
Rules:
a. S → NP VP
b. NP → D NP
c. VP → V PP
d. VP → V NP
e. S → S PP
f. PP → P NP
g. AdjP → Adv Adj
h. NP → N
i. CP → C S
Lexicon:
V → saw, kicked, fed
P → in, at
D → a, the
N → John, bear, park
Q-1 (a) Sentence Generation
The sentence we need to generate is as shown below:
Sentence: John fed a bear in the park.
STEP |
SENTENCE GENERATING PROCESS |
REMARKS |
0 |
S |
|
1 |
S → S PP |
Rule e. S → S PP applied |
2 |
S → NP VP PP |
Rule a. S → NP VP applied |
3 |
S → N VP PP |
Rule h. NP → N applied |
4 |
S → N V NP PP |
Rule d. VP → V NP applied |
5 |
S → N V D NP PP |
Rule b. NP → D NP applied |
6 |
S → N V D N PP |
Rule h. NP → N applied |
7 |
S → N V D N P NP |
Rule f. PP → P NP applied |
8 |
S → N V D N P D NP |
Rule b. NP → D NP applied |
9 |
S → N V D N P D N |
Rule h. NP → N applied |
10 |
S → John V D N P D N |
Lexicon N → John |
11 |
S → John fed D N P D N |
Lexicon V → fed |
12 |
S → John fed a N P D N |
Lexicon D → a |
13 |
S → John fed a bear P D N |
Lexicon N →bear |
14 |
S → John fed a bear in D N |
Lexicon P →in |
15 |
S → John fed a bear in the N |
Lexicon D → the |
16 |
S → John fed a bear in the park |
Lexicon N → park |
17 |
Done! |
Q-1 (b) Expand the rules and lexicon
What do you need to add to the previous rules and lexicon if you want to generate the following sentence:
Sentence: The boy saw a brown bear in the park.
New rule(s) that needs to be added:
NP → Adj NP
New lexical item(s) that needs to be added:
N → boy
Adj → brown