Merge pull request #1115 from v3t3a/patch-2

docs - Add read() method when opening file (Lightning tour)
This commit is contained in:
Ines Montani 2017-06-12 21:19:25 +02:00 committed by GitHub
commit b2a28028cf

View File

@ -181,7 +181,7 @@ p
from spacy.vocab import Vocab
nlp = spacy.load('en')
moby_dick = open('moby_dick.txt', 'r')
moby_dick = open('moby_dick.txt', 'r').read()
doc = nlp(moby_dick)
doc.to_disk('/moby_dick.bin')