For reference, here is your prepare_text() function:
def prepare_text(self, text):
text = text.lower()
text = text.replace('?', '')
text = text.replace('!', '')
text = text.replace('.', '')
return text.split()
In addition to periods, exclamation points, and question marks, we should also remove commas from our text samples. We can do this using the same approach you used for the other punctuation.
For reference, here is your prepare_text() function:
In addition to periods, exclamation points, and question marks, we should also remove commas from our text samples. We can do this using the same approach you used for the other punctuation.