mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 07:57:35 +03:00 
			
		
		
		
	* moving syntax folder to _parser_internals * moving nn_parser and transition_system * move nn_parser and transition_system out of internals folder * moving nn_parser code into transition_system file * rename transition_system to transition_parser * moving parser_model and _state to ml * move _state back to internals * The Parser now inherits from Pipe! * small code fixes * removing unnecessary imports * remove link_vectors_to_models * transition_system to internals folder * little bit more cleanup * newlines
		
			
				
	
	
		
			23 lines
		
	
	
		
			722 B
		
	
	
	
		
			Cython
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			722 B
		
	
	
	
		
			Cython
		
	
	
	
	
	
| from cymem.cymem cimport Pool
 | |
| 
 | |
| from ..vocab cimport Vocab
 | |
| from .pipe cimport Pipe
 | |
| 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(Pipe):
 | |
|     cdef readonly Vocab vocab
 | |
|     cdef public object model
 | |
|     cdef public object _rehearsal_model
 | |
|     cdef readonly TransitionSystem moves
 | |
|     cdef readonly object cfg
 | |
|     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
 |