The Illustrated Word2vec (2019)

The Illustrated Word2vec (2019)

This is a word embedding for the word “king” (GloVe vector trained on Wikipedia):

It’s a list of 50 numbers. But before we get to word2vec, we need to look at a conceptual parent of word embeddings: the neural language model. To look exactly at how that’s done, let’s see how the sliding window processes this phrase:

When we start, the window is on the first three words of the sentence:

We take the first two words to be features, and the third word to be a label:

We now have generated the first sample in the dataset we can later use to train a language model.

Source: jalammar.github.io