Similar to the way word2vec generates word vectors, GloVe (short for Global Vectors for Word Representation), also generates word vectors but using a different method. In this section, we will explore how GloVe works and then get into the implementation details of GloVe.
Building word vectors using GloVe
Getting ready
GloVe aims to achieve two goals:
- Creating word vectors that capture meaning in vector space
- Taking advantage of global count statistics instead of only local information
GloVe learns word vectors by looking at the cooccurrence matrix of words and optimizing for a loss function. The working details of the GloVe algorithm can be understood from the following example:
Let's consider a scenario where there...