Last active
October 30, 2021 08:26
-
-
Save MaartenGr/8bd09bdccff551305aa8109dd163bf38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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