subject
Computers and Technology, 13.10.2020 04:01 SG2021

Next, copy in your strip_punctuation function and define a function called get_pos which takes one parameter, a string which represents one or more sentences, and calculates how many words in the string are considered positive words. Use the list, positive_words to determine what words will count as positive. The function should return a positive integer - how many occurrences there are of positive words in the text. Note that all of the words in positive_words are lower cased, so you’ll need to convert all the words in the input string to lower case as well. punctuation_chars = ["", ","," 3 # list of positive words to use 4 positive_words = 0 5 with open ("positive_words. txt") as pos_f: for lin in pos_f: if lin[0] != ';' and lin[0] != '\n': positive_words. append(lin. strip) 6 7 8 9 10

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 00:30
Asecurity policy is a a. set of guidlines b. set of transmission protocols c. written document d. set of rules based on standards and guidelines
Answers: 2
question
Computers and Technology, 24.06.2019 04:10
Write a program that reads a set of floating-point values. ask the user to enter the values, then print • the average of the values. • the smallest of the values. • the largest of the values. • the range, that is the difference between the smallest and largest. of course, you may only prompt for the values once.
Answers: 3
question
Computers and Technology, 24.06.2019 13:30
In the rgb model, which color is formed by combining the constituent colors? a) black b) brown c) yellow d) white e) blue
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
Which of the following processes applications across multiple computing devices? a. functional application b. distributed system c. workgroup information silo d. information silo
Answers: 3
You know the right answer?
Next, copy in your strip_punctuation function and define a function called get_pos which takes one p...
Questions
question
History, 22.08.2019 09:30
question
Mathematics, 22.08.2019 09:30
Questions on the website: 13722360