Closed kazutoki-m closed 2 years ago
Challenge 6 also needs empty code function such as:
def preprocess(text): """Preprocesses a string."""
text = text.lower() # Replace URLs url_pattern = r'https?:\/\/.*[\r\n]*' url_repl = ' URL ' text = re.sub(url_pattern, url_repl, text) # Replace digits digit_pattern = '\d+' digit_repl = ' DIGIT ' text = re.sub(digit_pattern, digit_repl, text) # Remove blank spaces blankspace_pattern = r'\s+' blankspace_repl = ' ' text = re.sub(blankspace_pattern, blankspace_repl, text) text = text.strip() # YOUR CODE HERE return text
Challenge 6 also needs empty code function such as:
def preprocess(text): """Preprocesses a string."""
Lowercase