Imagine a scenario where I ask you to predict the class of objects in an image where you have not seen an image of the object class earlier. How would you make predictions in such a scenario?
Intuitively, we resort to the attributes of the object in the image and then try to identify the object that matches the most attributes.
In one such scenario where we have to come up with attributes automatically (where the attributes are not given for training), we leverage word vectors. Word vectors encompass semantic similarity among words. For example, all animals would have similar word vectors and automobiles would have very different word vector representations. While the generation of word vectors is out of scope for this book, we will work on pre-trained word vectors. At a very high level, words that have similar surrounding words (context) will have similar vectors. Here's a sample t-SNE representation of word vectors:
From the preceding sample, we...