how to explain name and proc #12476
-
How to explain and understand the meaning of name and proc? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey Zanejins, If you load a pre-trained model: import spacy
nlp = spacy.load("en_core_web_sm") then you can iterate through the individual pipeline components. For example to print out the names of each pipe you can do for name, proc in nlp.pipeline:
print(name) which gives the output: tok2vec
tagger
parser
attribute_ruler
lemmatizer
ner If you print the "proc" that stands for "processor" you get: for name, proc in nlp.pipeline:
print(proc)
The code that you've posted goes through all the "gold" documents in a |
Beta Was this translation helpful? Give feedback.
Hey Zanejins,
If you load a pre-trained model:
then you can iterate through the individual pipeline components. For example to print out the names of each pipe you can do
which gives the output:
If you print the "proc" that stands for "processor" you get: