I am trying to generate a list of synonyms for given german words for a project.
I have tried the python librerie wn (not related to NLTK WordNet), here is my code:
import wn, wn.taxonomy wort = wn.synsets('Bürger')[0] for path in wn.taxonomy.hypernym_paths(dog): for i, ss in enumerate(path): print(' ' * i, ss, ss.lemmas()[0])
The problem is when I run the code by giving a list of words it only gives results for about half of the words.