Implementation of phrase2vec from modified word2vec code.