Question: Write a program to clean up a text file for use in a word query program; that is, replace punctuation with whitespace, put words into
Write a program to “clean up” a text file for use in a word query program; that is, replace punctuation with whitespace, put words into lower case, replace don’t with do not (etc.), and remove plurals (e.g., ships becomes ship). Don’t be too ambitious. For example, it is hard to determine plurals in general, so just remove an s if you find both ship and ships. Use that program on a real-world text file with at least 5000 words (e.g., a research paper).
Step by Step Solution
3.49 Rating (175 Votes )
There are 3 Steps involved in it
INTRODUCTION Cleaning a text file or a word document or simply a dataset forms part of a daily routine of a data scientist often than other computer scientists Text cleaning generally mean getting a t... View full answer
Get step-by-step solutions from verified subject matter experts
