monikkinom / ner-lstm

Named Entity Recognition using multilayered bidirectional LSTM
540 stars 183 forks source link

"key error" while generating conll embeddings #20

Closed iramishtiaq closed 7 years ago

iramishtiaq commented 7 years ago

Traceback (most recent call last): File "get_conll_embeddings.py", line 130, in sentence_length=args.sentence_length) File "get_conll_embeddings.py", line 92, in get_input temp = model[line.split()[0]] KeyError: 'EU'

i am getting this error ,while trying to generate embeddings.please guide me!

shreenibhar commented 7 years ago

please use the word2vec or glovevec model python file model provided which handles missing keys by providing a random embedding. This error basically arises because EU is missing from the model u provided. The model should provide random embeddings for missing keys