Last active
January 17, 2022 20:50
-
-
Save eileen-code4fun/886999b3aaf5caa5ae4613bfb07b7f1e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def lower_remove_punctuation(txt): | |
txt = txt.lower() | |
return re.sub(r'[^\w\s]','',txt) | |
train = preprocess(train_dataset, lower_remove_punctuation) | |
test = preprocess(test_dataset, lower_remove_punctuation) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment