mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 09:57:26 +03:00 
			
		
		
		
	Updated error code.
This commit is contained in:
		
							parent
							
								
									082992aebb
								
							
						
					
					
						commit
						f8a02f7fef
					
				| 
						 | 
					@ -960,7 +960,7 @@ class Errors(metaclass=ErrorsWithCodes):
 | 
				
			||||||
    E4003 = ("Training examples for distillation must have the exact same tokens in the "
 | 
					    E4003 = ("Training examples for distillation must have the exact same tokens in the "
 | 
				
			||||||
             "reference and predicted docs.")
 | 
					             "reference and predicted docs.")
 | 
				
			||||||
    E4004 = ("Backprop is not supported when is_train is not set.")
 | 
					    E4004 = ("Backprop is not supported when is_train is not set.")
 | 
				
			||||||
    E4005 = ("Expected `entity_id` to be of type {should_type}, but is of type {is_type}.")
 | 
					    E4006 = ("Expected `entity_id` to be of type {exp_type}, but is of type {found_type}.")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RENAMED_LANGUAGE_CODES = {"xx": "mul", "is": "isl"}
 | 
					RENAMED_LANGUAGE_CODES = {"xx": "mul", "is": "isl"}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -101,7 +101,7 @@ class InMemoryCandidate(Candidate):
 | 
				
			||||||
        self._entity_freq = entity_freq
 | 
					        self._entity_freq = entity_freq
 | 
				
			||||||
        if not isinstance(self._entity_id, int):
 | 
					        if not isinstance(self._entity_id, int):
 | 
				
			||||||
            raise ValueError(
 | 
					            raise ValueError(
 | 
				
			||||||
                Errors.E4005.format(should_type="int", is_type=str(type(entity_id)))
 | 
					                Errors.E4006.format(exp_type="int", found_type=str(type(entity_id)))
 | 
				
			||||||
            )
 | 
					            )
 | 
				
			||||||
        self._entity_id_str = self._hash_to_str(self._entity_id)
 | 
					        self._entity_id_str = self._hash_to_str(self._entity_id)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user