-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
Hi, I have tried to use my own lemmatizer on en_core_web_sm:
nlp = spacy.load('en_core_web_sm', disable=['lemmatizer'])
nlp.remove_pipe("lemmatizer") #DISABLE seems not to be working, this is a good replacement
print(1, nlp.pipe_names)
#add pipeline component
config = {"mode": "lookup"}
lemmatizer = nlp.add_pipe("lemmatizer", config=config)
lemmatizer.initialize()
print(2, nlp.pipe_names)
sentence = "What a wonderful day today for playing"
doc = nlp(sentence)```
If I look at the nlp.pipe_names output:
1 ['tok2vec', 'tagger', 'parser', 'attribute_ruler', 'ner']
2 ['tok2vec', 'tagger', 'parser', 'attribute_ruler', 'ner']
The lemmatizer has not been added: I tried with nlp = English() and works.
Another issue, I had to use nlp.remove_pipe("lemmatizer") because disable was not working.
Metadata
Metadata
Assignees
Labels
No labels