Question: im having problem in this python code problem by using class In this problem you will be writing a function to parse a user inputed

im having problem in this python code problem by using class

im having problem in this python code problem by using class Inthis problem you will be writing a function to parse a user

In this problem you will be writing a function to parse a user inputed string and create a dictionary of the words in the text along with the number of times they occur. Once you create the dictionary of all of the words and times they occur, you will then create a pictogram using the words from the string using "X" to specify every 5 times the word occured and "*" to represent every 1 time the word occured. Since we have such a large vocabulary available to us we will be eliminating the "boring" words (we have provided a list) from the text. Additionally the words "Mother" and "mother" should be only one key in your dictionary (use .lowerO) Your function should be named def parse string (string): Your function parse_string should take one parameter string (this function should not take user input, this should be done in the main and passed to the function). Additionally, no special characters or punctuation should be in the dictionary, only the individual words! [hint replace() may be very helpful] Here is a sample output of the program cat * dog X park* good * happy ** eats pizzas* Sample input for the above program would be: "I had a good dog not a cat. A dog eats pizzas. A dog is happy. There is a happy dog there in the dog park." Boring words that must be omitted: to, the, and, I, of, he, she, a, I'11, I've, but, by, we, whose, how, go, such, this, me, can, she's, he's, have, has, had, an, did, so, to, we'l, on, him, well, or, be, as, those, there, are, do, too, if, it, at, what, that, you, will, in, with .not ,for, is ,my ,o .her ,his, am

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 Databases Questions!