mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	* Fix negative indices on spans
This commit is contained in:
		
							parent
							
								
									320836e346
								
							
						
					
					
						commit
						d153f18969
					
				| 
						 | 
				
			
			@ -40,6 +40,8 @@ cdef class Span:
 | 
			
		|||
        return self.end - self.start
 | 
			
		||||
 | 
			
		||||
    def __getitem__(self, int i):
 | 
			
		||||
        if i < 0:
 | 
			
		||||
            i = len(self) - i
 | 
			
		||||
        return self._seq[self.start + i]
 | 
			
		||||
 | 
			
		||||
    def __iter__(self):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user