Python port of Mikolov's word2phrase.c from the word2vec toolkit