part2
part2 copied to clipboard
translate-pytorch.ipynb
Hi, def load_glove(loc): return (bcolz.open(loc+'.dat')[:], pickle.load(open(loc+'_words.pkl','rb'), encoding='latin1'), pickle.load(open(loc+'_idx.pkl','rb'), encoding='latin1')) en_vecs, en_wv_word, en_wv_idx = load_glove('/data/datasets/nlp/glove/results/6B.100d') en_w2v = {w: en_vecs[en_wv_idx[w]] for w in en_wv_word} n_en_vec, dim_en_vec = en_vecs.shape I can't find 6B.100d_words.pkl, 6B.100d_idx.pkl where https://nlp.stanford.edu/projects/glove/. Can you tell download them from where, thanks.