visualization.py 文件源码

python
阅读 37 收藏 0 点赞 0 评论 0

项目:DLDisambiguation 作者: Labyrinth108 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号