mirror of https://github.com/explosion/spaCy.git
Merge pull request #1687 from mpuels/patch-1
doc: Add missing *-operator to nlp.disable_pipes() in Lightning Tour
This commit is contained in:
commit
798c4c14a7
|
@ -112,7 +112,7 @@ p
|
|||
nlp = spacy.load('en')
|
||||
train_data = [("Uber blew through $1 million", {'entities': [(0, 4, 'ORG')]})]
|
||||
|
||||
with nlp.disable_pipes([pipe for pipe in nlp.pipe_names if pipe != 'ner']):
|
||||
with nlp.disable_pipes(*[pipe for pipe in nlp.pipe_names if pipe != 'ner']):
|
||||
optimizer = nlp.begin_training()
|
||||
for i in range(10):
|
||||
random.shuffle(train_data)
|
||||
|
|
Loading…
Reference in New Issue