在r-packagetext中需要计算多少个词的词嵌入变量的语义相似度?我正在尝试运行:
library(text)
WEhello<-textEmbed("hello")
WEgoodbye<-textEmbed("goodbye")
textSimilarity(WEhello, WEgoodbye)
但是我得到这个错误:
Error in `dplyr::select()`:
! `select()` doesn't handle lists.
要做到这一点,你必须选择单词嵌入(并避免包括$singlewords_we)。试试这个:
textSimilarity(WEhello$x, WEgoodbye$x)