mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-30 23:47:31 +03:00 
			
		
		
		
	* Add exception type to _arg_max_among in tagger
This commit is contained in:
		
							parent
							
								
									9e00798820
								
							
						
					
					
						commit
						a432862fde
					
				|  | @ -88,7 +88,7 @@ def _make_tag_dict(counts): | |||
|     return tagdict | ||||
| 
 | ||||
| 
 | ||||
| cdef class_t _arg_max(weight_t* scores, int n_classes) except 9000: | ||||
| cdef int _arg_max(weight_t* scores, int n_classes) except -1: | ||||
|     cdef int best = 0 | ||||
|     cdef weight_t score = scores[best] | ||||
|     cdef int i | ||||
|  | @ -99,7 +99,7 @@ cdef class_t _arg_max(weight_t* scores, int n_classes) except 9000: | |||
|     return best | ||||
| 
 | ||||
| 
 | ||||
| cdef class_t _arg_max_among(weight_t* scores, list classes): | ||||
| cdef int _arg_max_among(weight_t* scores, list classes) except -1: | ||||
|     cdef int best = classes[0] | ||||
|     cdef weight_t score = scores[best] | ||||
|     cdef class_t clas | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user