btw, mostly seems to run on python2!
I believe you intended to run in python3 based on your last cell.
changing maketrans and translate will have it run in python2.7
table = string.maketrans('', '') # remove punctuation from each word
stripped = [w.translate(table, string.punctuation) for w in tokens]
Did you read the book on nltk before writing this project? Curious about background skill development to undertake this project.