spaCy custom NER are not working for new data set. #10893
Replies: 2 comments 1 reply
-
@arunnaray in the future, please don't post screenshots of code. It makes it much harder to copy/paste and it's also impossible to index for search engines. Is there a reason why you're writing your own training loop here? As of spaCy v3, the training loop no longer needs to be written and a command-line interface is able to handle all of that on your behalf. You may appreciate this YouTube video that highlights the transition from spaCy v2 to spaCy v3. |
Beta Was this translation helpful? Give feedback.
-
I notice your entities are very long spans, more like full sentences than a few words. While you can train an NER model on things like that, it won't work very well, and I'm not surprised you can't get useful matches. NER models are really intended for things like names that have clear boundaries and are relatively short. You might have more luck with the spancat component, which is less particular about span boundaries. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to create few custom NER for my use case :
Training data sample :
my code is below :
My models are showing labels for my train_data set, model is not returning anything for any other sample data / text that I am giving.
It just not return anything

.
Beta Was this translation helpful? Give feedback.
All reactions