mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	* rename Pipe to TrainablePipe * split functionality between Pipe and TrainablePipe * remove unnecessary methods from certain components * cleanup * hasattr(component, "pipe") should be sufficient again * remove serialization and vocab/cfg from Pipe * unify _ensure_examples and validate_examples * small fixes * hasattr checks for self.cfg and self.vocab * make is_resizable and is_trainable properties * serialize strings.json instead of vocab * fix KB IO + tests * fix typos * more typos * _added_strings as a set * few more tests specifically for _added_strings field * bump to 3.0.0a36
		
			
				
	
	
		
			20 lines
		
	
	
		
			662 B
		
	
	
	
		
			Cython
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			662 B
		
	
	
	
		
			Cython
		
	
	
	
	
	
from cymem.cymem cimport Pool
 | 
						|
 | 
						|
from ..vocab cimport Vocab
 | 
						|
from .trainable_pipe cimport TrainablePipe
 | 
						|
from ._parser_internals.transition_system cimport Transition, TransitionSystem
 | 
						|
from ._parser_internals._state cimport StateC
 | 
						|
from ..ml.parser_model cimport WeightsC, ActivationsC, SizesC
 | 
						|
 | 
						|
 | 
						|
cdef class Parser(TrainablePipe):
 | 
						|
    cdef public object _rehearsal_model
 | 
						|
    cdef readonly TransitionSystem moves
 | 
						|
    cdef public object _multitasks
 | 
						|
 | 
						|
    cdef void _parseC(self, StateC** states,
 | 
						|
            WeightsC weights, SizesC sizes) nogil
 | 
						|
 | 
						|
    cdef void c_transition_batch(self, StateC** states, const float* scores,
 | 
						|
            int nr_class, int batch_size) nogil
 |