mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 09:57:26 +03:00 
			
		
		
		
	* Alignment: use a simplified ragged type for performance This introduces the AlignmentArray type, which is a simplified version of Ragged that performs better on the simple(r) indexing performed for alignment. * AlignmentArray: raise an error when using unsupported index * AlignmentArray: move error messages to Errors * AlignmentArray: remove simlified ... with simplifications * AlignmentArray: fix typo that broke a[n:n] indexing
		
			
				
	
	
		
			8 lines
		
	
	
		
			170 B
		
	
	
	
		
			Cython
		
	
	
	
	
	
			
		
		
	
	
			8 lines
		
	
	
		
			170 B
		
	
	
	
		
			Cython
		
	
	
	
	
	
from libcpp.vector cimport vector
 | 
						|
cimport numpy as np
 | 
						|
 | 
						|
cdef class AlignmentArray:
 | 
						|
    cdef np.ndarray _data
 | 
						|
    cdef np.ndarray _lengths
 | 
						|
    cdef np.ndarray _starts_ends
 |