R-Net icon indicating copy to clipboard operation
R-Net copied to clipboard

Using fasttext pre-trained embedding

Open NewEnglandML opened this issue 7 years ago • 2 comments

Hi, If the boolean flags for fasttext changed to True, the pre processing does not work properly. The modification for config.py is more that changing the size of embedding or not?

NewEnglandML avatar May 17 '18 20:05 NewEnglandML

The error may be caused by missing dataset. Uncomment the corresponding line in download.sh to download it.

wzhouad avatar May 18 '18 04:05 wzhouad

I have uncommented that line, when running config.py --mode prepro, during the creating the word embedding the error appears:

Traceback (most recent call last): File "config.py", line 134, in tf.app.run() File "/home/farshid/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run _sys.exit(main(argv)) File "config.py", line 119, in main prepro(config) File "/home/farshid/Desktop/tensorflow/New_RNET/R-Net-0.1 (copy)/prepro.py", line 223, in prepro size=config.glove_word_size, vec_size=config.glove_dim, token2idx_dict=word2idx_dict) File "/home/farshid/Desktop/tensorflow/New_RNET/R-Net-0.1 (copy)/prepro.py", line 116, in get_embedding for token, idx in token2idx_dict.items()} File "/home/farshid/Desktop/tensorflow/New_RNET/R-Net-0.1 (copy)/prepro.py", line 116, in for token, idx in token2idx_dict.items()} KeyError: "n't"

NewEnglandML avatar May 18 '18 14:05 NewEnglandML