# loadstoplist -
# load a stop list of words to eliminate from one's text sample
# from a plain sequential file with one word per line
import string
def load_stoplist(filename):
infile = open(filename,'r')
stoplist = {}
for line in infile.readlines():
word = string.strip(line)
stoplist[word] = 1
infile.close()
return stoplist
filename = 'stoplist3.txt'
stoplist = load_stoplist(filename)
print stoplist
Text file Source (historic): geocities.com/soho/square/3472
geocities.com/soho/squaregeocities.com/soho
(to report bad content: archivehelp @ gmail)
|
|
|
|
|