In this demo, you can see how good computers are in “understanding” the meaning of words. Given three words, the computer finds a new one that fits best to the proposed relation.
Examples you can try
- Einstein scientist Picasso
- Italy pizza Germany
This demo uses “word vectors”, which are a mathematical representation of words as vectors with 300 dimensions. These vectors are generated automatically from huge text collections, using unsupervised machine learning. Each vector stands for a word and represents, in a sense, the meaning of this word.
Surprisingly, it turns out that you can do basic arithmetic with these vectors, such as adding and subtracting them. For instance, if you compute “man - king” and “woman - queen”, you get almost the same vector.
In this demo, we do it the other way round: given the words “man”, “king”, and “woman”, we
compute “woman - man + king” and the search for the word that is most similar to the result
- which turns out to be “queen”.
Works only for English words. Correct capitalization is important, since “Apple” and “apple” are different words.