title: AttributeError: 'function' object has no attribute 'lower'
body: <p>I am trying to use sentiwordnet text file "SentiWordNet_3.0.0_20130122.txt".  When I am importing the sentiwordnet.py file and attempting to run it I am getting the error as follows:</p>
  
  <p>The error occured as:</p>
  
  <pre><code>--------------------------------------------------------------------------         AttributeError
  Traceback (most recent call last)
  &lt;ipython-input-13-6e4eb476b4b2&gt; in &lt;module&gt;()
  ----&gt; 1 happy = cv.senti_synsets('happy', 'a')
  
  C:\Users\Desktop\fp\sentiwordnet.pyc in     senti_synsets(self, string, pos)
       65         synset_list = wn.synsets(string, pos)
       66         for synset in synset_list:
  ---&gt; 67             sentis.append(self.senti_synset(synset.name))
       68         sentis = filter(lambda x : x, sentis)
       69         return sentis
  
  C:\Users\Desktop\fp\sentiwordnet.pyc in senti_synset(self, *vals)
       52             return SentiSynset(pos_score, neg_score, synset)
       53         else:
  ---&gt; 54             synset = wn.synset(vals[0])
       55             pos = synset.pos
       56             offset = synset.offset
  
  C:\Users\Anaconda2\lib\site-packages\nltk\corpus\reader\wordnet.pyc in synset(self, name)
       1227     def synset(self, name):
       1228         # split name into lemma, part of speech and synset number
  ---&gt; 1229         lemma, pos, synset_index_str = name.lower().rsplit('.', 2)
       1230         synset_index = int(synset_index_str) - 1
       1231 
  
  AttributeError: 'function' object has no attribute 'lower'
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>import sentiwordnet as snw
  SWN_FILENAME = "SentiWordNet_3.0.0_20130122.txt"
  cv = snw.SentiWordNetCorpusReader(SWN_FILENAME)
  happy = cv.senti_synsets('happy', 'a')
  print happy
  </code></pre>