Registering custom component for training NER on custom dataset #9958
-
Hello. I am trying to creating a blank spacy model with a custom ner pipeline trained on recognizing custom entities, in spacy v3. Now while adding the pipeline before training, I am getting the "Can't find factory" error, which means I have to register the component. I also went through the answer provided for a similar question on stackoverflow.com
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
You only need to create a factory if you're making a new kind of component with different functionality - if you want to use an existing component with NER, you don't need to (and shouldn't) create a factory.
Note that unlike v2, in v3 the preferred method for training is to use the config file system, so you won't have code to do this at all. It might be helpful to look at chapter 4 in the spaCy course, which goes through the process of training an NER model. One thing I'm confused about is why you were getting an error though. Could you paste the code you wrote and the exact error you got? |
Beta Was this translation helpful? Give feedback.
You only need to create a factory if you're making a new kind of component with different functionality - if you want to use an existing component with NER, you don't need to (and shouldn't) create a factory.
Note that unlike v2, in v3 the preferred method for training is to use the config file system, so you won't have code to do this at all.
It might be helpful to look at chapter 4 in the spaCy course, which goes through the process of training an NER model.
One thing I'm confused about is why you were getting an error though. Could you paste the code you wrote and the exact error you got?