Open Asrix-AI opened 4 years ago
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'