The Word2vec algorithm, invented by Tomas Mikolav while he was at Google in 2013, was one of the first modern embedding methods. It is a shallow, two-layer neural network that follows a similar intuition to the autoencoder in that network and is trained to perform a certain task without being actually used to perform that task. In the case of the Word2vec algorithm, that task is learning the representations of natural language. You can think of this algorithm as a context algorithm – everything that it knows is from learning the contexts of words within sentences. It works off something called the distributional hypothesis, which tells us that the context for each word is found from its neighboring words. For instance, think about ...

Get Hands-On Artificial Intelligence for Beginners now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.