Merge pull request #1687 from mpuels/patch-1

doc: Add missing *-operator to nlp.disable_pipes() in Lightning Tour
This commit is contained in:
Ines Montani 2017-12-06 14:36:29 +00:00 committed by GitHub
commit 798c4c14a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ p
nlp = spacy.load('en') nlp = spacy.load('en')
train_data = [("Uber blew through $1 million", {'entities': [(0, 4, 'ORG')]})] 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() optimizer = nlp.begin_training()
for i in range(10): for i in range(10):
random.shuffle(train_data) random.shuffle(train_data)