Word2Vec For Word Embeddings -A Beginner’s Guide
Why are word embeddings needed?
Let us consider the two sentences – “You can scale your business.” and “You can grow your business.”. These two sentences have the same meaning. If we consider a vocabulary considering these two sentences, it will constitute of these words: {You, can, scale, grow, your, business}.
A one-hot encoding of these words would create a vector of length 6. The encodings for each of the words would look like this:
You: [1,0,0,0,0,0], Can: [0,1,0,0,0,0], Scale: [0,0,1,0,0,0], Grow: [0,0,0,1,0,0],
Your: [0,0,0,0,1,0], Business: [0,0,0,0,0,1]
In a 6-dimensional space, each word would occupy one of the dimensions, meaning that none of these words has any similarity with each other – irrespective of their literal meanings.
Word2Vec, a word embedding methodology, solves this issue and enables similar words to have similar dimensions and, consequently, helps bring context.
What is Word2Vec?
Word2Vec creates vectors of the words that are distributed numerical representations of word features – these word features