jonadsimon / entendrepreneur-web

web app for generating funny portmanteaus and rhymes
http://www.punchlinedesign.net
186 stars 15 forks source link

Preload WordNet and associated functions #2

Open jonadsimon opened 5 years ago

jonadsimon commented 5 years ago

The initial run of the script is slow due to needing to load the following dependencies, and initialize the Lemmatizer and Stemmer

from nltk.corpus import wordnet as wn
from nltk.stem import WordNetLemmatizer
from nltk.stem.porter import PorterStemmer

Refactor the code so that they load in the background while the user is typing in the query words

jonadsimon commented 5 years ago

May not be necessary since this only needs to be done when server first spins up...