Skip to content

Instantly share code, notes, and snippets.

View ftanrisevdi's full-sized avatar

fatma tanrısevdi ftanrisevdi

View GitHub Profile
@neilkod
neilkod / gist:1319966
Created October 27, 2011 15:56
my stopwords code, optimized for social media
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)