# Pairwise cosine computation

### Description

Computes pairwise cosine similarities

### Usage

1 |

### Arguments

`x` |
a character vector |

`y` |
a character vector |

`tvectors` |
the semantic space in which the computation is to be done (a numeric matrix where every row is a word vector) |

`breakdown` |
if |

### Details

Computes pairwise cosine similarities for two vectors of words. These vectors need to have the same length.

### Value

A vector of the same length as `x`

and `y`

containing the pairwise cosine similarities. Returns `NA`

if at least one word in a pair is not found in the semantic space.

### Author(s)

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.

### See Also

`cosine`

,
`Cosine`

,
`multicos`

,

### Examples

1 2 3 | ```
data(wonderland)
pairwise("mouse rabbit cat","king queen hearts",
tvectors=wonderland)
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.