title: How to find synonyms using the relations in wordnet
body: <p>I am new to NLP, NLTK and Python. I am using wordnet to get the synonyms for a word in given sentence.  I am using the below code to get the synonyms and lemma names of those words</p>
  
  <pre><code>synonyms = wordnet.synsets(w,pos)
  lemmas.append(list( set(chain.from_iterable([w.lemma_names() for w in synonyms]))))
  </code></pre>
  
  <p>eg : wordnet.synsets("get",'v')</p>
  
  <p>The lemma_names for this word "get" returns many things which are irrelevant for me. </p>
  
  <p>My search string is "error getting the report". lemma_names has even "buzz off", "gets under one's skin" which are not correct for my statement. </p>
  
  <p>So is there a way get synonyms which are relevant to the statement? is there any concept or algorithms that I can check for?</p>