def main():
# model_file = "../data/word2vec/character.model"
model_file = "../data/word2vec_new/word.model"
checkSimilarity(model_file, "?")
# character_wv_file = '../data/word2vec/character_model.txt'
# word_wv_file = '../data/word2vec/word_model.txt'
#
# embeddings_file = word_wv_file
# wv, vocabulary = load_embeddings(embeddings_file)
#
# tsne = TSNE(n_components=2, random_state=0)
# np.set_printoptions(suppress=True)
# Y = tsne.fit_transform(wv[:1000, :])
#
# plt.scatter(Y[:, 0], Y[:, 1])
# for label, x, y in zip(vocabulary, Y[:, 0], Y[:, 1]):
# plt.annotate(label, xy=(x, y), xytext=(0, 0), textcoords='offset points')
# plt.show()
评论列表
文章目录