【问题标题】:What's the equivalent to get_sentence_vector for Gensim's FastText?Gensim 的 FastText 的 get_sentence_vector 等价于什么?
【发布时间】:2021-03-31 12:20:39
【问题描述】:

官方 Python 实现提供了有用的 get_sentence_vector(),它对给定句子中的单词进行求和、归一化 (L2) 和平均。

换句话说,我想嵌入一个新句子,给定一个训练有素的 Gensim 的 FastText 模型。

有这样的方法吗?

【问题讨论】:

  • this 有帮助吗?

标签: machine-learning nlp gensim word-embedding fasttext


【解决方案1】:

正如in this answer 解释的那样,Gensim 不提供get_sentence_vector 方法。

你可以使用官方的 fastText 库,也可以自己重写这个方法(here你可以找到原始的 C++ 实现)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-05
    • 2011-02-03
    • 2014-04-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多