mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Fix doc
This PR changes the `str`s to `unicode`s because `str`s throw the following error: ``` TypeError: Argument 'x' has incorrect type (expected unicode, got str) ```
This commit is contained in:
		
							parent
							
								
									d9fcf9b79e
								
							
						
					
					
						commit
						4c53a8ecd7
					
				| 
						 | 
				
			
			@ -46,13 +46,13 @@
 | 
			
		|||
        assert token.shape_ == 'Xxxxx'
 | 
			
		||||
        for lexeme in nlp.vocab:
 | 
			
		||||
            if lexeme.is_alpha:
 | 
			
		||||
                lexeme.shape_ = 'W'
 | 
			
		||||
                lexeme.shape_ = u'W'
 | 
			
		||||
            elif lexeme.is_digit:
 | 
			
		||||
                lexeme.shape_ = 'D'
 | 
			
		||||
                lexeme.shape_ = u'D'
 | 
			
		||||
            elif lexeme.is_punct:
 | 
			
		||||
                lexeme.shape_ = 'P'
 | 
			
		||||
                lexeme.shape_ = u'P'
 | 
			
		||||
            else:
 | 
			
		||||
                lexeme.shape_ = 'M'
 | 
			
		||||
                lexeme.shape_ = u'M'
 | 
			
		||||
        assert token.shape_ == 'W'
 | 
			
		||||
 | 
			
		||||
    +h3('examples-numpy-arrays') Export to numpy arrays
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user