initial commit

This commit is contained in:
Chris Proctor
2026-03-09 12:28:21 -04:00
commit 039a467a9f
13 changed files with 841 additions and 0 deletions

28
wordplay/wordplay.py Normal file
View File

@@ -0,0 +1,28 @@
import gensim.downloader
EMBEDDING_MODELS = {
'small': 'glove-wiki-gigaword-100', # ~128 MB
'medium': 'glove-wiki-gigaword-300', # ~376 MB
'large': 'word2vec-google-news-300', # ~1.6 GB
}
def load_embeddings(size='small'):
"Download (if needed) and load the embedding model for the given size."
return gensim.downloader.load(EMBEDDING_MODELS[size])
def synonyms(model, word, n=5):
pass
def average(model, word1, word2):
pass
def outlier(model, words):
pass
def sort(model, words):
pass