trying to add pipes to en_coreference_web_trf from other model and all tokens are NOUNs #12644
-
|
I'm working something that I uses coreferencing and the basic spacy pipes. I was using It looks like this: But when I run help? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
The nlp = spacy.load("en_coreference_web_trf")
for p in ['tok2vec', 'tagger', 'parser', 'lemmatizer', 'attribute_ruler']:
try:
nlp.add_pipe(p, source=spacy.load("en_core_web_sm"))
except ValueError:
continue |
Beta Was this translation helpful? Give feedback.
-
|
lol so I was just forgetting one of the pipes. thanks -- it works now!! |
Beta Was this translation helpful? Give feedback.
The
lemmatizer,parserandtaggerpipe use thetok2vecpipe to get the contextualized word representations. So you have to add thetok2vecpipe as well and ensure that it runs before the other pipes. E.g. the following does work correctly: