Question: Create a python code Modify the grammar checker of this chapter's Case Study, in the file recognizer.py , so that it recognizes the following additional

Create a python code
Modify the grammar checker of this chapter's Case Study, in the file recognizer.py, so that it recognizes the following additional types of variations in phrases:
A verb phrase with no prepositional phrase (example: "The boy saw the girl").
A noun phrase in which the noun is modified by an adjective (example: "The girl hit the red ball with a bat").
A sentence that connects two independent clauses with a conjunction (example: "The boy saw the girl and the girl hit the red ball with a bat").
You should add new variables for the sets of adjectives and conjunctions. (LO: 6.2)
Task 1: Modify the recognizer.py program so that it recognizes the additional types of variations.
An example of the program is shown below:
Enter a sentence or press return to quit: The boy saw the girl
Ok, grammatically correct
Enter a sentence or press return to quit: The girl hit the red ball with a bat
Ok, grammatically correct
Enter a sentence or press return to quit: The boy saw the girl and the girl hit the red ball with a bat
Ok, grammatically correct
Enter a sentence or press return to quit:
Create a python code Modify the grammar checker

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!