voc='./voc_emb/voc' / word_embeding samples?
Closed this issue · 2 comments
johndpope commented
voc='./voc_emb/voc',
emb_file = './voc_emb/word_embeding',
what data structure is this? where to download?
can you explain how to recreate/ download.
johndpope commented
is it like this
word_vectors = read_glove_vectors(word_vectors_path, token_to_index.keys())
l = list(word_vectors)
voc_emb = {a for (a,b) in l}
len(voc_emb)
johndpope commented
I think I found it.
def load_emb(dataset):
if not hparam.voc:
dataset.generate_vocab()
else:
dataset.load_voc_pickle()
if not hparam.emb_file:
word_emb = dataset.save_emb_pickle()
else:
word_emb = dataset.load_emb_pickle()