'Predict word w3 as in w0:w1 vs w2:w3.'

def analogy(self, w0, w1, w2):

    wid = np.array([[self._word2id.get(w, 0) for w in [w0, w1, w2]]])
    idx = self._predict(wid)
    for c in [self._id2word[i] for i in idx[0, :]]:
        if (c not in [w0, w1, w2]):
            print(c)
            break
    print('unknown')
