Combining multiple NER components in the same pipeline
When spaCy loads a pipeline, it iterates over the pipeline names and looks up each component name in the [components] block. The components can be built either using factory or source. Factories are named functions that take settings and return a pipeline component function, and the source is used to reference the name of the path of a trained pipeline to copy components from.
To use both the NER component we’ve trained and the NER component of en_core_web_sm, we will create a new config.cfg file and source the NER components in the pipeline. With this config.cfg file set, we will then use the spacy assemble command to assemble the config without additional training. To be able to reference the trained NER component using spacy assemble, we will create a package for the pipeline and install it with pip install.
Creating a package for the trained pipeline
The spacy package CLI command generates an installable Python...