Cosine | R Documentation |
Computes the cosine similarity for two single words
Cosine(x,y,tvectors=tvectors)
x |
A single word, given as a character of |
y |
A single word, given as a character of |
tvectors |
the semantic space in which the computation is to be done (a numeric matrix where every row is a word vector) |
Instead of using numeric vectors, as the cosine()
function from the lsa package does, this function allows for the direct computation of the cosine between two single words (i.e. Characters). which are automatically searched for in the LSA space given in as tvectors
.
The cosine similarity as a numeric
Fritz Guenther
Landauer, T.K., & Dumais, S.T. (1997). A solution to Plato's problem: The Latent Semantic Analysis theory of acquisition, induction and representation of knowledge. Psychological Review, 104, 211-240.
Dennis, S. (2007). How to use the LSA Web Site. In T. K. Landauer, D. S. McNamara, S. Dennis, & W. Kintsch (Eds.), Handbook of Latent Semantic Analysis (pp. 35-56). Mahwah, NJ: Erlbaum.
distance
asym
data(wonderland)
Cosine("alice","rabbit",tvectors=wonderland)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.