Clustering words by their distances or by custom classes

I find it useful from time to time so sharing here (see examples at the bottom, at least some of them may work for you too): gist. I will later publish it as a Library (as soon as the contept settles down).