mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 07:57:35 +03:00 
			
		
		
		
	* Check whether doc is instantiated When creating docs to pair with gold parses, modify test to check whether a doc is unset rather than whether it contains tokens. * Restore test of evaluate on an empty doc * Set a minimal gold.orig for the scorer Without a minimal gold.orig the scorer can't evaluate empty docs. This is the v3 equivalent of #4925.
		
			
				
	
	
		
			9 lines
		
	
	
		
			152 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
		
			152 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import pytest
 | |
| from spacy.language import Language
 | |
| 
 | |
| 
 | |
| def test_issue4924():
 | |
|     nlp = Language()
 | |
|     docs_golds = [("", {})]
 | |
|     nlp.evaluate(docs_golds)
 |