DOsinga / deep_learning_cookbook

Deep Learning Cookbox
Apache License 2.0
689 stars 338 forks source link

8.1 Wordnet missing #41

Open hpharmsen opened 5 years ago

hpharmsen commented 5 years ago

You need something like nltk.download('wordnet') to actually use wordnet.

mikechen66 commented 4 years ago

You need to add the line of code: nltk.download('wordnet'). Then you can get the missed wordnet.

nltk.download('wordnet')

pairs = {} for synset in wn.all_synsets('n'): word = synset.name().split('.', 1)[0] if not word in pairs: pairs[word] = p.plural(word) len(pairs)