mirror of https://github.com/explosion/spaCy.git
* Check for KeyboardInerrupt in parser.__call__
This commit is contained in:
parent
03e8a4293d
commit
c025a0c64b
|
@ -5,6 +5,7 @@ from __future__ import unicode_literals
|
||||||
cimport cython
|
cimport cython
|
||||||
|
|
||||||
from cpython.ref cimport PyObject, Py_INCREF, Py_XDECREF
|
from cpython.ref cimport PyObject, Py_INCREF, Py_XDECREF
|
||||||
|
from cpython.exc cimport PyErr_CheckSignals
|
||||||
|
|
||||||
from libc.stdint cimport uint32_t, uint64_t
|
from libc.stdint cimport uint32_t, uint64_t
|
||||||
from libc.string cimport memset, memcpy
|
from libc.string cimport memset, memcpy
|
||||||
|
@ -109,6 +110,8 @@ cdef class Parser:
|
||||||
)
|
)
|
||||||
|
|
||||||
action.do(stcls, action.label)
|
action.do(stcls, action.label)
|
||||||
|
# Check for KeyboardInterrupt etc. Untested
|
||||||
|
PyErr_CheckSignals()
|
||||||
self.moves.finalize_state(stcls)
|
self.moves.finalize_state(stcls)
|
||||||
tokens.set_parse(stcls._sent)
|
tokens.set_parse(stcls._sent)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue