mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 07:57:35 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			405 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			405 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| # coding: utf8
 | |
| from __future__ import unicode_literals
 | |
| 
 | |
| import pytest
 | |
| from ...tokens import Doc
 | |
| 
 | |
| 
 | |
| @pytest.mark.parametrize('text,tag,lemma',
 | |
|     [("anus", "NN", "anus"),
 | |
|      ("princess", "NN", "princess")])
 | |
| def test_issue912(en_vocab, text, tag, lemma):
 | |
|     '''Test base-forms of adjectives are preserved.'''
 | |
|     doc = Doc(en_vocab, words=[text])
 | |
|     doc[0].tag_ = tag
 | |
|     assert doc[0].lemma_ == lemma
 | |
| 
 |