Skip to content

Instantly share code, notes, and snippets.

@MaartenGr
Last active October 30, 2021 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaartenGr/8bd09bdccff551305aa8109dd163bf38 to your computer and use it in GitHub Desktop.
Save MaartenGr/8bd09bdccff551305aa8109dd163bf38 to your computer and use it in GitHub Desktop.
import random
import nltk
nltk.download("wordnet")
from nltk.corpus import wordnet as wn
all_nouns = [word for synset in wn.all_synsets('n') for word in synset.lemma_names()
if "_" not in word]
selected_nouns = random.sample(all_nouns, 50_000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment