Merge pull request #1074 from ardeego/patch-2

Print list comprehension
This commit is contained in:
Matthew Honnibal 2017-05-19 19:41:45 +02:00 committed by GitHub
commit 6c67482f34

View File

@ -17,10 +17,10 @@ p
| trying to do. | trying to do.
+code. +code.
import spacy # See "Installing spaCy" import spacy # See "Installing spaCy"
nlp = spacy.load('en') # You are here. nlp = spacy.load('en') # You are here.
doc = nlp(u'Hello, spacy!') # See "Using the pipeline" doc = nlp(u'Hello, spacy!') # See "Using the pipeline"
print((w.text, w.pos_) for w in doc) # See "Doc, Span and Token" print([(w.text, w.pos_) for w in doc]) # See "Doc, Span and Token"
+aside("Why do we have to preload?") +aside("Why do we have to preload?")
| Loading the models takes ~200x longer than | Loading the models takes ~200x longer than