Description Usage Arguments Value Note
View source: R/nearest_neighbors.R
Find the nearest neighbors of a cue given a trained word embedding model
1 | nearest_neighbors(cue, embeds, N = 5, method = "cosine", norm = "l2")
|
cue |
cue word for which we want nearest neighbors |
embeds |
matrix of trained embeddings |
N |
number of nearest neighbors to return |
method |
a |
norm |
a |
a character vector of nearest neighbors of length N
context
the first nearest neighbor will be the cue itself.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.