Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program to read all the txt files and save the sentences in all the files into one csv file with two columns, the
- Write a program to read all the txt files and save the sentences in all the files into one csv file with two columns, the first column is sentence id (txt file name+sentence line number), the second column is the sentence text content. (4 points)
- Remove all the punctuations from the sentences, save the processed sentences into a new column in the same csv file. (4 points)
- Ask the user to enter a word, return all the sentences that include this word, three kinds of information should be returned: sentence id, sentence text content, the count that user input word appear in the sentence.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started