allanj / pytorch_neural_crf

Pytorch implementation of LSTM/BERT-CRF for named entity recognition
359 stars 62 forks source link

ValueError: The label B-MISC does not exist in label2idx dict. The label might not appear in the training set. #25

Closed demdecuong closed 3 years ago

demdecuong commented 3 years ago

I run python trainer.py and follow your installation guildeline but got this bug. I use branch 'main' of your repo.

While debugging, I found that the function convert_iobes in src/data/data_utils might work not correctly since it replace the B-MISC into S-MISC in all situations with given train.txt :(

Looking forward to hearing from you

demdecuong commented 3 years ago

I have replace sample data into full data and it run successful.