mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 16:07:41 +03:00 
			
		
		
		
	Add rokenizer test for zero length string
This commit is contained in:
		
							parent
							
								
									2a0615104b
								
							
						
					
					
						commit
						363473aeed
					
				|  | @ -10,6 +10,10 @@ from spacy.en import English | ||||||
| def EN(): | def EN(): | ||||||
|     return English().tokenizer |     return English().tokenizer | ||||||
| 
 | 
 | ||||||
|  | def test_no_word(EN): | ||||||
|  |     tokens = EN(u'') | ||||||
|  |     assert len(tokens) == 0 | ||||||
|  | 
 | ||||||
| def test_single_word(EN): | def test_single_word(EN): | ||||||
|     tokens = EN(u'hello') |     tokens = EN(u'hello') | ||||||
|     assert tokens[0].orth_ == 'hello' |     assert tokens[0].orth_ == 'hello' | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user