title: recursive extract synonym for a new word from NLTK
body: <p>Assuming I have two small dictionaries  </p>
  
  <p>posList=['interesting','novel','creative','state-of-the-art']</p>
  
  <p>negList=['outdated','straightforward','trivial']</p>
  
  <p>I have a new word, say "innovative", which is out of my knowledge and I am trying to figure out its sentiment via finding out its synonyms via NLTK function, if the synonyms fall out my small dictionaries, then I recursively call the NLTK function to find the synonyms of the synonyms from last time</p>
  
  <p>The start input could be like this:</p>
  
  <p>from nltk.corpus import wordnet
  innovative = wordnet.synsets('innovative')</p>
  
  <p>for synset in innovative:</p>
  
  <pre><code>print synset
  
  print synset.lemmas
  </code></pre>
  
  <p>It produces the output like this</p>
  
  <p>Synset('advanced.s.03')
  [Lemma('advanced.s.03.advanced'), Lemma('advanced.s.03.forward-looking'), Lemma('advanced.s.03.innovative'), Lemma('advanced.s.03.modern')]
  Synset('innovative.s.02')
  [Lemma('innovative.s.02.innovative'), Lemma('innovative.s.02.innovational'), Lemma('innovative.s.02.groundbreaking')]</p>
  
  <p>Clearly new words include 'advanced','forward-looking','modern','innovational','groundbreaking' are the new words and not in my dictionary, so now I should use these words as start to call synsets function again until no new lemma word appearing.
  Anyone can give me a demo code how to extract these lemma words from Synset and keep them in a set strcutre?</p>
  
  <p>It involves dealing with re module in Python I think but I am quite new to Python. Another point I need to address is that I need to get adjective only, so only 's' and 'a' symbol in the Lemma('advanced.s.03.modern'), not 'v' (verb) or 'n' (noun).</p>
  
  <p>Later I would try to calculate the similarity score for a new word with any dictionary word, I need to define the measure. This problem is difficult since adj words are not arranged in hierarchy way and no available measure according to my knowledge. Anyone can advise? </p>