analogy: [experimental] Find analogical relationships between words
Description
[experimental] Find analogical relationships between words
Usage
analogy(x, formula, n = 10, exclude = TRUE, type = c("word", "simil"))
Value
a data.frame with the words sorted and their cosine similarity sorted
in descending order.
Arguments
x
a textmodel_wordvector object.
formula
a formula object that defines the relationship between words
using + or - operators.
n
the number of words in the resulting object.
exclude
if TRUE, words in formula are excluded from the result.
type
specify the type of vectors to be used. "word" is word vectors
while "simil" is similarity vectors.
References
Mikolov, T., Sutskever, I., Chen, K., Corrado, G., & Dean, J. (2013).
Distributed Representations of Words and Phrases and their Compositionality.
http://arxiv.org/abs/1310.4546.