Update migration guide

This commit is contained in:
ines 2017-10-10 06:38:11 +02:00
parent 9c96a6e131
commit 19598ebfee

View File

@ -484,15 +484,16 @@ p
p p
| If you've been using custom pipeline components, check out the new | If you've been using custom pipeline components, check out the new
| guide on #[+a("/usage/language-processing-pipelines") processing pipelines]. | guide on #[+a("/usage/language-processing-pipelines") processing pipelines].
| Appending functions to the pipeline still works but you might be able | Appending functions to the pipeline still works but the
| to make this more convenient by registering "component factories". | #[+api("language#add_pipe") #[code add_pipe]] methods now makes this
| Components of the processing pipeline can now be disabled by passing a | much more convenient. Components of the processing pipeline can now
| list of their names to the #[code disable] keyword argument on loading | be disabled by passing a list of their names to the #[code disable]
| or processing. | keyword argument on load, or by simply demoving them from the
| pipeline alltogether.
+code-new. +code-new.
nlp = spacy.load('en', disable=['tagger', 'ner']) nlp = spacy.load('en', disable=['tagger', 'ner'])
doc = nlp(u"I don't want parsed", disable=['parser']) nlp.remove_pipe('parser')
+code-old. +code-old.
nlp = spacy.load('en', tagger=False, entity=False) nlp = spacy.load('en', tagger=False, entity=False)
doc = nlp(u"I don't want parsed", parse=False) doc = nlp(u"I don't want parsed", parse=False)