How to grow a list of related words based on initial keywords? I recently saw a cool feature that was once available in Google Sheets: you start by writing a few related keywords in consecutive cells, say: "blue", "green", "yellow", and it automatically generates similar keywords (in this case, other colors). See more examples in this YouTube video.

I would like to reproduce this in my own program. I'm thinking of using Freebase, and it would work like this intuitively: 


Retrieve the list of given words in Freebase;
Find their "common denominator(s)" and construct a distance metric based on this;
Rank other concepts based on their "distance" to the original keywords;
Display the next closest concepts.


As I'm not familiar with this area, my questions are:


Is there a better way to do this?
What tools are available for each step?
The word2vec algorithm may be a good way to retrieve more elements for a list of similar words. It is an unsupervised "deep learning" algorithm that has previously been demonstrated with Wikipedia-based training data (helper scripts are provided on the Google code page).

There are currently C and Python implementations. This tutorial by Radim Řehůřek, the author of the Gensim topic modelling library, is an excellent place to start.

The "single topic" demonstration on the tutorial is a good example of retreiving similar words to a single term (try searching on 'red' or 'yellow'). It should be possible to extend this technique to find the words that have the greatest overall similarity to a set of input words.