Word2Vec能否使用完整版的腾讯语料库

#21
by Liyanw - opened

如题,我设置了 Word2Vec("w2v-tencent-chinese") 但无法正常使用

自己下载模型文件,然后把模型文件的路径填上。

我下载了模型,也放到了合适的位置上,在选择“w2v-tencent-chinese”之后,只有下面一条信息:

2023-11-08 10:58:22.864 | INFO     | text2vec.word2vec:__init__:85 - Load pretrained model:w2v-tencent-chinese, path:/Users/wangliyan/.text2vec/datasets/Tencent_AILab_ChineseEmbedding.txt

但是在选择“w2v-light-tencent-chinese”的时候,有下面两条信息:

2023-11-08 11:00:33.681 | INFO
| text2vec.word2vec:__init__:81 - Load pretrained model:w2v-light-tencent-chinese, path:/Users/wangliyan/.text2vec/datasets/light_Tencent_AILab_ChineseEmbedding.bin
2023-11-08 11:00:35.223 | DEBUG    | text2vec.word2vec:__init__:94 - Load w2v from /Users/wangliyan/.text2vec/datasets/light_Tencent_AILab_ChineseEmbedding.bin, spend 1.54 sec

可能说明没有"w2v-tencent-chinese"的模型文件没有正确调用,但我不知道怎么处理

选择“w2v-tencent-chinese”弹出一条之后就完全没反应了

或者用完整的tencent.bin覆盖替换/Users/wangliyan/.text2vec/datasets/light_Tencent_AILab_ChineseEmbedding.bin就可以。

谢谢,根据这个思路找到了一个解决方案,把完整版的txt转换成bin格式:https://blog.csdn.net/TomorrowAndTuture/article/details/100878182

抱歉,试了一下还说不行,可能是utf-8编码的问题。请问您的light_Tencent_AILab_ChineseEmbedding.bin是怎么制作的?我想用类似的方法把完整的tencent.txt变成完整的tencent.bin

抱歉,再试了一下,应该是txt加载速度的问题,我的电脑打开完整模型的时间要5分钟。

shibing624 changed discussion status to closed

Sign up or log in to comment