multicos: Vector x Vector Comparison In codymarquart/LSAfun2: Applied Latent Semantic Analysis (LSA) Functions (no plotting/rgl)

Description

Computes a cosine matrix from given word vectors

Usage

 `1` ```multicos(x,y=x,tvectors=tvectors,breakdown=TRUE) ```

Arguments

 `x` a character vector or numeric of `length=ncol(tvectors)` (vector with same dimensionality as LSA space) `y` a character vector; y = x by default `tvectors` the semantic space in which the computation is to be done (a numeric matrix where every row is a word vector) `breakdown` if `TRUE`, the function `breakdown` is applied to the input

Details

Submit a character vector consisting of n words to get a n x n cosine matrix of all their pairwise cosines.
Alternatively, submit two different character vectors to get their pairwise cosines. Single words are also possible arguments.
Also allows for computation of cosines between a given numeric vector with the same dimensionality as the LSA space and a vector consisting of n words.

Value

A matrix containing the pairwise cosines of `x` and `y`

Fritz G?nther

References

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.

`cosine`, `Cosine`, `costring`, `multicostring`
 ```1 2 3``` ```data(wonderland) multicos("mouse rabbit cat","king queen", tvectors=wonderland) ```