Question: String Tokenization Write a method tokenize() returns a list of words from the input string. We assume that each word in the input string is

 String Tokenization Write a method tokenize() returns a list of words

String Tokenization Write a method tokenize() returns a list of words from the input string. We assume that each word in the input string is separated by whitespace.? If our input String is "Hello, world!", then the output should be ["Hello,", "world!"). Challenge: For extra credit, sanitize the string - cleaning it up so that punctuation and other extraneous characters are removed. The final sanitized string would become ("Hello", "world")

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!