# Construction via add_pipe with default model
ner = nlp.add_pipe("ner")
# Construction via add_pipe with custom model
config = {"model": {"@architectures": "my_ner"}}
parser = nlp.add_pipe("ner", config=config)
# Construction from class
from spacy.pipeline import EntityRecognizer
ner = EntityRecognizer(nlp.vocab, model)