Created
August 7, 2021 16:15
-
-
Save Yuktha-Majella/d053be5e8e08501593c2ae3e9b741432 to your computer and use it in GitHub Desktop.
Creating a Word2Vec model in Gensim
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
from gensim.models.word2vec import Word2Vec | |
from multiprocessing import cpu_count | |
import gensim.downloader as api | |
dataset = api.load("text8") | |
words = [d for d in dataset] | |
data1 = words[:1000] | |
w2v_model = Word2Vec(data1, min_count = 0, workers=cpu_count()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment