Trained NER Model Not Labeling Custom Labels #9770
-
I am trying to train a blank NER (SpaCy 2.3.1) model to recognize PERSON, ORG, and PHONE entities. I have about 1000 observations of data with ~1300 PHONE entities, and less than 100 of both PERSON and ORG entities (I am POC'ing the phone number aspect, so I have a bigger dataset with more PERSON and ORG entities which I will train on after I figure out this issue.) For some weird reason, when I train the model, it does not predict a single PHONE entity when trying to predict on ANY data (even when trying to predict the training dataset), but it predicts PERSON and ORG entities, even though they are in a way smaller concentration than the PHONE entities. It seems to be related to the PHONE entities specifically, because when I train on the bigger dataset with only PERSON and ORG entities, the model works fine. If I train only on PHONE entities (removing PERSON and ORG entities), then the model does not predict PHONE, PERSON, or ORG entities. My training function is below:
Some training data
The meta.json file
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Sorry you're having trouble with this. It's been a while since I trained a v2 model, but your code doesn't have any obvious issues to me - for example, you're calling Besides your problem with training, a couple of other things...
|
Beta Was this translation helpful? Give feedback.
Sorry you're having trouble with this. It's been a while since I trained a v2 model, but your code doesn't have any obvious issues to me - for example, you're calling
add_label
properly. Could you provide a complete script with example data that reproduces the problem we could check?Besides your problem with training, a couple of other things...