I was planning to create word2vec visualization in tensor board and wanted to export out the matrix in tensorboard format while doing this I found this exception while going through the normal en_core_web_lg, any thoughts on what could be going on?
Where does the error actually occur? Is it in the bits you’ve commented out?
The error indicates there are vector entries for words that aren’t in the strings table. You can prevent the key error by adding a if key in nlp.vocab.strings check in your loop.
The error indicates there are vector entries for words that aren’t in the strings table. You can prevent the key error by adding a if key in nlp.vocab.strings check in your loop.
In general the vectors aren’t limited to only the strings in the stringstore. I think I might have used different frequency thresholds for the two, which could be improved. You might want to count how many strings are missing.