def strip_stopwords(sentence):
 words = sentence.split()
 sentence = []
 for word in words:
  if (word.lower() not in stopwords):
   sentence.append(word)
 return u' '.join(sentence)

def strip_stopwords ( sentence ) : words = sentence . split ( ) sentence = [ ] for word in words : if ( word . lower ( ) not in stopwords ) : sentence . append ( word ) return u' ' . join ( sentence )
removes stopwords - also normalizes whitespace .