-
Notifications
You must be signed in to change notification settings - Fork 98
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
KeyError:Something #31
Comments
It looks like your dictionary doesn't have the key "something". You must use a preprocessing function that exists somewhere in my code that replaces all non-dictionary words with a special token, such as UNK. |
But the words that I used were present in the vocab file. (custom data) |
could you please explain? |
I don't have time now to help you with this, but if you describe your code modifications here, maybe another user can help you debug it. I will leave this issue open. |
can you please explain why this error is occurring?
Traceback (most recent call last):
File "conversation.py", line 215, in
Q = tokenize(query)
File "conversation.py", line 117, in tokenize
X = np.asarray([word_to_index[w] for w in tokenized_sentences])
File "conversation.py", line 117, in
X = np.asarray([word_to_index[w] for w in tokenized_sentences])
KeyError: 'something'
The text was updated successfully, but these errors were encountered: