mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Merge pull request #1115 from v3t3a/patch-2
docs - Add read() method when opening file (Lightning tour)
This commit is contained in:
		
						commit
						b2a28028cf
					
				| 
						 | 
				
			
			@ -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')
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user