Example #1
0
def sanitize(text):
	ret = []
	for word in text:
		word = tolower(word)
		word = goodify(word)
		word = correct(word)
		if word not in stop_words:
			word = stem(word)
			ret.append(word)
		else:
			continue
	return ret
Example #2
0
def sanitize(text):
	ret = []
	for word in text:
		word = tolower(word)
		#word = goodify(word)
		#print word
		word = corrector.correct(word)
		ret.append(word)
		'''if word not in stop_words:
			word = stem(word)
			
		else:
			continue'''
	return ret
Example #3
0
def stem(word):
	# word = stemmer.stem(word)
	word = correct(word)
	return word