简体   繁体   English

导出 R text2vec 向量以用于 Python 中的 Gensim

[英]Export R text2vec Vectors for use in Gensim in Python

I have created GloVE vectors in R previously using text2vec library.我之前使用text2vec库在 R 中创建了 GloVE 向量。

Is there any easy way to export these for use in Python where I have scripts to compare/contract with Gensim created word vectors?是否有任何简单的方法可以导出这些以在 Python 中使用,我有脚本可以与 Gensim 创建的词向量进行比较/合同? I know there is a specific word2vec c_format, but Im not sure if R has the capability of producing this.我知道有一个特定的 word2vec c_format,但我不确定 R 是否有能力产生这个。

You should have a look at the word2vec R package https://cran.r-project.org/web/packages/word2vec/index.html . You should have a look at the word2vec R package https://cran.r-project.org/web/packages/word2vec/index.html . It has facilities to write the wordvectors in binary and text format.它具有以二进制和文本格式编写词向量的功能。 See http://bnosac.be/index.php/blog/100-word2vec-in-rhttp://bnosac.be/index.php/blog/100-word2vec-in-r

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM