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
given a text file containing stopwords, return a python list of its contents. | |
this list is optimized for twitter/social media and filters out stuff | |
like RT, nowplaying, lastfm, 4sq etc. | |
def get_stopwords(file='stopwords.txt'): | |
words = open(file,'r') | |
stopwords = [word.strip() for word in words] | |
return set(stopwords) |