You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def preprocess_text(text):
text = ' '.join(word.lower() for word in text.split(" "))
text = re.sub(r"([.,!?])", r" \1 ", text)
text = re.sub(r"[^a-zA-Z.,!?]+", r" ", text)
return text
Calling preprocess_text('Are you a, boy or a girl?') returns:
''are you a , boy or a girl ? "
The text was updated successfully, but these errors were encountered:
Calling
preprocess_text('Are you a, boy or a girl?')
returns:The text was updated successfully, but these errors were encountered: