Analyzing further
This section will describe further analysis that can be performed on the data after visualization. For example, exploring cosine distance similarity between different word vectors.
Getting ready
The following link is a great blog on how cosine distance similarity works and also discusses some of the math involved:
How to do it...
Consider the following:
- Various natural-language processing tasks can be performed using the different functions ofÂ
Word2Vec
. One of them is finding the most semantically similar words given a certain word (that is, word vectors that have a high cosine similarity or a short Euclidean distance between them). This can be done by using theÂmost_similar
 function formÂWord2Vec
, as shown in the following screenshot: This screenshots all the closest words related to the wordLannister
: This screenshot shows a list of all the words related to wordÂJon...