title: Python AttributeError: 'tuple' object has no attribute 'lower'
body: <p>I am trying to do a clean doc action to remove stopwords, pos tagging and stemming below is my code</p>
  
  <pre><code> def cleanDoc(doc):
      stopset = set(stopwords.words('english'))
      stemmer = nltk.PorterStemmer()
      #Remove punctuation,convert lower case and split into seperate words
      tokens = re.findall(r"&lt;a.*?/a&gt;|&lt;[^\&gt;]*&gt;|[\w'@#]+", doc.lower() ,flags = re.UNICODE | re.LOCALE)
      #Remove stopwords and words &lt; 2
      clean = [token for token in tokens if token not in stopset and len(token) &gt; 2]
      #POS Tagging
      pos = nltk.pos_tag(clean)
      #Stemming
      final = [stemmer.stem(word) for word in pos]
      return final
  </code></pre>
  
  <p>I got this error :</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\USer\Desktop\tutorial\main.py", line 38, in &lt;module&gt;
      final = cleanDoc(doc)
    File "C:\Users\USer\Desktop\tutorial\main.py", line 30, in cleanDoc
      final = [stemmer.stem(word) for word in pos]
    File "C:\Python27\lib\site-packages\nltk\stem\porter.py", line 556, in stem
      stem = self.stem_word(word.lower(), 0, len(word) - 1)
  AttributeError: 'tuple' object has no attribute 'lower'
  </code></pre>