Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use your grammar from part 2 to parse the following sentences: the dogs chased the cats the dogs chased the cats in the garden the

image text in transcribed

Use your grammar from part 2 to parse the following sentences: the dogs chased the cats the dogs chased the cats in the garden the dogs chased the cats in the garden behind the house the dogs chased the cats in the garden behind the house in the garden the dogs chased the cats in the garden behind the house in the house behind the garden Notice that the number of possible trees increases rapidly with the number of prepositional phrases (PPs). To see how many parse trees there are for a sentence, try: 7- findal ICT, s(T, [the , dogs , chased , the , cats, in,the , garden], ), L), length(L, N). The findall/3 predicate gives us all of the solutions for a variable (in this case, T), and puts them in a list (in this case, L Then, the length/2 predicate tells us the number of elements in a list. In the example above, N is the number of elements in L Create a table that shows the number of trees when we have 0, 1, 2, 3 and 4 PPs in a VP (as in the example sentences above). Can you identify the sequence that relates the number of PPs and the number of trees? (It is a known, named sequence, which can easily be found by typing the numbers on google.) Use your grammar from part 2 to parse the following sentences: the dogs chased the cats the dogs chased the cats in the garden the dogs chased the cats in the garden behind the house the dogs chased the cats in the garden behind the house in the garden the dogs chased the cats in the garden behind the house in the house behind the garden Notice that the number of possible trees increases rapidly with the number of prepositional phrases (PPs). To see how many parse trees there are for a sentence, try: 7- findal ICT, s(T, [the , dogs , chased , the , cats, in,the , garden], ), L), length(L, N). The findall/3 predicate gives us all of the solutions for a variable (in this case, T), and puts them in a list (in this case, L Then, the length/2 predicate tells us the number of elements in a list. In the example above, N is the number of elements in L Create a table that shows the number of trees when we have 0, 1, 2, 3 and 4 PPs in a VP (as in the example sentences above). Can you identify the sequence that relates the number of PPs and the number of trees? (It is a known, named sequence, which can easily be found by typing the numbers on google.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

6. Does your speech have a clear and logical structure?

Answered: 1 week ago