Give this component a copy of its own tok2vec #9554
-
Hello, This question is related to: projects/tutorials/ner_double/. Part of the code as shown below. import spacy nlp = spacy.load("en_core_web_md") # load the base pipeline give this component a copy of its own tok2vec The last comment said "give this component a copy of its own tok2vec". Isn't a tok2vec object of ["model.tok2vec"] is instantiated to replace the tok2vec layer in "ner" component ? I did a drug_nlp.pipe_names and it returned -> ['tok2vec', 'ner']. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think I know the answer. Looking at the config.cfg file again. My understanding now is "ner_drug" uses another tok2vec component. There are 2 independent tok2vec components loaded into the pipeline. One tok2vec for "nlp" and other tok2vec for drug_nlp. Please comment if my understanding is correct. |
Beta Was this translation helpful? Give feedback.
I think I know the answer.
Looking at the config.cfg file again. My understanding now is "ner_drug" uses another tok2vec component. There are 2 independent tok2vec components loaded into the pipeline. One tok2vec for "nlp" and other tok2vec for drug_nlp.
Please comment if my understanding is correct.