This file contains 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
def cleanText(text): | |
exclude = [")","(",'.','-',':','"',"'",",","&","$",u'"',u"'",";",u"&","`","’"] | |
#dd = {ord(c):None for c in badchars} | |
#tx = text.translate(dd) | |
#tx = text.translate(string.punctuation) | |
#print(text) | |
text = ''.join(ch for ch in text if ch not in exclude) | |
text = str(text) | |
return text |