-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discrepency between self.pipeline and self.pipe_names in language.py #1911
Comments
Ahhh, this took me a while to figure out, but I think I know what's going on here.
In your example, you've called ner = nlp.create_pipe('ner') # create built-in NER pipeline component
nlp.add_pipe(ner) # add it to the pipeline Instead, you've accidentally added a string Anyway, the bottom line is, this shouldn't be possible and spaCy should raise an error if the component you're trying to add is not callable. It's an interesting edge case we didn't consider. |
Thanks! Definitely a usage problem on my part. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I've run into two issues that seem to be caused by differences in a language's
pipeline
andpipe_names
attributes.The first issue I'm running into is that
nlp.pipe_names
andnlp.pipeline
give different answers for a blanken
model.When I load a new blank en model, getting
pipe_names
behaves as expected:But when I call
nlp.pipeline
, it gives meJust to verify,
nlp.get_pipe('ner')
behaves as expected:The second issue is when I try to add NER to the pipeline:
The relevant code in
language.py
seems to be:self.pipeline
is initialized as an empty listself.pipe_names
is first called.pipe_names
is a listification ofself.pipeline
Your Environment
The text was updated successfully, but these errors were encountered: