sum_wordvec: Calculate the sum vector of multiple words.
Description
Calculate the sum vector of multiple words.
Usage
sum_wordvec(data, x = NULL, verbose = TRUE)
Value
Normalized sum vector.
Arguments
data
A wordvec (data.table) or
embed (matrix),
see data_wordvec_load.
x
Can be:
NULL: use the sum of all word vectors in data
a single word: "China"
a list of words: c("king", "queen")
cc(" king , queen ; man | woman")
an R formula (~ xxx) specifying
words that positively and negatively
contribute to the similarity (for word analogy): ~ boy - he + she~ king - man + woman~ Beijing - China + Japan
verbose
Print information to the console? Defaults to TRUE.