Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using fasttext pre-trained embedding #44

Open
NewEnglandML opened this issue May 17, 2018 · 2 comments
Open

Using fasttext pre-trained embedding #44

NewEnglandML opened this issue May 17, 2018 · 2 comments

Comments

@NewEnglandML
Copy link

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?

@wzhouad
Copy link
Collaborator

wzhouad commented May 18, 2018

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

@NewEnglandML
Copy link
Author

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants