| query.words | R Documentation |
Search for words similar to the query.
query.words(wordvectors, origin, sub = NULL, add = NULL, nres = 5, lang = "en")
wordvectors |
The vectorized words |
origin |
The query (character). |
sub |
Words to be substrated to the origin. |
add |
Words to be Added to the origin. |
nres |
The number of results. |
lang |
The language of the words (NULL if no stemming). |
The Words the most similar to the query.
vectorize.words, sim2
# 'capitals' is small, so the word vectors are coarse and 'ndim' is reduced
# accordingly; phrase detection needs a much larger corpus.
data (capitals)
words = vectorize.words (capitals, mincount = 2, ndim = 10, maxiter = 5)
query.words (words, origin = "paris", sub = "france", add = "germany")
query.words (words, origin = "berlin", sub = "germany", add = "france")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.