title: strip stopwords, taking stopwords from a file
body: <p>Here I am using a file which consists of a list of stopwords. I want to strip out all the stopwords from the text. </p>
  
  <pre><code>def print_stopWords(self):
  
      #infile = open("D:\Komal\MyPrograms\Pkg\PkgSubfolder\StopWords.txt", 'r')
      stopwords = ()
      print '\nstopwords are-'
      for line in open('D:\Komal\MyPrograms\Pkg\PkgSubfolder\StopWords.txt'):
          stopwords += (line,)
  
      print stopwords
      return stopwords
  
  
  def strip_stopwords(self,text,stopword):
      print '\n Text after removing all stopwords is --'
      words = text.split()
      text = []
      for word in words:
          if word.lower() not in stopword:
              text.append(word)
      print u' '.join(text)        #'u' prefix allows you to write a unicode string literal
      return text
  </code></pre>