# Consine similarity using word embeddings & other metadata

I have a use case where i need to find two similar documents. Each document has some (long) description and some metadata. I can go with TF-IDF representation but i want to take advantage of glove embedding (e.g. "woman is playing" and "man is playing" is same).

I have derived array of embedded vector for documents (firstly i converted document to padded sequences of same length, then replaced each word with corresponding embedding) & metadata vector

 ------------------------------Glove Emb-----------------------------   --metadata---
[[[-1.2555, 0.6999, ..., 0.0000], ..., [2.6958, 0.6999, ..., 0.0120]], 0, 0, 1, 2, 5]


How can i calculate consine similarity from it?

EDIT: I have glove embedded sequences for each document. i.e. vector of embedding. I don't have any idea about calculating cosine similarity from it

## migrated from stackoverflow.comMay 3 '18 at 12:08

This question came from our site for professional and enthusiast programmers.