#!/usr/bin/python3 from nltk.tokenize import word_tokenize import nltk import re import string def tokenize(d): d = re.sub(r'\\n',' ',d) words = word_tokenize(d) return words