How many words in word embedding variables do you need to compute semantic similarity in r-package text? I’m trying to run:
library(text)
WEhello<-textEmbed("hello")
WEgoodbye<-textEmbed("goodbye")
textSimilarity(WEhello, WEgoodbye)
But I get this error:
Error in `dplyr::select()`:
! `select()` doesn't handle lists.
CodePudding user response:
To get this to work you have to select the word embedding (and avoid also including the $singlewords_we). Try this:
textSimilarity(WEhello$x, WEgoodbye$x)