Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(Python) Preprocessing function: Write a function that gets a sentence or a text as an input parameter and removes all period (.), comma (,), colon

(Python) Preprocessing function: Write a function that gets a sentence or a text as an input parameter and removes all period (.), comma (,), colon (:), and semicolon (;) marks from the sentence. (Note: use the replace function). It also changes the text to lowercase. For example, if the following sentence is given as an input to the function: welcome, this is my favorite course: python data analytics; I hope you like it. The returning result must be: welcome this is my favorite course python data analytics i hope you like it. As you can see the order of the words and spaces between them are preserved, but punctuation marks are removed. In other words, let the methods name be preprocess, then, if the method is called as shown below: preprocess(this, is my: first. class.) The following result must be returned: this is my first class

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MFDBS 89 2nd Symposium On Mathematical Fundamentals Of Database Systems Visegrad Hungary June 26 30 1989 Proceedings

Authors: Janos Demetrovics ,Bernhard Thalheim

1989th Edition

3540512519, 978-3540512516

More Books

Students also viewed these Databases questions

Question

Describe the three steps of the function point approach.

Answered: 1 week ago