Question

In: Computer Science

(1) a. sentence generation The sentence you need to generate is shown below: Sentence: John fed...

(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:
_____________________
______________________

Solutions

Expert Solution

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


Related Solutions

Data broken down by generation (Group 1: Millennials; Group 2: Not Millennials) are shown below based...
Data broken down by generation (Group 1: Millennials; Group 2: Not Millennials) are shown below based on their agree or disagreement of the statement below: “You shouldn’t worry too much about other people.” Find the 90% confidence interval for the true difference in the proportions agreeing with the statement. Agree Disagree    Total Group 1 139    112    251 Group 2 278    484    417 Total:    417    596 668 A. 0.130 to 0.248 B. -40.9 to...
In this program, you will generate a random “sentence” constructed of random “words”. Quotes are used...
In this program, you will generate a random “sentence” constructed of random “words”. Quotes are used in the preceding sentence because the “words” will mostly be nonsense words that do not exist in the English language. Step 1. The average number of words in an English sentence is about 17 words. First generate a pseudorandom number NW between 10 and 20 for the number of words in your random “sentence”. Use srand( ) to set the initial value in the...
Two methods are used to generate 1 GWhe of electricity: (1) burning coal with a generation...
Two methods are used to generate 1 GWhe of electricity: (1) burning coal with a generation efficiency of 30% and (2) burning MSW with an efficiency of 25%. (The energy content of coal is 31 MJ/kg.) For MSW generation, assume an energy content of 10 MJ/kg and a total net energy requirement of 5000 MJ/tonne for collection and transportation, which is provided by burning fossil fuels at 20% efficiency. The MSW consists of 50% carbon-neutral organic material and 50% fossil...
1. List 4 of the 2nd generation H1 antagonists. 2. As a nurse you will need...
1. List 4 of the 2nd generation H1 antagonists. 2. As a nurse you will need to prepare a teaching plan for a patient receiving Antihistamine. What instructions should the nurse include in the teaching plan for educating such patient?
John likes both carrots (good 1) and lettuce (good 2) His preferences are shown below by...
John likes both carrots (good 1) and lettuce (good 2) His preferences are shown below by cobb douglas utility. u(x1,x2)=x11/2+x21/2 a) Find marshallian demand functions for x1*(p1,p2, m) and x2*(p1,p2,m) b) Find indirect utility function
The reaction shown below is a way to generate sodium nitrate for fabric dye production and...
The reaction shown below is a way to generate sodium nitrate for fabric dye production and as a meat preservative. Carbon dioxide is simultaneously produced. Calculate a) the mass of CO2 generated and b) the concentration of Na+ ions in solution when the reaction has gone to completion, given the following starting materials: 24,500 ml of 2.50 M Na2CO3, 3.6 kg NO and 20.0 kg of O2. Assume 100% yield. 2Na2CO3(aq) + 4NO(g) + O2(g) --> 4NaNO2(aq) + 2CO2(g)
Hello, I need a simple financial explanation for the below sentence: Cash flows into MFs investing...
Hello, I need a simple financial explanation for the below sentence: Cash flows into MFs investing in stocks are highly correlated with the return on stock markets
A COMPREHENSIVE ACCOUNTING CYCLE PROBLEM - NEED ASAP! THANK YOU On December 1, 2018, John and...
A COMPREHENSIVE ACCOUNTING CYCLE PROBLEM - NEED ASAP! THANK YOU On December 1, 2018, John and Maggie Driscoll formed Cape Clear Island, LLC. They began operations using the following accounts: Cash Accounts Receivable Prepaid Rent Unexpired Insurance Office Supplies Rental Equipment Accumulated Depreciation:     Rental Equipment Notes Payable Accounts Payable Interest Payable Salaries Payable Dividends Payable Unearned Rental Fees Income Taxes Payable Capital Stock Retained Earnings Dividends Income Summary Rental Fees Earned Salaries Expense Maintenance Expense Utilities Expense Rent Expense...
Diabetes Mellitus Type 1 The following questions regarding Diabetes Mellitus Type 1 shown below need answers......
Diabetes Mellitus Type 1 The following questions regarding Diabetes Mellitus Type 1 shown below need answers... Alterations in Health (Diagnosis)- Pathophysiology Related to Client Problem- Health Promotion and Disease Prevention- ASSESSMENT: Risk Factors- Expected Findings- Safety Considerations- Laboratory Tests- Diagnostic Procedures- PATIENT-CENTERED CARE: Nursing Care- Therapeutic Procedures- Medications- Client Education Inter-professional Care- Complications- the information must have credible sources
Need an answer for the below question from the Australian Taxation law perspective John owns a...
Need an answer for the below question from the Australian Taxation law perspective John owns a convenience shop called City Conv. The following events occurred for John during 2019-2020 financial year. (i) John incurred legal expenses as he was sued for false advertising. (ii) John purchased new fridge to the shop - $800. In addition, his builder added more space to the shop front. This cost him $22,000. (iii) John ordered 1000 new T-shirts with printed City Conv’s logos for...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT