title: How to get synonym for multiple word using NLTK?
body: <p>I have searched that all questions only provide the way to get synonym for one word, but it doesn't work when I try to use a for loop to get synonym for multiple words. </p>
  
  <p>This is my code, but it doesn't work as expected.</p>
  
  <pre><code>str = "Action, Adventure, Drama"
  
  def process_genre(str):
      for genre in str.split(","):
          result = []
          for syn in wordnet.synsets(genre):
              for l in syn.lemmas():
                  result.append(l.name())
          print(result)
  process_genre(str)
  </code></pre>
  
  <p>This is the output</p>
  
  <pre><code>['action', 'action', 'activity', 'activeness', 'military_action', 'action', 'natural_process', 'natural_action', 'action', 'activity', 'action', 'action', 'action', 'action_mechanism', 'legal_action', 'action', 'action_at_law', 'action', 'action', 'action', 'sue', 'litigate', 'process', 'carry_through', 'accomplish', 'execute', 'carry_out', 'action', 'fulfill', 'fulfil']
  []
  []
  </code></pre>
  
  <p>The list for <code>Adventure</code> and <code>Drama</code> prints empty, which is supposed to have its synonym.</p>
  
  <p>Can anyone explain to me why? Is there a way to maybe reset it? Or...?</p>