18 lines
575 B
Python
18 lines
575 B
Python
import gzip
|
|
import gensim
|
|
import numpy as np
|
|
import pandas as pd
|
|
import matplotlib.pyplot as plt
|
|
import matplotlib.gridspec as gridspec
|
|
from sklearn.preprocessing import LabelEncoder
|
|
from sklearn.linear_model import LogisticRegression
|
|
from gensim.models import Word2Vec
|
|
|
|
w2v = gensim.models.Word2Vec(vector_size=100)
|
|
w2v = Word2Vec.load("w2v.model")
|
|
#w2v.wv.save_word2vec_format('world.txt', binary=False)
|
|
|
|
#w2v.wv.load_word2vec_format('../../../ncexclude/nkjp+wiki-forms-all-100-cbow-hs.txt.gz', binary=False)
|
|
|
|
#print(w2v.wv.most_similar(['gol']))
|
|
print(w2v.wv.index_to_key) |