find_cos_sim {conText} | R Documentation |
Find cosine similarities between target and candidate words
Description
Find cosine similarities between target and candidate words
Usage
find_cos_sim(target_embedding, pre_trained, candidates, norm = "l2")
Arguments
target_embedding |
matrix of numeric values |
pre_trained |
matrix of numeric values - pretrained embeddings |
candidates |
character vector defining vocabulary to subset comparison to |
norm |
character = c("l2", "none") - how to scale input matrices. If they are already scaled - use "none" (see ?sim2) |
Value
a vector of cosine similarities of length candidates
[Package conText version 1.4.3 Index]