Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- KeyError: "word 'sso' not in vocabulary"
- import gensim
- model = gensim.models.KeyedVectors.load_word2vec_format('D:/NLP JIRA/GoogleNews-vectors-negative300.bin', binary=True)
- print(model)
- words = list(model.wv.vocab)
- print(words)
- print(model[words])
- for words in op:
- print(words)
- obj = model[words]
- print(obj)
- op = [['observations', 'sso', 'clienttool', 'testing'], ['logouri', 'column', 'clients', 'table', 'accepting', 'values', 'null']]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement