def build_wordembed_dict(embeddings, vocab):
    """Builds a wordembedding dictionary (word->np vector) from tensor"""
    ret = {}
    for i, embedding in enumerate(embeddings):
        word = vocab.i2f[i]
        ret[word] = embedding.numpy()

    return ret