/* Generated by Cython 0.23.5 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
    #error Cython requires Python 2.6+ or Python 3.2+.
#else
#define CYTHON_ABI "0_23_5"
#include <stddef.h>
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif
#if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
#define CYTHON_USE_PYLONG_INTERNALS 1
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
#define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if PY_VERSION_HEX >= 0x030500B1
#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
#elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
typedef struct {
    unaryfunc am_await;
    unaryfunc am_aiter;
    unaryfunc am_anext;
} __Pyx_PyAsyncMethodsStruct;
#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
#else
#define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)

#ifndef __cplusplus
  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
#endif
#ifndef CYTHON_INLINE
  #define CYTHON_INLINE inline
#endif
template<typename T>
void __Pyx_call_destructor(T& x) {
    x.~T();
}
template<typename T>
class __Pyx_FakeReference {
  public:
    __Pyx_FakeReference() : ptr(NULL) { }
    __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
    T *operator->() { return ptr; }
    operator T&() { return *ptr; }
  private:
    T *ptr;
};

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif


#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__spacy__syntax__parser
#define __PYX_HAVE_API__spacy__syntax__parser
#include "stdint.h"
#include "math.h"
#include "string.h"
#include <vector>
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include "murmurhash/MurmurHash3.h"
#include "murmurhash/MurmurHash2.h"
#include "stdlib.h"
#include "stdio.h"
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif

#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER) && defined (_M_X64)
    #define __Pyx_sst_abs(value) _abs64(value)
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */

static PyObject *__pyx_m;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;

#if !defined(CYTHON_CCOMPLEX)
  #if defined(__cplusplus)
    #define CYTHON_CCOMPLEX 1
  #elif defined(_Complex_I)
    #define CYTHON_CCOMPLEX 1
  #else
    #define CYTHON_CCOMPLEX 0
  #endif
#endif
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #include <complex>
  #else
    #include <complex.h>
  #endif
#endif
#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
  #undef _Complex_I
  #define _Complex_I 1.0fj
#endif


static const char *__pyx_f[] = {
  "spacy/syntax/parser.pyx",
  ".env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd",
  "spacy/syntax/stateclass.pxd",
  "spacy/lexeme.pxd",
  ".env/local/lib/python2.7/site-packages/thinc/extra/eg.pxd",
  ".env/local/lib/python2.7/site-packages/cymem/cymem.pxd",
  ".env/local/lib/python2.7/site-packages/preshed/maps.pxd",
  ".env/local/lib/python2.7/site-packages/thinc/linear/features.pxd",
  ".env/local/lib/python2.7/site-packages/thinc/linalg.pxd",
  "spacy/strings.pxd",
  "spacy/morphology.pxd",
  "spacy/vocab.pxd",
  ".env/local/lib/python2.7/site-packages/Cython/Includes/cpython/type.pxd",
  "spacy/gold.pxd",
  "spacy/syntax/transition_system.pxd",
  "spacy/syntax/arc_eager.pxd",
  ".env/local/lib/python2.7/site-packages/preshed/counter.pxd",
  "spacy/tokens/doc.pxd",
};
#if defined(__GNUC__)
#define __Pyx_PACKED __attribute__((__packed__))
#else
#define __Pyx_PACKED
#endif


/* "preshed/maps.pxd":5
 * 
 * 
 * ctypedef uint64_t key_t             # <<<<<<<<<<<<<<
 * 
 * 
 */
typedef uint64_t __pyx_t_7preshed_4maps_key_t;

/* "typedefs.pxd":7
 * 
 * 
 * ctypedef float weight_t             # <<<<<<<<<<<<<<
 * ctypedef uint64_t atom_t
 * ctypedef uint64_t feat_t
 */
typedef float __pyx_t_5thinc_8typedefs_weight_t;

/* "typedefs.pxd":8
 * 
 * ctypedef float weight_t
 * ctypedef uint64_t atom_t             # <<<<<<<<<<<<<<
 * ctypedef uint64_t feat_t
 * ctypedef uint64_t hash_t
 */
typedef uint64_t __pyx_t_5thinc_8typedefs_atom_t;

/* "typedefs.pxd":9
 * ctypedef float weight_t
 * ctypedef uint64_t atom_t
 * ctypedef uint64_t feat_t             # <<<<<<<<<<<<<<
 * ctypedef uint64_t hash_t
 * ctypedef int32_t class_t
 */
typedef uint64_t __pyx_t_5thinc_8typedefs_feat_t;

/* "typedefs.pxd":10
 * ctypedef uint64_t atom_t
 * ctypedef uint64_t feat_t
 * ctypedef uint64_t hash_t             # <<<<<<<<<<<<<<
 * ctypedef int32_t class_t
 * ctypedef uint32_t count_t
 */
typedef uint64_t __pyx_t_5thinc_8typedefs_hash_t;

/* "typedefs.pxd":11
 * ctypedef uint64_t feat_t
 * ctypedef uint64_t hash_t
 * ctypedef int32_t class_t             # <<<<<<<<<<<<<<
 * ctypedef uint32_t count_t
 * ctypedef uint32_t time_t
 */
typedef int32_t __pyx_t_5thinc_8typedefs_class_t;

/* "typedefs.pxd":12
 * ctypedef uint64_t hash_t
 * ctypedef int32_t class_t
 * ctypedef uint32_t count_t             # <<<<<<<<<<<<<<
 * ctypedef uint32_t time_t
 * ctypedef int32_t len_t
 */
typedef uint32_t __pyx_t_5thinc_8typedefs_count_t;

/* "typedefs.pxd":13
 * ctypedef int32_t class_t
 * ctypedef uint32_t count_t
 * ctypedef uint32_t time_t             # <<<<<<<<<<<<<<
 * ctypedef int32_t len_t
 * ctypedef int32_t idx_t
 */
typedef uint32_t __pyx_t_5thinc_8typedefs_time_t;

/* "typedefs.pxd":14
 * ctypedef uint32_t count_t
 * ctypedef uint32_t time_t
 * ctypedef int32_t len_t             # <<<<<<<<<<<<<<
 * ctypedef int32_t idx_t
 * 
 */
typedef int32_t __pyx_t_5thinc_8typedefs_len_t;

/* "typedefs.pxd":15
 * ctypedef uint32_t time_t
 * ctypedef int32_t len_t
 * ctypedef int32_t idx_t             # <<<<<<<<<<<<<<
 * 
 * 
 */
typedef int32_t __pyx_t_5thinc_8typedefs_idx_t;

/* "linalg.pxd":9
 * from cymem.cymem cimport Pool
 * 
 * ctypedef float weight_t             # <<<<<<<<<<<<<<
 * 
 * include "compile_time_constants.pxi"
 */
typedef float __pyx_t_5thinc_6linalg_weight_t;

/* "typedefs.pxd":5
 * 
 * 
 * ctypedef uint64_t hash_t             # <<<<<<<<<<<<<<
 * ctypedef char* utf8_t
 * ctypedef int32_t attr_t
 */
typedef uint64_t __pyx_t_5spacy_8typedefs_hash_t;

/* "typedefs.pxd":7
 * ctypedef uint64_t hash_t
 * ctypedef char* utf8_t
 * ctypedef int32_t attr_t             # <<<<<<<<<<<<<<
 * ctypedef uint64_t flags_t
 * ctypedef uint16_t len_t
 */
typedef int32_t __pyx_t_5spacy_8typedefs_attr_t;

/* "typedefs.pxd":8
 * ctypedef char* utf8_t
 * ctypedef int32_t attr_t
 * ctypedef uint64_t flags_t             # <<<<<<<<<<<<<<
 * ctypedef uint16_t len_t
 * ctypedef uint16_t tag_t
 */
typedef uint64_t __pyx_t_5spacy_8typedefs_flags_t;

/* "typedefs.pxd":9
 * ctypedef int32_t attr_t
 * ctypedef uint64_t flags_t
 * ctypedef uint16_t len_t             # <<<<<<<<<<<<<<
 * ctypedef uint16_t tag_t
 */
typedef uint16_t __pyx_t_5spacy_8typedefs_len_t;

/* "typedefs.pxd":10
 * ctypedef uint64_t flags_t
 * ctypedef uint16_t len_t
 * ctypedef uint16_t tag_t             # <<<<<<<<<<<<<<
 */
typedef uint16_t __pyx_t_5spacy_8typedefs_tag_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":725
 * # in Cython to enable them only on the right systems.
 * 
 * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 */
typedef npy_int8 __pyx_t_5numpy_int8_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":726
 * 
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t
 */
typedef npy_int16 __pyx_t_5numpy_int16_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":727
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * #ctypedef npy_int96      int96_t
 */
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":728
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_int96      int96_t
 * #ctypedef npy_int128     int128_t
 */
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":732
 * #ctypedef npy_int128     int128_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 */
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":733
 * 
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t
 */
typedef npy_uint16 __pyx_t_5numpy_uint16_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":734
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * #ctypedef npy_uint96     uint96_t
 */
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":735
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_uint96     uint96_t
 * #ctypedef npy_uint128    uint128_t
 */
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":739
 * #ctypedef npy_uint128    uint128_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
 */
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":740
 * 
 * ctypedef npy_float32    float32_t
 * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_float80    float80_t
 * #ctypedef npy_float128   float128_t
 */
typedef npy_float64 __pyx_t_5numpy_float64_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":749
 * # The int types are mapped a bit surprising --
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t
 */
typedef npy_long __pyx_t_5numpy_int_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":750
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   longlong_t
 * 
 */
typedef npy_longlong __pyx_t_5numpy_long_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":751
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_ulong      uint_t
 */
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":753
 * ctypedef npy_longlong   longlong_t
 * 
 * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t
 */
typedef npy_ulong __pyx_t_5numpy_uint_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":754
 * 
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 */
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":755
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
 */
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":757
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
 */
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":758
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
 */
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":760
 * ctypedef npy_uintp      uintp_t
 * 
 * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t
 */
typedef npy_double __pyx_t_5numpy_float_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":761
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
 */
typedef npy_double __pyx_t_5numpy_double_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":762
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cfloat      cfloat_t
 */
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;

/* "preshed/counter.pxd":10
 * 
 * 
 * ctypedef int64_t count_t             # <<<<<<<<<<<<<<
 * 
 * 
 */
typedef int64_t __pyx_t_7preshed_7counter_count_t;
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< float > __pyx_t_float_complex;
  #else
    typedef float _Complex __pyx_t_float_complex;
  #endif
#else
    typedef struct { float real, imag; } __pyx_t_float_complex;
#endif

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< double > __pyx_t_double_complex;
  #else
    typedef double _Complex __pyx_t_double_complex;
  #endif
#else
    typedef struct { double real, imag; } __pyx_t_double_complex;
#endif


/*--- Type declarations ---*/
struct __pyx_obj_5cymem_5cymem_Pool;
struct __pyx_obj_5cymem_5cymem_Address;
struct __pyx_obj_7preshed_4maps_PreshMap;
struct __pyx_obj_7preshed_4maps_PreshMapArray;
struct __pyx_obj_5thinc_6linear_8features_ConjunctionExtracter;
struct __pyx_obj_5thinc_6linear_7avgtron_AveragedPerceptron;
struct __pyx_obj_5thinc_6linalg_Matrix;
struct __pyx_obj_5thinc_6linalg_Vec;
struct __pyx_obj_5thinc_6linalg_VecVec;
struct __pyx_obj_5thinc_6linalg_MatVec;
struct __pyx_obj_5thinc_6linalg_MatMat;
struct __pyx_obj_5thinc_5extra_2eg_Example;
struct __pyx_obj_5spacy_7strings_StringStore;
struct __pyx_obj_5spacy_10morphology_Morphology;
struct __pyx_obj_5spacy_5vocab_Vocab;
struct __pyx_obj_5spacy_6lexeme_Lexeme;
struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass;
struct __pyx_obj_5spacy_4gold_GoldParse;
struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem;
struct __pyx_obj_5spacy_6syntax_9arc_eager_ArcEager;
struct __pyx_obj_7preshed_7counter_PreshCounter;
struct __pyx_obj_5spacy_6tokens_3doc_Doc;
struct __pyx_obj_5spacy_6syntax_6parser_ParserModel;
struct __pyx_obj_5spacy_6syntax_6parser_Parser;
struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState;
struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe;
struct __pyx_t_7preshed_4maps_Cell;
struct __pyx_t_7preshed_4maps_MapStruct;

/* "preshed/maps.pxd":8
 * 
 * 
 * cdef struct Cell:             # <<<<<<<<<<<<<<
 *     key_t key
 *     void* value
 */
struct __pyx_t_7preshed_4maps_Cell {
  __pyx_t_7preshed_4maps_key_t key;
  void *value;
};

/* "preshed/maps.pxd":13
 * 
 * 
 * cdef struct MapStruct:             # <<<<<<<<<<<<<<
 *     Cell* cells
 *     void* value_for_empty_key
 */
struct __pyx_t_7preshed_4maps_MapStruct {
  struct __pyx_t_7preshed_4maps_Cell *cells;
  void *value_for_empty_key;
  void *value_for_del_key;
  __pyx_t_7preshed_4maps_key_t length;
  __pyx_t_7preshed_4maps_key_t filled;
  int is_empty_key_set;
  int is_del_key_set;
};
struct __pyx_t_5thinc_7structs_ConstantsC;
struct __pyx_t_5thinc_7structs_EmbedC;
struct __pyx_t_5thinc_7structs_NeuralNetC;
struct __pyx_t_5thinc_7structs_ExampleC;
struct __pyx_t_5thinc_7structs_SparseArrayC;
struct __pyx_t_5thinc_7structs_FeatureC;
struct __pyx_t_5thinc_7structs_SparseAverageC;
struct __pyx_t_5thinc_7structs_TemplateC;

/* "structs.pxd":10
 * 
 * 
 * ctypedef void (*do_update_t)(             # <<<<<<<<<<<<<<
 *     float* weights,
 *     float* momentum,
 */
typedef void (*__pyx_t_5thinc_7structs_do_update_t)(float *, float *, float *, __pyx_t_5thinc_8typedefs_len_t, struct __pyx_t_5thinc_7structs_ConstantsC const *);

/* "structs.pxd":19
 * 
 * 
 * ctypedef void (*do_feed_fwd_t)(             # <<<<<<<<<<<<<<
 *     float** fwd,
 *     float* averages,
 */
typedef void (*__pyx_t_5thinc_7structs_do_feed_fwd_t)(float **, float *, float const *, __pyx_t_5thinc_8typedefs_len_t const *, int, int, struct __pyx_t_5thinc_7structs_ConstantsC const *);

/* "structs.pxd":30
 * 
 * 
 * ctypedef void (*do_feed_bwd_t)(             # <<<<<<<<<<<<<<
 *     float* G,
 *     float** bwd,
 */
typedef void (*__pyx_t_5thinc_7structs_do_feed_bwd_t)(float *, float **, float *, float const *, float const *const *, __pyx_t_5thinc_8typedefs_len_t const *, int, int, struct __pyx_t_5thinc_7structs_ConstantsC const *);

/* "structs.pxd":44
 * 
 * # Alias this, so that it matches our naming scheme
 * ctypedef MapStruct MapC             # <<<<<<<<<<<<<<
 * 
 * 
 */
typedef struct __pyx_t_7preshed_4maps_MapStruct __pyx_t_5thinc_7structs_MapC;

/* "structs.pxd":47
 * 
 * 
 * cdef struct ConstantsC:             # <<<<<<<<<<<<<<
 *     float a
 *     float b
 */
struct __pyx_t_5thinc_7structs_ConstantsC {
  float a;
  float b;
  float c;
  float d;
  float e;
  float g;
  float h;
  float i;
  float j;
  float k;
  float l;
  float m;
  float n;
  float o;
  float p;
  float q;
  float r;
  float s;
  float t;
  float u;
  float w;
  float x;
  float y;
  float z;
};

/* "structs.pxd":74
 * 
 * 
 * cdef struct EmbedC:             # <<<<<<<<<<<<<<
 *     MapC** weights
 *     MapC** momentum
 */
struct __pyx_t_5thinc_7structs_EmbedC {
  __pyx_t_5thinc_7structs_MapC **weights;
  __pyx_t_5thinc_7structs_MapC **momentum;
  __pyx_t_5thinc_8typedefs_idx_t *offsets;
  __pyx_t_5thinc_8typedefs_len_t *lengths;
  __pyx_t_5thinc_8typedefs_len_t nr;
};

/* "structs.pxd":82
 * 
 * 
 * cdef struct NeuralNetC:             # <<<<<<<<<<<<<<
 *     do_feed_fwd_t feed_fwd
 *     do_feed_bwd_t feed_bwd
 */
struct __pyx_t_5thinc_7structs_NeuralNetC {
  __pyx_t_5thinc_7structs_do_feed_fwd_t feed_fwd;
  __pyx_t_5thinc_7structs_do_feed_bwd_t feed_bwd;
  __pyx_t_5thinc_7structs_do_update_t update;
  __pyx_t_5thinc_8typedefs_len_t *widths;
  float *weights;
  float *gradient;
  float *momentum;
  float **averages;
  struct __pyx_t_5thinc_7structs_EmbedC embed;
  __pyx_t_5thinc_8typedefs_len_t nr_layer;
  __pyx_t_5thinc_8typedefs_len_t nr_weight;
  __pyx_t_5thinc_8typedefs_len_t nr_node;
  struct __pyx_t_5thinc_7structs_ConstantsC hp;
};

/* "structs.pxd":103
 * 
 * 
 * cdef struct ExampleC:             # <<<<<<<<<<<<<<
 *     int* is_valid
 *     float* costs
 */
struct __pyx_t_5thinc_7structs_ExampleC {
  int *is_valid;
  float *costs;
  uint64_t *atoms;
  struct __pyx_t_5thinc_7structs_FeatureC *features;
  float *scores;
  float **fwd_state;
  float **bwd_state;
  int *widths;
  int nr_class;
  int nr_atom;
  int nr_feat;
  int nr_layer;
};

/* "structs.pxd":120
 * 
 * 
 * cdef packed struct SparseArrayC:             # <<<<<<<<<<<<<<
 *     int32_t key
 *     float val
 */
#if defined(__SUNPRO_C)
  #pragma pack(1)
#elif !defined(__GNUC__)
  #pragma pack(push, 1)
#endif
struct __Pyx_PACKED __pyx_t_5thinc_7structs_SparseArrayC {
  int32_t key;
  float val;
};
#if defined(__SUNPRO_C)
  #pragma pack()
#elif !defined(__GNUC__)
  #pragma pack(pop)
#endif

/* "structs.pxd":125
 * 
 * 
 * cdef struct FeatureC:             # <<<<<<<<<<<<<<
 *     int i
 *     uint64_t key
 */
struct __pyx_t_5thinc_7structs_FeatureC {
  int i;
  uint64_t key;
  float value;
};

/* "structs.pxd":131
 * 
 * 
 * cdef struct SparseAverageC:             # <<<<<<<<<<<<<<
 *     SparseArrayC* curr
 *     SparseArrayC* avgs
 */
struct __pyx_t_5thinc_7structs_SparseAverageC {
  struct __pyx_t_5thinc_7structs_SparseArrayC *curr;
  struct __pyx_t_5thinc_7structs_SparseArrayC *avgs;
  struct __pyx_t_5thinc_7structs_SparseArrayC *times;
};

/* "structs.pxd":137
 * 
 * 
 * cdef struct TemplateC:             # <<<<<<<<<<<<<<
 *     int[MAX_TEMPLATE_LEN] indices
 *     int length
 */
struct __pyx_t_5thinc_7structs_TemplateC {
  int indices[10];
  int length;
  __pyx_t_5thinc_8typedefs_atom_t atoms[10];
};

/* "typedefs.pxd":6
 * 
 * ctypedef uint64_t hash_t
 * ctypedef char* utf8_t             # <<<<<<<<<<<<<<
 * ctypedef int32_t attr_t
 * ctypedef uint64_t flags_t
 */
typedef char *__pyx_t_5spacy_8typedefs_utf8_t;

/* "symbols.pxd":1
 * cpdef enum symbol_t:             # <<<<<<<<<<<<<<
 *     NIL
 *     IS_ALPHA
 */
enum __pyx_t_5spacy_7symbols_symbol_t {
  __pyx_e_5spacy_7symbols_NIL,
  __pyx_e_5spacy_7symbols_IS_ALPHA,
  __pyx_e_5spacy_7symbols_IS_ASCII,
  __pyx_e_5spacy_7symbols_IS_DIGIT,
  __pyx_e_5spacy_7symbols_IS_LOWER,
  __pyx_e_5spacy_7symbols_IS_PUNCT,
  __pyx_e_5spacy_7symbols_IS_SPACE,
  __pyx_e_5spacy_7symbols_IS_TITLE,
  __pyx_e_5spacy_7symbols_IS_UPPER,
  __pyx_e_5spacy_7symbols_LIKE_URL,
  __pyx_e_5spacy_7symbols_LIKE_NUM,
  __pyx_e_5spacy_7symbols_LIKE_EMAIL,
  __pyx_e_5spacy_7symbols_IS_STOP,
  __pyx_e_5spacy_7symbols_IS_OOV,
  __pyx_e_5spacy_7symbols_FLAG14 = 14,
  __pyx_e_5spacy_7symbols_FLAG15,
  __pyx_e_5spacy_7symbols_FLAG16,
  __pyx_e_5spacy_7symbols_FLAG17,
  __pyx_e_5spacy_7symbols_FLAG18,
  __pyx_e_5spacy_7symbols_FLAG19,
  __pyx_e_5spacy_7symbols_FLAG20,
  __pyx_e_5spacy_7symbols_FLAG21,
  __pyx_e_5spacy_7symbols_FLAG22,
  __pyx_e_5spacy_7symbols_FLAG23,
  __pyx_e_5spacy_7symbols_FLAG24,
  __pyx_e_5spacy_7symbols_FLAG25,
  __pyx_e_5spacy_7symbols_FLAG26,
  __pyx_e_5spacy_7symbols_FLAG27,
  __pyx_e_5spacy_7symbols_FLAG28,
  __pyx_e_5spacy_7symbols_FLAG29,
  __pyx_e_5spacy_7symbols_FLAG30,
  __pyx_e_5spacy_7symbols_FLAG31,
  __pyx_e_5spacy_7symbols_FLAG32,
  __pyx_e_5spacy_7symbols_FLAG33,
  __pyx_e_5spacy_7symbols_FLAG34,
  __pyx_e_5spacy_7symbols_FLAG35,
  __pyx_e_5spacy_7symbols_FLAG36,
  __pyx_e_5spacy_7symbols_FLAG37,
  __pyx_e_5spacy_7symbols_FLAG38,
  __pyx_e_5spacy_7symbols_FLAG39,
  __pyx_e_5spacy_7symbols_FLAG40,
  __pyx_e_5spacy_7symbols_FLAG41,
  __pyx_e_5spacy_7symbols_FLAG42,
  __pyx_e_5spacy_7symbols_FLAG43,
  __pyx_e_5spacy_7symbols_FLAG44,
  __pyx_e_5spacy_7symbols_FLAG45,
  __pyx_e_5spacy_7symbols_FLAG46,
  __pyx_e_5spacy_7symbols_FLAG47,
  __pyx_e_5spacy_7symbols_FLAG48,
  __pyx_e_5spacy_7symbols_FLAG49,
  __pyx_e_5spacy_7symbols_FLAG50,
  __pyx_e_5spacy_7symbols_FLAG51,
  __pyx_e_5spacy_7symbols_FLAG52,
  __pyx_e_5spacy_7symbols_FLAG53,
  __pyx_e_5spacy_7symbols_FLAG54,
  __pyx_e_5spacy_7symbols_FLAG55,
  __pyx_e_5spacy_7symbols_FLAG56,
  __pyx_e_5spacy_7symbols_FLAG57,
  __pyx_e_5spacy_7symbols_FLAG58,
  __pyx_e_5spacy_7symbols_FLAG59,
  __pyx_e_5spacy_7symbols_FLAG60,
  __pyx_e_5spacy_7symbols_FLAG61,
  __pyx_e_5spacy_7symbols_FLAG62,
  __pyx_e_5spacy_7symbols_FLAG63,
  __pyx_e_5spacy_7symbols_ID,
  __pyx_e_5spacy_7symbols_ORTH,
  __pyx_e_5spacy_7symbols_LOWER,
  __pyx_e_5spacy_7symbols_NORM,
  __pyx_e_5spacy_7symbols_SHAPE,
  __pyx_e_5spacy_7symbols_PREFIX,
  __pyx_e_5spacy_7symbols_SUFFIX,
  __pyx_e_5spacy_7symbols_LENGTH,
  __pyx_e_5spacy_7symbols_CLUSTER,
  __pyx_e_5spacy_7symbols_LEMMA,
  __pyx_e_5spacy_7symbols_POS,
  __pyx_e_5spacy_7symbols_TAG,
  __pyx_e_5spacy_7symbols_DEP,
  __pyx_e_5spacy_7symbols_ENT_IOB,
  __pyx_e_5spacy_7symbols_ENT_TYPE,
  __pyx_e_5spacy_7symbols_HEAD,
  __pyx_e_5spacy_7symbols_SPACY,
  __pyx_e_5spacy_7symbols_PROB,
  __pyx_e_5spacy_7symbols_ADJ,
  __pyx_e_5spacy_7symbols_ADP,
  __pyx_e_5spacy_7symbols_ADV,
  __pyx_e_5spacy_7symbols_AUX,
  __pyx_e_5spacy_7symbols_CONJ,
  __pyx_e_5spacy_7symbols_DET,
  __pyx_e_5spacy_7symbols_INTJ,
  __pyx_e_5spacy_7symbols_NOUN,
  __pyx_e_5spacy_7symbols_NUM,
  __pyx_e_5spacy_7symbols_PART,
  __pyx_e_5spacy_7symbols_PRON,
  __pyx_e_5spacy_7symbols_PROPN,
  __pyx_e_5spacy_7symbols_PUNCT,
  __pyx_e_5spacy_7symbols_SCONJ,
  __pyx_e_5spacy_7symbols_SYM,
  __pyx_e_5spacy_7symbols_VERB,
  __pyx_e_5spacy_7symbols_X,
  __pyx_e_5spacy_7symbols_EOL,
  __pyx_e_5spacy_7symbols_SPACE,
  __pyx_e_5spacy_7symbols_Animacy_anim,
  __pyx_e_5spacy_7symbols_Animacy_inam,
  __pyx_e_5spacy_7symbols_Aspect_freq,
  __pyx_e_5spacy_7symbols_Aspect_imp,
  __pyx_e_5spacy_7symbols_Aspect_mod,
  __pyx_e_5spacy_7symbols_Aspect_none,
  __pyx_e_5spacy_7symbols_Aspect_perf,
  __pyx_e_5spacy_7symbols_Case_abe,
  __pyx_e_5spacy_7symbols_Case_abl,
  __pyx_e_5spacy_7symbols_Case_abs,
  __pyx_e_5spacy_7symbols_Case_acc,
  __pyx_e_5spacy_7symbols_Case_ade,
  __pyx_e_5spacy_7symbols_Case_all,
  __pyx_e_5spacy_7symbols_Case_cau,
  __pyx_e_5spacy_7symbols_Case_com,
  __pyx_e_5spacy_7symbols_Case_dat,
  __pyx_e_5spacy_7symbols_Case_del,
  __pyx_e_5spacy_7symbols_Case_dis,
  __pyx_e_5spacy_7symbols_Case_ela,
  __pyx_e_5spacy_7symbols_Case_ess,
  __pyx_e_5spacy_7symbols_Case_gen,
  __pyx_e_5spacy_7symbols_Case_ill,
  __pyx_e_5spacy_7symbols_Case_ine,
  __pyx_e_5spacy_7symbols_Case_ins,
  __pyx_e_5spacy_7symbols_Case_loc,
  __pyx_e_5spacy_7symbols_Case_lat,
  __pyx_e_5spacy_7symbols_Case_nom,
  __pyx_e_5spacy_7symbols_Case_par,
  __pyx_e_5spacy_7symbols_Case_sub,
  __pyx_e_5spacy_7symbols_Case_sup,
  __pyx_e_5spacy_7symbols_Case_tem,
  __pyx_e_5spacy_7symbols_Case_ter,
  __pyx_e_5spacy_7symbols_Case_tra,
  __pyx_e_5spacy_7symbols_Case_voc,
  __pyx_e_5spacy_7symbols_Definite_two,
  __pyx_e_5spacy_7symbols_Definite_def,
  __pyx_e_5spacy_7symbols_Definite_red,
  __pyx_e_5spacy_7symbols_Definite_ind,
  __pyx_e_5spacy_7symbols_Degree_cmp,
  __pyx_e_5spacy_7symbols_Degree_comp,
  __pyx_e_5spacy_7symbols_Degree_none,
  __pyx_e_5spacy_7symbols_Degree_pos,
  __pyx_e_5spacy_7symbols_Degree_sup,
  __pyx_e_5spacy_7symbols_Degree_abs,
  __pyx_e_5spacy_7symbols_Degree_com,
  __pyx_e_5spacy_7symbols_Degree_dim,
  __pyx_e_5spacy_7symbols_Gender_com,
  __pyx_e_5spacy_7symbols_Gender_fem,
  __pyx_e_5spacy_7symbols_Gender_masc,
  __pyx_e_5spacy_7symbols_Gender_neut,
  __pyx_e_5spacy_7symbols_Mood_cnd,
  __pyx_e_5spacy_7symbols_Mood_imp,
  __pyx_e_5spacy_7symbols_Mood_ind,
  __pyx_e_5spacy_7symbols_Mood_n,
  __pyx_e_5spacy_7symbols_Mood_pot,
  __pyx_e_5spacy_7symbols_Mood_sub,
  __pyx_e_5spacy_7symbols_Mood_opt,
  __pyx_e_5spacy_7symbols_Negative_neg,
  __pyx_e_5spacy_7symbols_Negative_pos,
  __pyx_e_5spacy_7symbols_Negative_yes,
  __pyx_e_5spacy_7symbols_Number_com,
  __pyx_e_5spacy_7symbols_Number_dual,
  __pyx_e_5spacy_7symbols_Number_none,
  __pyx_e_5spacy_7symbols_Number_plur,
  __pyx_e_5spacy_7symbols_Number_sing,
  __pyx_e_5spacy_7symbols_Number_ptan,
  __pyx_e_5spacy_7symbols_Number_count,
  __pyx_e_5spacy_7symbols_NumType_card,
  __pyx_e_5spacy_7symbols_NumType_dist,
  __pyx_e_5spacy_7symbols_NumType_frac,
  __pyx_e_5spacy_7symbols_NumType_gen,
  __pyx_e_5spacy_7symbols_NumType_mult,
  __pyx_e_5spacy_7symbols_NumType_none,
  __pyx_e_5spacy_7symbols_NumType_ord,
  __pyx_e_5spacy_7symbols_NumType_sets,
  __pyx_e_5spacy_7symbols_Person_one,
  __pyx_e_5spacy_7symbols_Person_two,
  __pyx_e_5spacy_7symbols_Person_three,
  __pyx_e_5spacy_7symbols_Person_none,
  __pyx_e_5spacy_7symbols_Poss_yes,
  __pyx_e_5spacy_7symbols_PronType_advPart,
  __pyx_e_5spacy_7symbols_PronType_art,
  __pyx_e_5spacy_7symbols_PronType_default,
  __pyx_e_5spacy_7symbols_PronType_dem,
  __pyx_e_5spacy_7symbols_PronType_ind,
  __pyx_e_5spacy_7symbols_PronType_int,
  __pyx_e_5spacy_7symbols_PronType_neg,
  __pyx_e_5spacy_7symbols_PronType_prs,
  __pyx_e_5spacy_7symbols_PronType_rcp,
  __pyx_e_5spacy_7symbols_PronType_rel,
  __pyx_e_5spacy_7symbols_PronType_tot,
  __pyx_e_5spacy_7symbols_PronType_clit,
  __pyx_e_5spacy_7symbols_PronType_exc,
  __pyx_e_5spacy_7symbols_Reflex_yes,
  __pyx_e_5spacy_7symbols_Tense_fut,
  __pyx_e_5spacy_7symbols_Tense_imp,
  __pyx_e_5spacy_7symbols_Tense_past,
  __pyx_e_5spacy_7symbols_Tense_pres,
  __pyx_e_5spacy_7symbols_VerbForm_fin,
  __pyx_e_5spacy_7symbols_VerbForm_ger,
  __pyx_e_5spacy_7symbols_VerbForm_inf,
  __pyx_e_5spacy_7symbols_VerbForm_none,
  __pyx_e_5spacy_7symbols_VerbForm_part,
  __pyx_e_5spacy_7symbols_VerbForm_partFut,
  __pyx_e_5spacy_7symbols_VerbForm_partPast,
  __pyx_e_5spacy_7symbols_VerbForm_partPres,
  __pyx_e_5spacy_7symbols_VerbForm_sup,
  __pyx_e_5spacy_7symbols_VerbForm_trans,
  __pyx_e_5spacy_7symbols_VerbForm_gdv,
  __pyx_e_5spacy_7symbols_Voice_act,
  __pyx_e_5spacy_7symbols_Voice_cau,
  __pyx_e_5spacy_7symbols_Voice_pass,
  __pyx_e_5spacy_7symbols_Voice_mid,
  __pyx_e_5spacy_7symbols_Voice_int,
  __pyx_e_5spacy_7symbols_Abbr_yes,
  __pyx_e_5spacy_7symbols_AdpType_prep,
  __pyx_e_5spacy_7symbols_AdpType_post,
  __pyx_e_5spacy_7symbols_AdpType_voc,
  __pyx_e_5spacy_7symbols_AdpType_comprep,
  __pyx_e_5spacy_7symbols_AdpType_circ,
  __pyx_e_5spacy_7symbols_AdvType_man,
  __pyx_e_5spacy_7symbols_AdvType_loc,
  __pyx_e_5spacy_7symbols_AdvType_tim,
  __pyx_e_5spacy_7symbols_AdvType_deg,
  __pyx_e_5spacy_7symbols_AdvType_cau,
  __pyx_e_5spacy_7symbols_AdvType_mod,
  __pyx_e_5spacy_7symbols_AdvType_sta,
  __pyx_e_5spacy_7symbols_AdvType_ex,
  __pyx_e_5spacy_7symbols_AdvType_adadj,
  __pyx_e_5spacy_7symbols_ConjType_oper,
  __pyx_e_5spacy_7symbols_ConjType_comp,
  __pyx_e_5spacy_7symbols_Connegative_yes,
  __pyx_e_5spacy_7symbols_Derivation_minen,
  __pyx_e_5spacy_7symbols_Derivation_sti,
  __pyx_e_5spacy_7symbols_Derivation_inen,
  __pyx_e_5spacy_7symbols_Derivation_lainen,
  __pyx_e_5spacy_7symbols_Derivation_ja,
  __pyx_e_5spacy_7symbols_Derivation_ton,
  __pyx_e_5spacy_7symbols_Derivation_vs,
  __pyx_e_5spacy_7symbols_Derivation_ttain,
  __pyx_e_5spacy_7symbols_Derivation_ttaa,
  __pyx_e_5spacy_7symbols_Echo_rdp,
  __pyx_e_5spacy_7symbols_Echo_ech,
  __pyx_e_5spacy_7symbols_Foreign_foreign,
  __pyx_e_5spacy_7symbols_Foreign_fscript,
  __pyx_e_5spacy_7symbols_Foreign_tscript,
  __pyx_e_5spacy_7symbols_Foreign_yes,
  __pyx_e_5spacy_7symbols_Gender_dat_masc,
  __pyx_e_5spacy_7symbols_Gender_dat_fem,
  __pyx_e_5spacy_7symbols_Gender_erg_masc,
  __pyx_e_5spacy_7symbols_Gender_erg_fem,
  __pyx_e_5spacy_7symbols_Gender_psor_masc,
  __pyx_e_5spacy_7symbols_Gender_psor_fem,
  __pyx_e_5spacy_7symbols_Gender_psor_neut,
  __pyx_e_5spacy_7symbols_Hyph_yes,
  __pyx_e_5spacy_7symbols_InfForm_one,
  __pyx_e_5spacy_7symbols_InfForm_two,
  __pyx_e_5spacy_7symbols_InfForm_three,
  __pyx_e_5spacy_7symbols_NameType_geo,
  __pyx_e_5spacy_7symbols_NameType_prs,
  __pyx_e_5spacy_7symbols_NameType_giv,
  __pyx_e_5spacy_7symbols_NameType_sur,
  __pyx_e_5spacy_7symbols_NameType_nat,
  __pyx_e_5spacy_7symbols_NameType_com,
  __pyx_e_5spacy_7symbols_NameType_pro,
  __pyx_e_5spacy_7symbols_NameType_oth,
  __pyx_e_5spacy_7symbols_NounType_com,
  __pyx_e_5spacy_7symbols_NounType_prop,
  __pyx_e_5spacy_7symbols_NounType_class,
  __pyx_e_5spacy_7symbols_Number_abs_sing,
  __pyx_e_5spacy_7symbols_Number_abs_plur,
  __pyx_e_5spacy_7symbols_Number_dat_sing,
  __pyx_e_5spacy_7symbols_Number_dat_plur,
  __pyx_e_5spacy_7symbols_Number_erg_sing,
  __pyx_e_5spacy_7symbols_Number_erg_plur,
  __pyx_e_5spacy_7symbols_Number_psee_sing,
  __pyx_e_5spacy_7symbols_Number_psee_plur,
  __pyx_e_5spacy_7symbols_Number_psor_sing,
  __pyx_e_5spacy_7symbols_Number_psor_plur,
  __pyx_e_5spacy_7symbols_NumForm_digit,
  __pyx_e_5spacy_7symbols_NumForm_roman,
  __pyx_e_5spacy_7symbols_NumForm_word,
  __pyx_e_5spacy_7symbols_NumValue_one,
  __pyx_e_5spacy_7symbols_NumValue_two,
  __pyx_e_5spacy_7symbols_NumValue_three,
  __pyx_e_5spacy_7symbols_PartForm_pres,
  __pyx_e_5spacy_7symbols_PartForm_past,
  __pyx_e_5spacy_7symbols_PartForm_agt,
  __pyx_e_5spacy_7symbols_PartForm_neg,
  __pyx_e_5spacy_7symbols_PartType_mod,
  __pyx_e_5spacy_7symbols_PartType_emp,
  __pyx_e_5spacy_7symbols_PartType_res,
  __pyx_e_5spacy_7symbols_PartType_inf,
  __pyx_e_5spacy_7symbols_PartType_vbp,
  __pyx_e_5spacy_7symbols_Person_abs_one,
  __pyx_e_5spacy_7symbols_Person_abs_two,
  __pyx_e_5spacy_7symbols_Person_abs_three,
  __pyx_e_5spacy_7symbols_Person_dat_one,
  __pyx_e_5spacy_7symbols_Person_dat_two,
  __pyx_e_5spacy_7symbols_Person_dat_three,
  __pyx_e_5spacy_7symbols_Person_erg_one,
  __pyx_e_5spacy_7symbols_Person_erg_two,
  __pyx_e_5spacy_7symbols_Person_erg_three,
  __pyx_e_5spacy_7symbols_Person_psor_one,
  __pyx_e_5spacy_7symbols_Person_psor_two,
  __pyx_e_5spacy_7symbols_Person_psor_three,
  __pyx_e_5spacy_7symbols_Polite_inf,
  __pyx_e_5spacy_7symbols_Polite_pol,
  __pyx_e_5spacy_7symbols_Polite_abs_inf,
  __pyx_e_5spacy_7symbols_Polite_abs_pol,
  __pyx_e_5spacy_7symbols_Polite_erg_inf,
  __pyx_e_5spacy_7symbols_Polite_erg_pol,
  __pyx_e_5spacy_7symbols_Polite_dat_inf,
  __pyx_e_5spacy_7symbols_Polite_dat_pol,
  __pyx_e_5spacy_7symbols_Prefix_yes,
  __pyx_e_5spacy_7symbols_PrepCase_npr,
  __pyx_e_5spacy_7symbols_PrepCase_pre,
  __pyx_e_5spacy_7symbols_PunctSide_ini,
  __pyx_e_5spacy_7symbols_PunctSide_fin,
  __pyx_e_5spacy_7symbols_PunctType_peri,
  __pyx_e_5spacy_7symbols_PunctType_qest,
  __pyx_e_5spacy_7symbols_PunctType_excl,
  __pyx_e_5spacy_7symbols_PunctType_quot,
  __pyx_e_5spacy_7symbols_PunctType_brck,
  __pyx_e_5spacy_7symbols_PunctType_comm,
  __pyx_e_5spacy_7symbols_PunctType_colo,
  __pyx_e_5spacy_7symbols_PunctType_semi,
  __pyx_e_5spacy_7symbols_PunctType_dash,
  __pyx_e_5spacy_7symbols_Style_arch,
  __pyx_e_5spacy_7symbols_Style_rare,
  __pyx_e_5spacy_7symbols_Style_poet,
  __pyx_e_5spacy_7symbols_Style_norm,
  __pyx_e_5spacy_7symbols_Style_coll,
  __pyx_e_5spacy_7symbols_Style_vrnc,
  __pyx_e_5spacy_7symbols_Style_sing,
  __pyx_e_5spacy_7symbols_Style_expr,
  __pyx_e_5spacy_7symbols_Style_derg,
  __pyx_e_5spacy_7symbols_Style_vulg,
  __pyx_e_5spacy_7symbols_Style_yes,
  __pyx_e_5spacy_7symbols_StyleVariant_styleShort,
  __pyx_e_5spacy_7symbols_StyleVariant_styleBound,
  __pyx_e_5spacy_7symbols_VerbType_aux,
  __pyx_e_5spacy_7symbols_VerbType_cop,
  __pyx_e_5spacy_7symbols_VerbType_mod,
  __pyx_e_5spacy_7symbols_VerbType_light,
  __pyx_e_5spacy_7symbols_PERSON,
  __pyx_e_5spacy_7symbols_NORP,
  __pyx_e_5spacy_7symbols_FACILITY,
  __pyx_e_5spacy_7symbols_ORG,
  __pyx_e_5spacy_7symbols_GPE,
  __pyx_e_5spacy_7symbols_LOC,
  __pyx_e_5spacy_7symbols_PRODUCT,
  __pyx_e_5spacy_7symbols_EVENT,
  __pyx_e_5spacy_7symbols_WORK_OF_ART,
  __pyx_e_5spacy_7symbols_LANGUAGE,
  __pyx_e_5spacy_7symbols_DATE,
  __pyx_e_5spacy_7symbols_TIME,
  __pyx_e_5spacy_7symbols_PERCENT,
  __pyx_e_5spacy_7symbols_MONEY,
  __pyx_e_5spacy_7symbols_QUANTITY,
  __pyx_e_5spacy_7symbols_ORDINAL,
  __pyx_e_5spacy_7symbols_CARDINAL,
  __pyx_e_5spacy_7symbols_acomp,
  __pyx_e_5spacy_7symbols_advcl,
  __pyx_e_5spacy_7symbols_advmod,
  __pyx_e_5spacy_7symbols_agent,
  __pyx_e_5spacy_7symbols_amod,
  __pyx_e_5spacy_7symbols_appos,
  __pyx_e_5spacy_7symbols_attr,
  __pyx_e_5spacy_7symbols_aux,
  __pyx_e_5spacy_7symbols_auxpass,
  __pyx_e_5spacy_7symbols_cc,
  __pyx_e_5spacy_7symbols_ccomp,
  __pyx_e_5spacy_7symbols_complm,
  __pyx_e_5spacy_7symbols_conj,
  __pyx_e_5spacy_7symbols_csubj,
  __pyx_e_5spacy_7symbols_csubjpass,
  __pyx_e_5spacy_7symbols_dep,
  __pyx_e_5spacy_7symbols_det,
  __pyx_e_5spacy_7symbols_dobj,
  __pyx_e_5spacy_7symbols_expl,
  __pyx_e_5spacy_7symbols_hmod,
  __pyx_e_5spacy_7symbols_hyph,
  __pyx_e_5spacy_7symbols_infmod,
  __pyx_e_5spacy_7symbols_intj,
  __pyx_e_5spacy_7symbols_iobj,
  __pyx_e_5spacy_7symbols_mark,
  __pyx_e_5spacy_7symbols_meta,
  __pyx_e_5spacy_7symbols_neg,
  __pyx_e_5spacy_7symbols_nmod,
  __pyx_e_5spacy_7symbols_nn,
  __pyx_e_5spacy_7symbols_npadvmod,
  __pyx_e_5spacy_7symbols_nsubj,
  __pyx_e_5spacy_7symbols_nsubjpass,
  __pyx_e_5spacy_7symbols_num,
  __pyx_e_5spacy_7symbols_number,
  __pyx_e_5spacy_7symbols_oprd,
  __pyx_e_5spacy_7symbols_parataxis,
  __pyx_e_5spacy_7symbols_partmod,
  __pyx_e_5spacy_7symbols_pcomp,
  __pyx_e_5spacy_7symbols_pobj,
  __pyx_e_5spacy_7symbols_poss,
  __pyx_e_5spacy_7symbols_possessive,
  __pyx_e_5spacy_7symbols_preconj,
  __pyx_e_5spacy_7symbols_prep,
  __pyx_e_5spacy_7symbols_prt,
  __pyx_e_5spacy_7symbols_punct,
  __pyx_e_5spacy_7symbols_quantmod,
  __pyx_e_5spacy_7symbols_rcmod,
  __pyx_e_5spacy_7symbols_root,
  __pyx_e_5spacy_7symbols_xcomp
};

/* "parts_of_speech.pxd":3
 * from . cimport symbols
 * 
 * cpdef enum univ_pos_t:             # <<<<<<<<<<<<<<
 *     NO_TAG = 0
 *     ADJ = symbols.ADJ
 */
enum __pyx_t_5spacy_15parts_of_speech_univ_pos_t {

  /* "parts_of_speech.pxd":5
 * cpdef enum univ_pos_t:
 *     NO_TAG = 0
 *     ADJ = symbols.ADJ             # <<<<<<<<<<<<<<
 *     ADP
 *     ADV
 */
  __pyx_e_5spacy_15parts_of_speech_NO_TAG = 0,
  __pyx_e_5spacy_15parts_of_speech_ADJ = __pyx_e_5spacy_7symbols_ADJ,
  __pyx_e_5spacy_15parts_of_speech_ADP,
  __pyx_e_5spacy_15parts_of_speech_ADV,
  __pyx_e_5spacy_15parts_of_speech_AUX,
  __pyx_e_5spacy_15parts_of_speech_CONJ,
  __pyx_e_5spacy_15parts_of_speech_DET,
  __pyx_e_5spacy_15parts_of_speech_INTJ,
  __pyx_e_5spacy_15parts_of_speech_NOUN,
  __pyx_e_5spacy_15parts_of_speech_NUM,
  __pyx_e_5spacy_15parts_of_speech_PART,
  __pyx_e_5spacy_15parts_of_speech_PRON,
  __pyx_e_5spacy_15parts_of_speech_PROPN,
  __pyx_e_5spacy_15parts_of_speech_PUNCT,
  __pyx_e_5spacy_15parts_of_speech_SCONJ,
  __pyx_e_5spacy_15parts_of_speech_SYM,
  __pyx_e_5spacy_15parts_of_speech_VERB,
  __pyx_e_5spacy_15parts_of_speech_X,
  __pyx_e_5spacy_15parts_of_speech_EOL,
  __pyx_e_5spacy_15parts_of_speech_SPACE
};
struct __pyx_t_5spacy_7structs_LexemeC;
struct __pyx_t_5spacy_7structs_Entity;
struct __pyx_t_5spacy_7structs_TokenC;

/* "structs.pxd":7
 * 
 * 
 * cdef struct LexemeC:             # <<<<<<<<<<<<<<
 *     float* vector
 * 
 */
struct __pyx_t_5spacy_7structs_LexemeC {
  float *vector;
  __pyx_t_5spacy_8typedefs_flags_t flags;
  __pyx_t_5spacy_8typedefs_attr_t lang;
  __pyx_t_5spacy_8typedefs_attr_t id;
  __pyx_t_5spacy_8typedefs_attr_t length;
  __pyx_t_5spacy_8typedefs_attr_t orth;
  __pyx_t_5spacy_8typedefs_attr_t lower;
  __pyx_t_5spacy_8typedefs_attr_t norm;
  __pyx_t_5spacy_8typedefs_attr_t shape;
  __pyx_t_5spacy_8typedefs_attr_t prefix;
  __pyx_t_5spacy_8typedefs_attr_t suffix;
  __pyx_t_5spacy_8typedefs_attr_t cluster;
  float prob;
  float sentiment;
  float l2_norm;
};

/* "structs.pxd":31
 * 
 * 
 * cdef struct Entity:             # <<<<<<<<<<<<<<
 *     hash_t id
 *     int start
 */
struct __pyx_t_5spacy_7structs_Entity {
  __pyx_t_5spacy_8typedefs_hash_t id;
  int start;
  int end;
  int label;
};

/* "structs.pxd":38
 * 
 * 
 * cdef struct TokenC:             # <<<<<<<<<<<<<<
 *     const LexemeC* lex
 *     uint64_t morph
 */
struct __pyx_t_5spacy_7structs_TokenC {
  struct __pyx_t_5spacy_7structs_LexemeC const *lex;
  uint64_t morph;
  enum __pyx_t_5spacy_15parts_of_speech_univ_pos_t pos;
  int spacy;
  int tag;
  int idx;
  int lemma;
  int sense;
  int head;
  int dep;
  int sent_start;
  uint32_t l_kids;
  uint32_t r_kids;
  uint32_t l_edge;
  uint32_t r_edge;
  int ent_iob;
  int ent_type;
  __pyx_t_5spacy_8typedefs_hash_t ent_id;
};
union __pyx_t_5spacy_7strings_Utf8Str;
typedef union __pyx_t_5spacy_7strings_Utf8Str __pyx_t_5spacy_7strings_Utf8Str;

/* "strings.pxd":13
 * 
 * 
 * ctypedef union Utf8Str:             # <<<<<<<<<<<<<<
 *     unsigned char[8] s
 *     unsigned char* p
 */
union __pyx_t_5spacy_7strings_Utf8Str {
  unsigned char s[8];
  unsigned char *p;
};
struct __pyx_t_5spacy_10morphology_RichTagC;
struct __pyx_t_5spacy_10morphology_MorphAnalysisC;

/* "morphology.pxd":41
 * 
 * 
 * cpdef enum univ_morph_t:             # <<<<<<<<<<<<<<
 *     NIL = 0
 *     Animacy_anim = symbols.Animacy_anim
 */
enum __pyx_t_5spacy_10morphology_univ_morph_t {

  /* "morphology.pxd":43
 * cpdef enum univ_morph_t:
 *     NIL = 0
 *     Animacy_anim = symbols.Animacy_anim             # <<<<<<<<<<<<<<
 *     Animacy_inam
 *     Aspect_freq
 */
  __pyx_e_5spacy_10morphology_NIL = 0,
  __pyx_e_5spacy_10morphology_Animacy_anim = __pyx_e_5spacy_7symbols_Animacy_anim,
  __pyx_e_5spacy_10morphology_Animacy_inam,
  __pyx_e_5spacy_10morphology_Aspect_freq,
  __pyx_e_5spacy_10morphology_Aspect_imp,
  __pyx_e_5spacy_10morphology_Aspect_mod,
  __pyx_e_5spacy_10morphology_Aspect_none,
  __pyx_e_5spacy_10morphology_Aspect_perf,
  __pyx_e_5spacy_10morphology_Case_abe,
  __pyx_e_5spacy_10morphology_Case_abl,
  __pyx_e_5spacy_10morphology_Case_abs,
  __pyx_e_5spacy_10morphology_Case_acc,
  __pyx_e_5spacy_10morphology_Case_ade,
  __pyx_e_5spacy_10morphology_Case_all,
  __pyx_e_5spacy_10morphology_Case_cau,
  __pyx_e_5spacy_10morphology_Case_com,
  __pyx_e_5spacy_10morphology_Case_dat,
  __pyx_e_5spacy_10morphology_Case_del,
  __pyx_e_5spacy_10morphology_Case_dis,
  __pyx_e_5spacy_10morphology_Case_ela,
  __pyx_e_5spacy_10morphology_Case_ess,
  __pyx_e_5spacy_10morphology_Case_gen,
  __pyx_e_5spacy_10morphology_Case_ill,
  __pyx_e_5spacy_10morphology_Case_ine,
  __pyx_e_5spacy_10morphology_Case_ins,
  __pyx_e_5spacy_10morphology_Case_loc,
  __pyx_e_5spacy_10morphology_Case_lat,
  __pyx_e_5spacy_10morphology_Case_nom,
  __pyx_e_5spacy_10morphology_Case_par,
  __pyx_e_5spacy_10morphology_Case_sub,
  __pyx_e_5spacy_10morphology_Case_sup,
  __pyx_e_5spacy_10morphology_Case_tem,
  __pyx_e_5spacy_10morphology_Case_ter,
  __pyx_e_5spacy_10morphology_Case_tra,
  __pyx_e_5spacy_10morphology_Case_voc,
  __pyx_e_5spacy_10morphology_Definite_two,
  __pyx_e_5spacy_10morphology_Definite_def,
  __pyx_e_5spacy_10morphology_Definite_red,
  __pyx_e_5spacy_10morphology_Definite_ind,
  __pyx_e_5spacy_10morphology_Degree_cmp,
  __pyx_e_5spacy_10morphology_Degree_comp,
  __pyx_e_5spacy_10morphology_Degree_none,
  __pyx_e_5spacy_10morphology_Degree_pos,
  __pyx_e_5spacy_10morphology_Degree_sup,
  __pyx_e_5spacy_10morphology_Degree_abs,
  __pyx_e_5spacy_10morphology_Degree_com,
  __pyx_e_5spacy_10morphology_Degree_dim,
  __pyx_e_5spacy_10morphology_Gender_com,
  __pyx_e_5spacy_10morphology_Gender_fem,
  __pyx_e_5spacy_10morphology_Gender_masc,
  __pyx_e_5spacy_10morphology_Gender_neut,
  __pyx_e_5spacy_10morphology_Mood_cnd,
  __pyx_e_5spacy_10morphology_Mood_imp,
  __pyx_e_5spacy_10morphology_Mood_ind,
  __pyx_e_5spacy_10morphology_Mood_n,
  __pyx_e_5spacy_10morphology_Mood_pot,
  __pyx_e_5spacy_10morphology_Mood_sub,
  __pyx_e_5spacy_10morphology_Mood_opt,
  __pyx_e_5spacy_10morphology_Negative_neg,
  __pyx_e_5spacy_10morphology_Negative_pos,
  __pyx_e_5spacy_10morphology_Negative_yes,
  __pyx_e_5spacy_10morphology_Number_com,
  __pyx_e_5spacy_10morphology_Number_dual,
  __pyx_e_5spacy_10morphology_Number_none,
  __pyx_e_5spacy_10morphology_Number_plur,
  __pyx_e_5spacy_10morphology_Number_sing,
  __pyx_e_5spacy_10morphology_Number_ptan,
  __pyx_e_5spacy_10morphology_Number_count,
  __pyx_e_5spacy_10morphology_NumType_card,
  __pyx_e_5spacy_10morphology_NumType_dist,
  __pyx_e_5spacy_10morphology_NumType_frac,
  __pyx_e_5spacy_10morphology_NumType_gen,
  __pyx_e_5spacy_10morphology_NumType_mult,
  __pyx_e_5spacy_10morphology_NumType_none,
  __pyx_e_5spacy_10morphology_NumType_ord,
  __pyx_e_5spacy_10morphology_NumType_sets,
  __pyx_e_5spacy_10morphology_Person_one,
  __pyx_e_5spacy_10morphology_Person_two,
  __pyx_e_5spacy_10morphology_Person_three,
  __pyx_e_5spacy_10morphology_Person_none,
  __pyx_e_5spacy_10morphology_Poss_yes,
  __pyx_e_5spacy_10morphology_PronType_advPart,
  __pyx_e_5spacy_10morphology_PronType_art,
  __pyx_e_5spacy_10morphology_PronType_default,
  __pyx_e_5spacy_10morphology_PronType_dem,
  __pyx_e_5spacy_10morphology_PronType_ind,
  __pyx_e_5spacy_10morphology_PronType_int,
  __pyx_e_5spacy_10morphology_PronType_neg,
  __pyx_e_5spacy_10morphology_PronType_prs,
  __pyx_e_5spacy_10morphology_PronType_rcp,
  __pyx_e_5spacy_10morphology_PronType_rel,
  __pyx_e_5spacy_10morphology_PronType_tot,
  __pyx_e_5spacy_10morphology_PronType_clit,
  __pyx_e_5spacy_10morphology_PronType_exc,
  __pyx_e_5spacy_10morphology_Reflex_yes,
  __pyx_e_5spacy_10morphology_Tense_fut,
  __pyx_e_5spacy_10morphology_Tense_imp,
  __pyx_e_5spacy_10morphology_Tense_past,
  __pyx_e_5spacy_10morphology_Tense_pres,
  __pyx_e_5spacy_10morphology_VerbForm_fin,
  __pyx_e_5spacy_10morphology_VerbForm_ger,
  __pyx_e_5spacy_10morphology_VerbForm_inf,
  __pyx_e_5spacy_10morphology_VerbForm_none,
  __pyx_e_5spacy_10morphology_VerbForm_part,
  __pyx_e_5spacy_10morphology_VerbForm_partFut,
  __pyx_e_5spacy_10morphology_VerbForm_partPast,
  __pyx_e_5spacy_10morphology_VerbForm_partPres,
  __pyx_e_5spacy_10morphology_VerbForm_sup,
  __pyx_e_5spacy_10morphology_VerbForm_trans,
  __pyx_e_5spacy_10morphology_VerbForm_gdv,
  __pyx_e_5spacy_10morphology_Voice_act,
  __pyx_e_5spacy_10morphology_Voice_cau,
  __pyx_e_5spacy_10morphology_Voice_pass,
  __pyx_e_5spacy_10morphology_Voice_mid,
  __pyx_e_5spacy_10morphology_Voice_int,
  __pyx_e_5spacy_10morphology_Abbr_yes,
  __pyx_e_5spacy_10morphology_AdpType_prep,
  __pyx_e_5spacy_10morphology_AdpType_post,
  __pyx_e_5spacy_10morphology_AdpType_voc,
  __pyx_e_5spacy_10morphology_AdpType_comprep,
  __pyx_e_5spacy_10morphology_AdpType_circ,
  __pyx_e_5spacy_10morphology_AdvType_man,
  __pyx_e_5spacy_10morphology_AdvType_loc,
  __pyx_e_5spacy_10morphology_AdvType_tim,
  __pyx_e_5spacy_10morphology_AdvType_deg,
  __pyx_e_5spacy_10morphology_AdvType_cau,
  __pyx_e_5spacy_10morphology_AdvType_mod,
  __pyx_e_5spacy_10morphology_AdvType_sta,
  __pyx_e_5spacy_10morphology_AdvType_ex,
  __pyx_e_5spacy_10morphology_AdvType_adadj,
  __pyx_e_5spacy_10morphology_ConjType_oper,
  __pyx_e_5spacy_10morphology_ConjType_comp,
  __pyx_e_5spacy_10morphology_Connegative_yes,
  __pyx_e_5spacy_10morphology_Derivation_minen,
  __pyx_e_5spacy_10morphology_Derivation_sti,
  __pyx_e_5spacy_10morphology_Derivation_inen,
  __pyx_e_5spacy_10morphology_Derivation_lainen,
  __pyx_e_5spacy_10morphology_Derivation_ja,
  __pyx_e_5spacy_10morphology_Derivation_ton,
  __pyx_e_5spacy_10morphology_Derivation_vs,
  __pyx_e_5spacy_10morphology_Derivation_ttain,
  __pyx_e_5spacy_10morphology_Derivation_ttaa,
  __pyx_e_5spacy_10morphology_Echo_rdp,
  __pyx_e_5spacy_10morphology_Echo_ech,
  __pyx_e_5spacy_10morphology_Foreign_foreign,
  __pyx_e_5spacy_10morphology_Foreign_fscript,
  __pyx_e_5spacy_10morphology_Foreign_tscript,
  __pyx_e_5spacy_10morphology_Foreign_yes,
  __pyx_e_5spacy_10morphology_Gender_dat_masc,
  __pyx_e_5spacy_10morphology_Gender_dat_fem,
  __pyx_e_5spacy_10morphology_Gender_erg_masc,
  __pyx_e_5spacy_10morphology_Gender_erg_fem,
  __pyx_e_5spacy_10morphology_Gender_psor_masc,
  __pyx_e_5spacy_10morphology_Gender_psor_fem,
  __pyx_e_5spacy_10morphology_Gender_psor_neut,
  __pyx_e_5spacy_10morphology_Hyph_yes,
  __pyx_e_5spacy_10morphology_InfForm_one,
  __pyx_e_5spacy_10morphology_InfForm_two,
  __pyx_e_5spacy_10morphology_InfForm_three,
  __pyx_e_5spacy_10morphology_NameType_geo,
  __pyx_e_5spacy_10morphology_NameType_prs,
  __pyx_e_5spacy_10morphology_NameType_giv,
  __pyx_e_5spacy_10morphology_NameType_sur,
  __pyx_e_5spacy_10morphology_NameType_nat,
  __pyx_e_5spacy_10morphology_NameType_com,
  __pyx_e_5spacy_10morphology_NameType_pro,
  __pyx_e_5spacy_10morphology_NameType_oth,
  __pyx_e_5spacy_10morphology_NounType_com,
  __pyx_e_5spacy_10morphology_NounType_prop,
  __pyx_e_5spacy_10morphology_NounType_class,
  __pyx_e_5spacy_10morphology_Number_abs_sing,
  __pyx_e_5spacy_10morphology_Number_abs_plur,
  __pyx_e_5spacy_10morphology_Number_dat_sing,
  __pyx_e_5spacy_10morphology_Number_dat_plur,
  __pyx_e_5spacy_10morphology_Number_erg_sing,
  __pyx_e_5spacy_10morphology_Number_erg_plur,
  __pyx_e_5spacy_10morphology_Number_psee_sing,
  __pyx_e_5spacy_10morphology_Number_psee_plur,
  __pyx_e_5spacy_10morphology_Number_psor_sing,
  __pyx_e_5spacy_10morphology_Number_psor_plur,
  __pyx_e_5spacy_10morphology_NumForm_digit,
  __pyx_e_5spacy_10morphology_NumForm_roman,
  __pyx_e_5spacy_10morphology_NumForm_word,
  __pyx_e_5spacy_10morphology_NumValue_one,
  __pyx_e_5spacy_10morphology_NumValue_two,
  __pyx_e_5spacy_10morphology_NumValue_three,
  __pyx_e_5spacy_10morphology_PartForm_pres,
  __pyx_e_5spacy_10morphology_PartForm_past,
  __pyx_e_5spacy_10morphology_PartForm_agt,
  __pyx_e_5spacy_10morphology_PartForm_neg,
  __pyx_e_5spacy_10morphology_PartType_mod,
  __pyx_e_5spacy_10morphology_PartType_emp,
  __pyx_e_5spacy_10morphology_PartType_res,
  __pyx_e_5spacy_10morphology_PartType_inf,
  __pyx_e_5spacy_10morphology_PartType_vbp,
  __pyx_e_5spacy_10morphology_Person_abs_one,
  __pyx_e_5spacy_10morphology_Person_abs_two,
  __pyx_e_5spacy_10morphology_Person_abs_three,
  __pyx_e_5spacy_10morphology_Person_dat_one,
  __pyx_e_5spacy_10morphology_Person_dat_two,
  __pyx_e_5spacy_10morphology_Person_dat_three,
  __pyx_e_5spacy_10morphology_Person_erg_one,
  __pyx_e_5spacy_10morphology_Person_erg_two,
  __pyx_e_5spacy_10morphology_Person_erg_three,
  __pyx_e_5spacy_10morphology_Person_psor_one,
  __pyx_e_5spacy_10morphology_Person_psor_two,
  __pyx_e_5spacy_10morphology_Person_psor_three,
  __pyx_e_5spacy_10morphology_Polite_inf,
  __pyx_e_5spacy_10morphology_Polite_pol,
  __pyx_e_5spacy_10morphology_Polite_abs_inf,
  __pyx_e_5spacy_10morphology_Polite_abs_pol,
  __pyx_e_5spacy_10morphology_Polite_erg_inf,
  __pyx_e_5spacy_10morphology_Polite_erg_pol,
  __pyx_e_5spacy_10morphology_Polite_dat_inf,
  __pyx_e_5spacy_10morphology_Polite_dat_pol,
  __pyx_e_5spacy_10morphology_Prefix_yes,
  __pyx_e_5spacy_10morphology_PrepCase_npr,
  __pyx_e_5spacy_10morphology_PrepCase_pre,
  __pyx_e_5spacy_10morphology_PunctSide_ini,
  __pyx_e_5spacy_10morphology_PunctSide_fin,
  __pyx_e_5spacy_10morphology_PunctType_peri,
  __pyx_e_5spacy_10morphology_PunctType_qest,
  __pyx_e_5spacy_10morphology_PunctType_excl,
  __pyx_e_5spacy_10morphology_PunctType_quot,
  __pyx_e_5spacy_10morphology_PunctType_brck,
  __pyx_e_5spacy_10morphology_PunctType_comm,
  __pyx_e_5spacy_10morphology_PunctType_colo,
  __pyx_e_5spacy_10morphology_PunctType_semi,
  __pyx_e_5spacy_10morphology_PunctType_dash,
  __pyx_e_5spacy_10morphology_Style_arch,
  __pyx_e_5spacy_10morphology_Style_rare,
  __pyx_e_5spacy_10morphology_Style_poet,
  __pyx_e_5spacy_10morphology_Style_norm,
  __pyx_e_5spacy_10morphology_Style_coll,
  __pyx_e_5spacy_10morphology_Style_vrnc,
  __pyx_e_5spacy_10morphology_Style_sing,
  __pyx_e_5spacy_10morphology_Style_expr,
  __pyx_e_5spacy_10morphology_Style_derg,
  __pyx_e_5spacy_10morphology_Style_vulg,
  __pyx_e_5spacy_10morphology_Style_yes,
  __pyx_e_5spacy_10morphology_StyleVariant_styleShort,
  __pyx_e_5spacy_10morphology_StyleVariant_styleBound,
  __pyx_e_5spacy_10morphology_VerbType_aux,
  __pyx_e_5spacy_10morphology_VerbType_cop,
  __pyx_e_5spacy_10morphology_VerbType_mod,
  __pyx_e_5spacy_10morphology_VerbType_light
};

/* "morphology.pxd":12
 * from . cimport symbols
 * 
 * cdef struct RichTagC:             # <<<<<<<<<<<<<<
 *     uint64_t morph
 *     int id
 */
struct __pyx_t_5spacy_10morphology_RichTagC {
  uint64_t morph;
  int id;
  enum __pyx_t_5spacy_15parts_of_speech_univ_pos_t pos;
  __pyx_t_5spacy_8typedefs_attr_t name;
};

/* "morphology.pxd":19
 * 
 * 
 * cdef struct MorphAnalysisC:             # <<<<<<<<<<<<<<
 *     RichTagC tag
 *     attr_t lemma
 */
struct __pyx_t_5spacy_10morphology_MorphAnalysisC {
  struct __pyx_t_5spacy_10morphology_RichTagC tag;
  __pyx_t_5spacy_8typedefs_attr_t lemma;
};
union __pyx_t_5spacy_5vocab_LexemesOrTokens;
struct __pyx_t_5spacy_5vocab__Cached;

/* "vocab.pxd":16
 * 
 * 
 * cdef union LexemesOrTokens:             # <<<<<<<<<<<<<<
 *     const LexemeC* const* lexemes
 *     const TokenC* tokens
 */
union __pyx_t_5spacy_5vocab_LexemesOrTokens {
  struct __pyx_t_5spacy_7structs_LexemeC const *const *lexemes;
  struct __pyx_t_5spacy_7structs_TokenC const *tokens;
};

/* "vocab.pxd":21
 * 
 * 
 * cdef struct _Cached:             # <<<<<<<<<<<<<<
 *     LexemesOrTokens data
 *     bint is_lex
 */
struct __pyx_t_5spacy_5vocab__Cached {
  union __pyx_t_5spacy_5vocab_LexemesOrTokens data;
  int is_lex;
  int length;
};

/* "attrs.pxd":2
 * # Reserve 64 values for flag features
 * cpdef enum attr_id_t:             # <<<<<<<<<<<<<<
 *     NULL_ATTR
 *     IS_ALPHA
 */
enum __pyx_t_5spacy_5attrs_attr_id_t {
  __pyx_e_5spacy_5attrs_NULL_ATTR,
  __pyx_e_5spacy_5attrs_IS_ALPHA,
  __pyx_e_5spacy_5attrs_IS_ASCII,
  __pyx_e_5spacy_5attrs_IS_DIGIT,
  __pyx_e_5spacy_5attrs_IS_LOWER,
  __pyx_e_5spacy_5attrs_IS_PUNCT,
  __pyx_e_5spacy_5attrs_IS_SPACE,
  __pyx_e_5spacy_5attrs_IS_TITLE,
  __pyx_e_5spacy_5attrs_IS_UPPER,
  __pyx_e_5spacy_5attrs_LIKE_URL,
  __pyx_e_5spacy_5attrs_LIKE_NUM,
  __pyx_e_5spacy_5attrs_LIKE_EMAIL,
  __pyx_e_5spacy_5attrs_IS_STOP,
  __pyx_e_5spacy_5attrs_IS_OOV,
  __pyx_e_5spacy_5attrs_IS_BRACKET,
  __pyx_e_5spacy_5attrs_IS_QUOTE,
  __pyx_e_5spacy_5attrs_IS_LEFT_PUNCT,
  __pyx_e_5spacy_5attrs_IS_RIGHT_PUNCT,
  __pyx_e_5spacy_5attrs_FLAG18 = 18,
  __pyx_e_5spacy_5attrs_FLAG19,
  __pyx_e_5spacy_5attrs_FLAG20,
  __pyx_e_5spacy_5attrs_FLAG21,
  __pyx_e_5spacy_5attrs_FLAG22,
  __pyx_e_5spacy_5attrs_FLAG23,
  __pyx_e_5spacy_5attrs_FLAG24,
  __pyx_e_5spacy_5attrs_FLAG25,
  __pyx_e_5spacy_5attrs_FLAG26,
  __pyx_e_5spacy_5attrs_FLAG27,
  __pyx_e_5spacy_5attrs_FLAG28,
  __pyx_e_5spacy_5attrs_FLAG29,
  __pyx_e_5spacy_5attrs_FLAG30,
  __pyx_e_5spacy_5attrs_FLAG31,
  __pyx_e_5spacy_5attrs_FLAG32,
  __pyx_e_5spacy_5attrs_FLAG33,
  __pyx_e_5spacy_5attrs_FLAG34,
  __pyx_e_5spacy_5attrs_FLAG35,
  __pyx_e_5spacy_5attrs_FLAG36,
  __pyx_e_5spacy_5attrs_FLAG37,
  __pyx_e_5spacy_5attrs_FLAG38,
  __pyx_e_5spacy_5attrs_FLAG39,
  __pyx_e_5spacy_5attrs_FLAG40,
  __pyx_e_5spacy_5attrs_FLAG41,
  __pyx_e_5spacy_5attrs_FLAG42,
  __pyx_e_5spacy_5attrs_FLAG43,
  __pyx_e_5spacy_5attrs_FLAG44,
  __pyx_e_5spacy_5attrs_FLAG45,
  __pyx_e_5spacy_5attrs_FLAG46,
  __pyx_e_5spacy_5attrs_FLAG47,
  __pyx_e_5spacy_5attrs_FLAG48,
  __pyx_e_5spacy_5attrs_FLAG49,
  __pyx_e_5spacy_5attrs_FLAG50,
  __pyx_e_5spacy_5attrs_FLAG51,
  __pyx_e_5spacy_5attrs_FLAG52,
  __pyx_e_5spacy_5attrs_FLAG53,
  __pyx_e_5spacy_5attrs_FLAG54,
  __pyx_e_5spacy_5attrs_FLAG55,
  __pyx_e_5spacy_5attrs_FLAG56,
  __pyx_e_5spacy_5attrs_FLAG57,
  __pyx_e_5spacy_5attrs_FLAG58,
  __pyx_e_5spacy_5attrs_FLAG59,
  __pyx_e_5spacy_5attrs_FLAG60,
  __pyx_e_5spacy_5attrs_FLAG61,
  __pyx_e_5spacy_5attrs_FLAG62,
  __pyx_e_5spacy_5attrs_FLAG63,
  __pyx_e_5spacy_5attrs_ID,
  __pyx_e_5spacy_5attrs_ORTH,
  __pyx_e_5spacy_5attrs_LOWER,
  __pyx_e_5spacy_5attrs_NORM,
  __pyx_e_5spacy_5attrs_SHAPE,
  __pyx_e_5spacy_5attrs_PREFIX,
  __pyx_e_5spacy_5attrs_SUFFIX,
  __pyx_e_5spacy_5attrs_LENGTH,
  __pyx_e_5spacy_5attrs_CLUSTER,
  __pyx_e_5spacy_5attrs_LEMMA,
  __pyx_e_5spacy_5attrs_POS,
  __pyx_e_5spacy_5attrs_TAG,
  __pyx_e_5spacy_5attrs_DEP,
  __pyx_e_5spacy_5attrs_ENT_IOB,
  __pyx_e_5spacy_5attrs_ENT_TYPE,
  __pyx_e_5spacy_5attrs_HEAD,
  __pyx_e_5spacy_5attrs_SPACY,
  __pyx_e_5spacy_5attrs_PROB,
  __pyx_e_5spacy_5attrs_LANG
};

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":764
 * ctypedef npy_longdouble longdouble_t
 * 
 * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t
 */
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":765
 * 
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
 * ctypedef npy_clongdouble clongdouble_t
 * 
 */
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":766
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cdouble     complex_t
 */
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":768
 * ctypedef npy_clongdouble clongdouble_t
 * 
 * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 */
typedef npy_cdouble __pyx_t_5numpy_complex_t;
struct __pyx_t_5spacy_6syntax_6_state_StateC;
struct __pyx_t_5spacy_6syntax_6_state_StateC {

  /* "_state.pxd":15
 * 
 * 
 * cdef cppclass StateC:             # <<<<<<<<<<<<<<
 *     int* _stack
 *     int* _buffer
 */
  int *_stack;
  int *_buffer;
  int *shifted;
  struct __pyx_t_5spacy_7structs_TokenC *_sent;
  struct __pyx_t_5spacy_7structs_Entity *_ents;
  struct __pyx_t_5spacy_7structs_TokenC _empty_token;
  int length;
  int _s_i;
  int _b_i;
  int _e_i;
  int _break;
   __pyx_t_5spacy_6syntax_6_state_StateC(struct __pyx_t_5spacy_7structs_TokenC const *, int);
  virtual  ~__pyx_t_5spacy_6syntax_6_state_StateC(void);
  virtual int S(int) const;
  virtual int B(int) const;
  virtual struct __pyx_t_5spacy_7structs_TokenC const *S_(int) const;
  virtual struct __pyx_t_5spacy_7structs_TokenC const *B_(int) const;
  virtual struct __pyx_t_5spacy_7structs_TokenC const *H_(int) const;
  virtual struct __pyx_t_5spacy_7structs_TokenC const *E_(int) const;
  virtual struct __pyx_t_5spacy_7structs_TokenC const *L_(int, int) const;
  virtual struct __pyx_t_5spacy_7structs_TokenC const *R_(int, int) const;
  virtual struct __pyx_t_5spacy_7structs_TokenC const *safe_get(int) const;
  virtual int H(int) const;
  virtual int E(int) const;
  virtual int L(int, int) const;
  virtual int R(int, int) const;
  virtual int empty(void) const;
  virtual int eol(void) const;
  virtual int at_break(void) const;
  virtual int is_final(void) const;
  virtual int has_head(int) const;
  virtual int n_L(int) const;
  virtual int n_R(int) const;
  virtual int stack_is_connected(void) const;
  virtual int entity_is_open(void) const;
  virtual int stack_depth(void) const;
  virtual int buffer_length(void) const;
  virtual void push(void);
  virtual void pop(void);
  virtual void unshift(void);
  virtual void add_arc(int, int, int);
  virtual void del_arc(int, int);
  virtual void open_ent(int);
  virtual void close_ent(void);
  virtual void set_ent_tag(int, int, int);
  virtual void set_break(int);
  virtual void clone(__pyx_t_5spacy_6syntax_6_state_StateC const *);
  virtual void fast_forward(void);
};
struct __pyx_t_5spacy_4gold_GoldParseC;

/* "gold.pxd":7
 * 
 * 
 * cdef struct GoldParseC:             # <<<<<<<<<<<<<<
 *     int* tags
 *     int* heads
 */
struct __pyx_t_5spacy_4gold_GoldParseC {
  int *tags;
  int *heads;
  int *labels;
  int **brackets;
  struct __pyx_t_5spacy_6syntax_17transition_system_Transition *ner;
};
struct __pyx_t_5spacy_6syntax_17transition_system_Transition;

/* "transition_system.pxd":13
 * 
 * 
 * cdef struct Transition:             # <<<<<<<<<<<<<<
 *     int clas
 *     int move
 */
struct __pyx_t_5spacy_6syntax_17transition_system_Transition {
  int clas;
  int move;
  int label;
  __pyx_t_5thinc_8typedefs_weight_t score;
  int (*is_valid)(__pyx_t_5spacy_6syntax_6_state_StateC const *, int);
  __pyx_t_5thinc_8typedefs_weight_t (*get_cost)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, struct __pyx_t_5spacy_4gold_GoldParseC const *, int);
  int (*__pyx_do)(__pyx_t_5spacy_6syntax_6_state_StateC *, int);
};

/* "transition_system.pxd":25
 * 
 * 
 * ctypedef weight_t (*get_cost_func_t)(StateClass state, const GoldParseC* gold, int label) nogil             # <<<<<<<<<<<<<<
 * ctypedef weight_t (*move_cost_func_t)(StateClass state, const GoldParseC* gold) nogil
 * ctypedef weight_t (*label_cost_func_t)(StateClass state, const GoldParseC* gold, int label) nogil
 */
typedef __pyx_t_5thinc_8typedefs_weight_t (*__pyx_t_5spacy_6syntax_17transition_system_get_cost_func_t)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, struct __pyx_t_5spacy_4gold_GoldParseC const *, int);

/* "transition_system.pxd":26
 * 
 * ctypedef weight_t (*get_cost_func_t)(StateClass state, const GoldParseC* gold, int label) nogil
 * ctypedef weight_t (*move_cost_func_t)(StateClass state, const GoldParseC* gold) nogil             # <<<<<<<<<<<<<<
 * ctypedef weight_t (*label_cost_func_t)(StateClass state, const GoldParseC* gold, int label) nogil
 * 
 */
typedef __pyx_t_5thinc_8typedefs_weight_t (*__pyx_t_5spacy_6syntax_17transition_system_move_cost_func_t)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, struct __pyx_t_5spacy_4gold_GoldParseC const *);

/* "transition_system.pxd":27
 * ctypedef weight_t (*get_cost_func_t)(StateClass state, const GoldParseC* gold, int label) nogil
 * ctypedef weight_t (*move_cost_func_t)(StateClass state, const GoldParseC* gold) nogil
 * ctypedef weight_t (*label_cost_func_t)(StateClass state, const GoldParseC* gold, int label) nogil             # <<<<<<<<<<<<<<
 * 
 * ctypedef int (*do_func_t)(StateC* state, int label) nogil
 */
typedef __pyx_t_5thinc_8typedefs_weight_t (*__pyx_t_5spacy_6syntax_17transition_system_label_cost_func_t)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, struct __pyx_t_5spacy_4gold_GoldParseC const *, int);

/* "transition_system.pxd":29
 * ctypedef weight_t (*label_cost_func_t)(StateClass state, const GoldParseC* gold, int label) nogil
 * 
 * ctypedef int (*do_func_t)(StateC* state, int label) nogil             # <<<<<<<<<<<<<<
 * 
 * 
 */
typedef int (*__pyx_t_5spacy_6syntax_17transition_system_do_func_t)(__pyx_t_5spacy_6syntax_6_state_StateC *, int);

/* "tokens/doc.pxd":14
 * 
 * 
 * ctypedef const LexemeC* const_Lexeme_ptr             # <<<<<<<<<<<<<<
 * ctypedef const TokenC* const_TokenC_ptr
 * 
 */
typedef struct __pyx_t_5spacy_7structs_LexemeC const *__pyx_t_5spacy_6tokens_3doc_const_Lexeme_ptr;

/* "tokens/doc.pxd":15
 * 
 * ctypedef const LexemeC* const_Lexeme_ptr
 * ctypedef const TokenC* const_TokenC_ptr             # <<<<<<<<<<<<<<
 * 
 * ctypedef fused LexemeOrToken:
 */
typedef struct __pyx_t_5spacy_7structs_TokenC const *__pyx_t_5spacy_6tokens_3doc_const_TokenC_ptr;

/* "_parse_features.pxd":25
 * 
 * # NB: The order of the enum is _NOT_ arbitrary!!
 * cpdef enum:             # <<<<<<<<<<<<<<
 *     S2w
 *     S2W
 */
enum  {
  __pyx_e_5spacy_6syntax_15_parse_features_S2w,
  __pyx_e_5spacy_6syntax_15_parse_features_S2W,
  __pyx_e_5spacy_6syntax_15_parse_features_S2p,
  __pyx_e_5spacy_6syntax_15_parse_features_S2c,
  __pyx_e_5spacy_6syntax_15_parse_features_S2c4,
  __pyx_e_5spacy_6syntax_15_parse_features_S2c6,
  __pyx_e_5spacy_6syntax_15_parse_features_S2L,
  __pyx_e_5spacy_6syntax_15_parse_features_S2_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_S2_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_S2_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_S2_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_S2_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_S1w,
  __pyx_e_5spacy_6syntax_15_parse_features_S1W,
  __pyx_e_5spacy_6syntax_15_parse_features_S1p,
  __pyx_e_5spacy_6syntax_15_parse_features_S1c,
  __pyx_e_5spacy_6syntax_15_parse_features_S1c4,
  __pyx_e_5spacy_6syntax_15_parse_features_S1c6,
  __pyx_e_5spacy_6syntax_15_parse_features_S1L,
  __pyx_e_5spacy_6syntax_15_parse_features_S1_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_S1_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_S1_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_S1_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_S1_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_S1rw,
  __pyx_e_5spacy_6syntax_15_parse_features_S1rW,
  __pyx_e_5spacy_6syntax_15_parse_features_S1rp,
  __pyx_e_5spacy_6syntax_15_parse_features_S1rc,
  __pyx_e_5spacy_6syntax_15_parse_features_S1rc4,
  __pyx_e_5spacy_6syntax_15_parse_features_S1rc6,
  __pyx_e_5spacy_6syntax_15_parse_features_S1rL,
  __pyx_e_5spacy_6syntax_15_parse_features_S1r_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_S1r_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_S1r_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_S1r_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_S1r_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_S0lw,
  __pyx_e_5spacy_6syntax_15_parse_features_S0lW,
  __pyx_e_5spacy_6syntax_15_parse_features_S0lp,
  __pyx_e_5spacy_6syntax_15_parse_features_S0lc,
  __pyx_e_5spacy_6syntax_15_parse_features_S0lc4,
  __pyx_e_5spacy_6syntax_15_parse_features_S0lc6,
  __pyx_e_5spacy_6syntax_15_parse_features_S0lL,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l2w,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l2W,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l2p,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l2c,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l2c4,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l2c6,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l2L,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l2_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l2_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l2_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l2_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_S0l2_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_S0w,
  __pyx_e_5spacy_6syntax_15_parse_features_S0W,
  __pyx_e_5spacy_6syntax_15_parse_features_S0p,
  __pyx_e_5spacy_6syntax_15_parse_features_S0c,
  __pyx_e_5spacy_6syntax_15_parse_features_S0c4,
  __pyx_e_5spacy_6syntax_15_parse_features_S0c6,
  __pyx_e_5spacy_6syntax_15_parse_features_S0L,
  __pyx_e_5spacy_6syntax_15_parse_features_S0_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_S0_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_S0_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_S0_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_S0_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r2w,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r2W,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r2p,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r2c,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r2c4,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r2c6,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r2L,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r2_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r2_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r2_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r2_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r2_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_S0rw,
  __pyx_e_5spacy_6syntax_15_parse_features_S0rW,
  __pyx_e_5spacy_6syntax_15_parse_features_S0rp,
  __pyx_e_5spacy_6syntax_15_parse_features_S0rc,
  __pyx_e_5spacy_6syntax_15_parse_features_S0rc4,
  __pyx_e_5spacy_6syntax_15_parse_features_S0rc6,
  __pyx_e_5spacy_6syntax_15_parse_features_S0rL,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_S0r_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l2w,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l2W,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l2p,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l2c,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l2c4,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l2c6,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l2L,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l2_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l2_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l2_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l2_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l2_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_N0lw,
  __pyx_e_5spacy_6syntax_15_parse_features_N0lW,
  __pyx_e_5spacy_6syntax_15_parse_features_N0lp,
  __pyx_e_5spacy_6syntax_15_parse_features_N0lc,
  __pyx_e_5spacy_6syntax_15_parse_features_N0lc4,
  __pyx_e_5spacy_6syntax_15_parse_features_N0lc6,
  __pyx_e_5spacy_6syntax_15_parse_features_N0lL,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_N0l_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_N0w,
  __pyx_e_5spacy_6syntax_15_parse_features_N0W,
  __pyx_e_5spacy_6syntax_15_parse_features_N0p,
  __pyx_e_5spacy_6syntax_15_parse_features_N0c,
  __pyx_e_5spacy_6syntax_15_parse_features_N0c4,
  __pyx_e_5spacy_6syntax_15_parse_features_N0c6,
  __pyx_e_5spacy_6syntax_15_parse_features_N0L,
  __pyx_e_5spacy_6syntax_15_parse_features_N0_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_N0_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_N0_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_N0_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_N0_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_N1w,
  __pyx_e_5spacy_6syntax_15_parse_features_N1W,
  __pyx_e_5spacy_6syntax_15_parse_features_N1p,
  __pyx_e_5spacy_6syntax_15_parse_features_N1c,
  __pyx_e_5spacy_6syntax_15_parse_features_N1c4,
  __pyx_e_5spacy_6syntax_15_parse_features_N1c6,
  __pyx_e_5spacy_6syntax_15_parse_features_N1L,
  __pyx_e_5spacy_6syntax_15_parse_features_N1_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_N1_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_N1_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_N1_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_N1_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_N2w,
  __pyx_e_5spacy_6syntax_15_parse_features_N2W,
  __pyx_e_5spacy_6syntax_15_parse_features_N2p,
  __pyx_e_5spacy_6syntax_15_parse_features_N2c,
  __pyx_e_5spacy_6syntax_15_parse_features_N2c4,
  __pyx_e_5spacy_6syntax_15_parse_features_N2c6,
  __pyx_e_5spacy_6syntax_15_parse_features_N2L,
  __pyx_e_5spacy_6syntax_15_parse_features_N2_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_N2_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_N2_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_N2_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_N2_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_P1w,
  __pyx_e_5spacy_6syntax_15_parse_features_P1W,
  __pyx_e_5spacy_6syntax_15_parse_features_P1p,
  __pyx_e_5spacy_6syntax_15_parse_features_P1c,
  __pyx_e_5spacy_6syntax_15_parse_features_P1c4,
  __pyx_e_5spacy_6syntax_15_parse_features_P1c6,
  __pyx_e_5spacy_6syntax_15_parse_features_P1L,
  __pyx_e_5spacy_6syntax_15_parse_features_P1_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_P1_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_P1_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_P1_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_P1_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_P2w,
  __pyx_e_5spacy_6syntax_15_parse_features_P2W,
  __pyx_e_5spacy_6syntax_15_parse_features_P2p,
  __pyx_e_5spacy_6syntax_15_parse_features_P2c,
  __pyx_e_5spacy_6syntax_15_parse_features_P2c4,
  __pyx_e_5spacy_6syntax_15_parse_features_P2c6,
  __pyx_e_5spacy_6syntax_15_parse_features_P2L,
  __pyx_e_5spacy_6syntax_15_parse_features_P2_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_P2_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_P2_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_P2_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_P2_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_E0w,
  __pyx_e_5spacy_6syntax_15_parse_features_E0W,
  __pyx_e_5spacy_6syntax_15_parse_features_E0p,
  __pyx_e_5spacy_6syntax_15_parse_features_E0c,
  __pyx_e_5spacy_6syntax_15_parse_features_E0c4,
  __pyx_e_5spacy_6syntax_15_parse_features_E0c6,
  __pyx_e_5spacy_6syntax_15_parse_features_E0L,
  __pyx_e_5spacy_6syntax_15_parse_features_E0_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_E0_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_E0_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_E0_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_E0_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_E1w,
  __pyx_e_5spacy_6syntax_15_parse_features_E1W,
  __pyx_e_5spacy_6syntax_15_parse_features_E1p,
  __pyx_e_5spacy_6syntax_15_parse_features_E1c,
  __pyx_e_5spacy_6syntax_15_parse_features_E1c4,
  __pyx_e_5spacy_6syntax_15_parse_features_E1c6,
  __pyx_e_5spacy_6syntax_15_parse_features_E1L,
  __pyx_e_5spacy_6syntax_15_parse_features_E1_prefix,
  __pyx_e_5spacy_6syntax_15_parse_features_E1_suffix,
  __pyx_e_5spacy_6syntax_15_parse_features_E1_shape,
  __pyx_e_5spacy_6syntax_15_parse_features_E1_ne_iob,
  __pyx_e_5spacy_6syntax_15_parse_features_E1_ne_type,
  __pyx_e_5spacy_6syntax_15_parse_features_dist,
  __pyx_e_5spacy_6syntax_15_parse_features_N0lv,
  __pyx_e_5spacy_6syntax_15_parse_features_S0lv,
  __pyx_e_5spacy_6syntax_15_parse_features_S0rv,
  __pyx_e_5spacy_6syntax_15_parse_features_S1lv,
  __pyx_e_5spacy_6syntax_15_parse_features_S1rv,
  __pyx_e_5spacy_6syntax_15_parse_features_S0_has_head,
  __pyx_e_5spacy_6syntax_15_parse_features_S1_has_head,
  __pyx_e_5spacy_6syntax_15_parse_features_S2_has_head,
  __pyx_e_5spacy_6syntax_15_parse_features_CONTEXT_SIZE
};

/* "cymem/cymem.pxd":1
 * cdef class Pool:             # <<<<<<<<<<<<<<
 *     cdef readonly size_t size
 *     cdef readonly dict addresses
 */
struct __pyx_obj_5cymem_5cymem_Pool {
  PyObject_HEAD
  struct __pyx_vtabstruct_5cymem_5cymem_Pool *__pyx_vtab;
  size_t size;
  PyObject *addresses;
  PyObject *refs;
};


/* "cymem/cymem.pxd":11
 * 
 * 
 * cdef class Address:             # <<<<<<<<<<<<<<
 *     cdef void* ptr
 */
struct __pyx_obj_5cymem_5cymem_Address {
  PyObject_HEAD
  void *ptr;
};


/* "preshed/maps.pxd":36
 * 
 * 
 * cdef class PreshMap:             # <<<<<<<<<<<<<<
 *     cdef MapStruct* c_map
 *     cdef Pool mem
 */
struct __pyx_obj_7preshed_4maps_PreshMap {
  PyObject_HEAD
  struct __pyx_vtabstruct_7preshed_4maps_PreshMap *__pyx_vtab;
  struct __pyx_t_7preshed_4maps_MapStruct *c_map;
  struct __pyx_obj_5cymem_5cymem_Pool *mem;
};


/* "preshed/maps.pxd":44
 * 
 * 
 * cdef class PreshMapArray:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cdef MapStruct* maps
 */
struct __pyx_obj_7preshed_4maps_PreshMapArray {
  PyObject_HEAD
  struct __pyx_vtabstruct_7preshed_4maps_PreshMapArray *__pyx_vtab;
  struct __pyx_obj_5cymem_5cymem_Pool *mem;
  struct __pyx_t_7preshed_4maps_MapStruct *maps;
  size_t length;
};


/* "features.pxd":7
 * 
 * 
 * cdef class ConjunctionExtracter:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cdef readonly int nr_templ
 */
struct __pyx_obj_5thinc_6linear_8features_ConjunctionExtracter {
  PyObject_HEAD
  struct __pyx_vtabstruct_5thinc_6linear_8features_ConjunctionExtracter *__pyx_vtab;
  struct __pyx_obj_5cymem_5cymem_Pool *mem;
  int nr_templ;
  int nr_embed;
  int nr_atom;
  struct __pyx_t_5thinc_7structs_TemplateC *templates;
  PyObject *_py_templates;
};


/* "thinc/linear/avgtron.pxd":9
 * 
 * 
 * cdef class AveragedPerceptron:             # <<<<<<<<<<<<<<
 *     cdef readonly Pool mem
 *     cdef readonly PreshMap weights
 */
struct __pyx_obj_5thinc_6linear_7avgtron_AveragedPerceptron {
  PyObject_HEAD
  struct __pyx_vtabstruct_5thinc_6linear_7avgtron_AveragedPerceptron *__pyx_vtab;
  struct __pyx_obj_5cymem_5cymem_Pool *mem;
  struct __pyx_obj_7preshed_4maps_PreshMap *weights;
  struct __pyx_obj_7preshed_4maps_PreshMap *averages;
  struct __pyx_obj_5thinc_6linear_8features_ConjunctionExtracter *extracter;
  int time;
};


/* "linalg.pxd":54
 * 
 * 
 * cdef class Matrix:             # <<<<<<<<<<<<<<
 *     cdef readonly Pool mem
 *     cdef weight_t* data
 */
struct __pyx_obj_5thinc_6linalg_Matrix {
  PyObject_HEAD
  struct __pyx_obj_5cymem_5cymem_Pool *mem;
  __pyx_t_5thinc_6linalg_weight_t *data;
  int32_t nr_row;
  int32_t nr_col;
};


/* "linalg.pxd":61
 * 
 * 
 * cdef class Vec:             # <<<<<<<<<<<<<<
 *     @staticmethod
 *     cdef inline int arg_max(const weight_t* scores, const int n_classes) nogil:
 */
struct __pyx_obj_5thinc_6linalg_Vec {
  PyObject_HEAD
  struct __pyx_vtabstruct_5thinc_6linalg_Vec *__pyx_vtab;
};


/* "linalg.pxd":163
 * 
 * 
 * cdef class VecVec:             # <<<<<<<<<<<<<<
 *     @staticmethod
 *     cdef inline void add(weight_t* output,
 */
struct __pyx_obj_5thinc_6linalg_VecVec {
  PyObject_HEAD
  struct __pyx_vtabstruct_5thinc_6linalg_VecVec *__pyx_vtab;
};


/* "linalg.pxd":247
 * 
 * 
 * cdef class MatVec:             # <<<<<<<<<<<<<<
 *     @staticmethod
 *     cdef inline void mul(weight_t* output,
 */
struct __pyx_obj_5thinc_6linalg_MatVec {
  PyObject_HEAD
  struct __pyx_vtabstruct_5thinc_6linalg_MatVec *__pyx_vtab;
};


/* "linalg.pxd":322
 * 
 * 
 * cdef class MatMat:             # <<<<<<<<<<<<<<
 *     @staticmethod
 *     cdef inline void add(weight_t* output,
 */
struct __pyx_obj_5thinc_6linalg_MatMat {
  PyObject_HEAD
  struct __pyx_vtabstruct_5thinc_6linalg_MatMat *__pyx_vtab;
};


/* "thinc/extra/eg.pxd":14
 * 
 * 
 * cdef class Example:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cdef ExampleC c
 */
struct __pyx_obj_5thinc_5extra_2eg_Example {
  PyObject_HEAD
  struct __pyx_vtabstruct_5thinc_5extra_2eg_Example *__pyx_vtab;
  struct __pyx_obj_5cymem_5cymem_Pool *mem;
  struct __pyx_t_5thinc_7structs_ExampleC c;
};


/* "strings.pxd":18
 * 
 * 
 * cdef class StringStore:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cdef Utf8Str* c
 */
struct __pyx_obj_5spacy_7strings_StringStore {
  PyObject_HEAD
  struct __pyx_vtabstruct_5spacy_7strings_StringStore *__pyx_vtab;
  struct __pyx_obj_5cymem_5cymem_Pool *mem;
  __pyx_t_5spacy_7strings_Utf8Str *c;
  int64_t size;
  struct __pyx_obj_7preshed_4maps_PreshMap *_map;
  int64_t _resize_at;
};


/* "morphology.pxd":24
 * 
 * 
 * cdef class Morphology:             # <<<<<<<<<<<<<<
 *     cdef readonly Pool mem
 *     cdef readonly StringStore strings
 */
struct __pyx_obj_5spacy_10morphology_Morphology {
  PyObject_HEAD
  struct __pyx_vtabstruct_5spacy_10morphology_Morphology *__pyx_vtab;
  struct __pyx_obj_5cymem_5cymem_Pool *mem;
  struct __pyx_obj_5spacy_7strings_StringStore *strings;
  PyObject *lemmatizer;
  PyObject *tag_map;
  PyObject *n_tags;
  PyObject *reverse_index;
  PyObject *tag_names;
  struct __pyx_t_5spacy_10morphology_RichTagC *rich_tags;
  struct __pyx_obj_7preshed_4maps_PreshMapArray *_cache;
};


/* "vocab.pxd":27
 * 
 * 
 * cdef class Vocab:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cpdef readonly StringStore strings
 */
struct __pyx_obj_5spacy_5vocab_Vocab {
  PyObject_HEAD
  struct __pyx_vtabstruct_5spacy_5vocab_Vocab *__pyx_vtab;
  struct __pyx_obj_5cymem_5cymem_Pool *mem;
  struct __pyx_obj_5spacy_7strings_StringStore *strings;
  struct __pyx_obj_5spacy_10morphology_Morphology *morphology;
  int length;
  PyObject *_serializer;
  PyObject *data_dir;
  PyObject *lex_attr_getters;
  PyObject *serializer_freqs;
  struct __pyx_obj_7preshed_4maps_PreshMap *_by_hash;
  struct __pyx_obj_7preshed_4maps_PreshMap *_by_orth;
  int vectors_length;
};


/* "lexeme.pxd":14
 * cdef LexemeC EMPTY_LEXEME
 * 
 * cdef class Lexeme:             # <<<<<<<<<<<<<<
 *     cdef LexemeC* c
 *     cdef readonly Vocab vocab
 */
struct __pyx_obj_5spacy_6lexeme_Lexeme {
  PyObject_HEAD
  struct __pyx_vtabstruct_5spacy_6lexeme_Lexeme *__pyx_vtab;
  struct __pyx_t_5spacy_7structs_LexemeC *c;
  struct __pyx_obj_5spacy_5vocab_Vocab *vocab;
  __pyx_t_5spacy_8typedefs_attr_t orth;
};


/* "stateclass.pxd":12
 * 
 * 
 * cdef class StateClass:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cdef StateC* c
 */
struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass {
  PyObject_HEAD
  struct __pyx_vtabstruct_5spacy_6syntax_10stateclass_StateClass *__pyx_vtab;
  struct __pyx_obj_5cymem_5cymem_Pool *mem;
  __pyx_t_5spacy_6syntax_6_state_StateC *c;
};


/* "gold.pxd":15
 * 
 * 
 * cdef class GoldParse:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 * 
 */
struct __pyx_obj_5spacy_4gold_GoldParse {
  PyObject_HEAD
  struct __pyx_obj_5cymem_5cymem_Pool *mem;
  struct __pyx_t_5spacy_4gold_GoldParseC c;
  int length;
  int loss;
  PyObject *tags;
  PyObject *heads;
  PyObject *labels;
  PyObject *orths;
  PyObject *ner;
  PyObject *ents;
  PyObject *brackets;
  PyObject *cand_to_gold;
  PyObject *gold_to_cand;
  PyObject *orig_annot;
};


/* "transition_system.pxd":32
 * 
 * 
 * cdef class TransitionSystem:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cdef StringStore strings
 */
struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem {
  PyObject_HEAD
  struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem *__pyx_vtab;
  struct __pyx_obj_5cymem_5cymem_Pool *mem;
  struct __pyx_obj_5spacy_7strings_StringStore *strings;
  struct __pyx_t_5spacy_6syntax_17transition_system_Transition *c;
  int n_moves;
  int _size;
  int root_label;
  PyObject *freqs;
};


/* "arc_eager.pxd":11
 * 
 * 
 * cdef class ArcEager(TransitionSystem):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_5spacy_6syntax_9arc_eager_ArcEager {
  struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem __pyx_base;
};


/* "preshed/counter.pxd":13
 * 
 * 
 * cdef class PreshCounter:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cdef MapStruct* c_map
 */
struct __pyx_obj_7preshed_7counter_PreshCounter {
  PyObject_HEAD
  struct __pyx_vtabstruct_7preshed_7counter_PreshCounter *__pyx_vtab;
  struct __pyx_obj_5cymem_5cymem_Pool *mem;
  struct __pyx_t_7preshed_4maps_MapStruct *c_map;
  PyObject *smoother;
  __pyx_t_7preshed_7counter_count_t total;
};


/* "tokens/doc.pxd":28
 * 
 * 
 * cdef class Doc:             # <<<<<<<<<<<<<<
 *     cdef readonly Pool mem
 *     cdef readonly Vocab vocab
 */
struct __pyx_obj_5spacy_6tokens_3doc_Doc {
  PyObject_HEAD
  struct __pyx_vtabstruct_5spacy_6tokens_3doc_Doc *__pyx_vtab;
  struct __pyx_obj_5cymem_5cymem_Pool *mem;
  struct __pyx_obj_5spacy_5vocab_Vocab *vocab;
  PyObject *_vector;
  PyObject *_vector_norm;
  PyArrayObject *tensor;
  PyObject *user_data;
  struct __pyx_t_5spacy_7structs_TokenC *c;
  int is_tagged;
  int is_parsed;
  float sentiment;
  PyObject *user_hooks;
  PyObject *user_token_hooks;
  PyObject *user_span_hooks;
  PyObject *_py_tokens;
  int length;
  int max_length;
  PyObject *noun_chunks_iterator;
};


/* "spacy/syntax/parser.pxd":13
 * 
 * 
 * cdef class ParserModel(AveragedPerceptron):             # <<<<<<<<<<<<<<
 *     cdef void set_featuresC(self, ExampleC* eg, const StateC* state) nogil
 * 
 */
struct __pyx_obj_5spacy_6syntax_6parser_ParserModel {
  struct __pyx_obj_5thinc_6linear_7avgtron_AveragedPerceptron __pyx_base;
};


/* "spacy/syntax/parser.pxd":17
 * 
 * 
 * cdef class Parser:             # <<<<<<<<<<<<<<
 *     cdef readonly Vocab vocab
 *     cdef readonly ParserModel model
 */
struct __pyx_obj_5spacy_6syntax_6parser_Parser {
  PyObject_HEAD
  struct __pyx_vtabstruct_5spacy_6syntax_6parser_Parser *__pyx_vtab;
  struct __pyx_obj_5spacy_5vocab_Vocab *vocab;
  struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *model;
  struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem *moves;
  PyObject *cfg;
};


/* "spacy/syntax/parser.pyx":236
 * 
 * 
 * cdef class StepwiseState:             # <<<<<<<<<<<<<<
 *     cdef readonly StateClass stcls
 *     cdef readonly Example eg
 */
struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState {
  PyObject_HEAD
  struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *stcls;
  struct __pyx_obj_5thinc_5extra_2eg_Example *eg;
  struct __pyx_obj_5spacy_6tokens_3doc_Doc *doc;
  struct __pyx_obj_5spacy_6syntax_6parser_Parser *parser;
};


/* "spacy/syntax/parser.pyx":120
 *         self.moves.finalize_doc(tokens)
 * 
 *     def pipe(self, stream, int batch_size=1000, int n_threads=2):             # <<<<<<<<<<<<<<
 *         cdef Pool mem = Pool()
 *         cdef TokenC** doc_ptr = <TokenC**>mem.alloc(batch_size, sizeof(TokenC*))
 */
struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe {
  PyObject_HEAD
  int __pyx_v_batch_size;
  struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_doc;
  struct __pyx_t_5spacy_7structs_TokenC **__pyx_v_doc_ptr;
  int __pyx_v_i;
  int *__pyx_v_lengths;
  struct __pyx_obj_5cymem_5cymem_Pool *__pyx_v_mem;
  int __pyx_v_n_threads;
  int __pyx_v_nr_class;
  int __pyx_v_nr_feat;
  PyObject *__pyx_v_queue;
  struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self;
  int __pyx_v_status;
  PyObject *__pyx_v_stream;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
  PyObject *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
};



/* "cymem/cymem.pxd":1
 * cdef class Pool:             # <<<<<<<<<<<<<<
 *     cdef readonly size_t size
 *     cdef readonly dict addresses
 */

struct __pyx_vtabstruct_5cymem_5cymem_Pool {
  void *(*alloc)(struct __pyx_obj_5cymem_5cymem_Pool *, size_t, size_t);
  void (*free)(struct __pyx_obj_5cymem_5cymem_Pool *, void *);
  void *(*realloc)(struct __pyx_obj_5cymem_5cymem_Pool *, void *, size_t);
};
static struct __pyx_vtabstruct_5cymem_5cymem_Pool *__pyx_vtabptr_5cymem_5cymem_Pool;


/* "preshed/maps.pxd":36
 * 
 * 
 * cdef class PreshMap:             # <<<<<<<<<<<<<<
 *     cdef MapStruct* c_map
 *     cdef Pool mem
 */

struct __pyx_vtabstruct_7preshed_4maps_PreshMap {
  void *(*get)(struct __pyx_obj_7preshed_4maps_PreshMap *, __pyx_t_7preshed_4maps_key_t);
  void (*set)(struct __pyx_obj_7preshed_4maps_PreshMap *, __pyx_t_7preshed_4maps_key_t, void *);
};
static struct __pyx_vtabstruct_7preshed_4maps_PreshMap *__pyx_vtabptr_7preshed_4maps_PreshMap;


/* "preshed/maps.pxd":44
 * 
 * 
 * cdef class PreshMapArray:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cdef MapStruct* maps
 */

struct __pyx_vtabstruct_7preshed_4maps_PreshMapArray {
  void *(*get)(struct __pyx_obj_7preshed_4maps_PreshMapArray *, size_t, __pyx_t_7preshed_4maps_key_t);
  void (*set)(struct __pyx_obj_7preshed_4maps_PreshMapArray *, size_t, __pyx_t_7preshed_4maps_key_t, void *);
};
static struct __pyx_vtabstruct_7preshed_4maps_PreshMapArray *__pyx_vtabptr_7preshed_4maps_PreshMapArray;


/* "features.pxd":7
 * 
 * 
 * cdef class ConjunctionExtracter:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cdef readonly int nr_templ
 */

struct __pyx_vtabstruct_5thinc_6linear_8features_ConjunctionExtracter {
  int (*set_features)(struct __pyx_obj_5thinc_6linear_8features_ConjunctionExtracter *, struct __pyx_t_5thinc_7structs_FeatureC *, __pyx_t_5thinc_8typedefs_atom_t const *);
};
static struct __pyx_vtabstruct_5thinc_6linear_8features_ConjunctionExtracter *__pyx_vtabptr_5thinc_6linear_8features_ConjunctionExtracter;


/* "thinc/linear/avgtron.pxd":9
 * 
 * 
 * cdef class AveragedPerceptron:             # <<<<<<<<<<<<<<
 *     cdef readonly Pool mem
 *     cdef readonly PreshMap weights
 */

struct __pyx_vtabstruct_5thinc_6linear_7avgtron_AveragedPerceptron {
  void (*set_scoresC)(struct __pyx_obj_5thinc_6linear_7avgtron_AveragedPerceptron *, __pyx_t_5thinc_8typedefs_weight_t *, struct __pyx_t_5thinc_7structs_FeatureC const *, int);
  int (*updateC)(struct __pyx_obj_5thinc_6linear_7avgtron_AveragedPerceptron *, struct __pyx_t_5thinc_7structs_ExampleC const *);
  int (*update_weight)(struct __pyx_obj_5thinc_6linear_7avgtron_AveragedPerceptron *, __pyx_t_5thinc_8typedefs_feat_t, __pyx_t_5thinc_8typedefs_class_t, __pyx_t_5thinc_8typedefs_weight_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5thinc_6linear_7avgtron_AveragedPerceptron *__pyx_vtabptr_5thinc_6linear_7avgtron_AveragedPerceptron;


/* "linalg.pxd":61
 * 
 * 
 * cdef class Vec:             # <<<<<<<<<<<<<<
 *     @staticmethod
 *     cdef inline int arg_max(const weight_t* scores, const int n_classes) nogil:
 */

struct __pyx_vtabstruct_5thinc_6linalg_Vec {
  int (*arg_max)(__pyx_t_5thinc_6linalg_weight_t const *, int const );
  __pyx_t_5thinc_6linalg_weight_t (*max)(__pyx_t_5thinc_6linalg_weight_t const *, int32_t);
  __pyx_t_5thinc_6linalg_weight_t (*sum)(__pyx_t_5thinc_6linalg_weight_t const *, int32_t);
  void (*add)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
  void (*add_i)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
  void (*mul)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
  void (*mul_i)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const , int32_t);
  void (*pow)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
  void (*pow_i)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const , int32_t);
  void (*div)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
  void (*div_i)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const , int32_t);
  void (*exp)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t);
  void (*exp_i)(__pyx_t_5thinc_6linalg_weight_t *, int32_t);
  void (*reciprocal_i)(__pyx_t_5thinc_6linalg_weight_t *, int32_t);
};
static struct __pyx_vtabstruct_5thinc_6linalg_Vec *__pyx_vtabptr_5thinc_6linalg_Vec;
static CYTHON_INLINE int __pyx_f_5thinc_6linalg_3Vec_arg_max(__pyx_t_5thinc_6linalg_weight_t const *, int const );
static CYTHON_INLINE __pyx_t_5thinc_6linalg_weight_t __pyx_f_5thinc_6linalg_3Vec_max(__pyx_t_5thinc_6linalg_weight_t const *, int32_t);
static CYTHON_INLINE __pyx_t_5thinc_6linalg_weight_t __pyx_f_5thinc_6linalg_3Vec_sum(__pyx_t_5thinc_6linalg_weight_t const *, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_add(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_add_i(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_mul(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_mul_i(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const , int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_pow(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_pow_i(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const , int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_div(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_div_i(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const , int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_exp(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_exp_i(__pyx_t_5thinc_6linalg_weight_t *, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_reciprocal_i(__pyx_t_5thinc_6linalg_weight_t *, int32_t);


/* "linalg.pxd":163
 * 
 * 
 * cdef class VecVec:             # <<<<<<<<<<<<<<
 *     @staticmethod
 *     cdef inline void add(weight_t* output,
 */

struct __pyx_vtabstruct_5thinc_6linalg_VecVec {
  void (*add)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
  void (*add_i)(float *, float const *, float, int32_t);
  void (*add_pow)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
  void (*add_pow_i)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
  void (*mul)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t);
  void (*mul_i)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t);
  __pyx_t_5thinc_6linalg_weight_t (*dot)(__pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t);
  int (*arg_max_if_true)(__pyx_t_5thinc_6linalg_weight_t const *, int const *, int const );
  int (*arg_max_if_zero)(__pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int const );
};
static struct __pyx_vtabstruct_5thinc_6linalg_VecVec *__pyx_vtabptr_5thinc_6linalg_VecVec;
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_add(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_add_i(float *, float const *, float, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_add_pow(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_add_pow_i(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_mul(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_mul_i(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t);
static CYTHON_INLINE __pyx_t_5thinc_6linalg_weight_t __pyx_f_5thinc_6linalg_6VecVec_dot(__pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t);
static CYTHON_INLINE int __pyx_f_5thinc_6linalg_6VecVec_arg_max_if_true(__pyx_t_5thinc_6linalg_weight_t const *, int const *, int const );
static CYTHON_INLINE int __pyx_f_5thinc_6linalg_6VecVec_arg_max_if_zero(__pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int const );


/* "linalg.pxd":247
 * 
 * 
 * cdef class MatVec:             # <<<<<<<<<<<<<<
 *     @staticmethod
 *     cdef inline void mul(weight_t* output,
 */

struct __pyx_vtabstruct_5thinc_6linalg_MatVec {
  void (*mul)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
  void (*mul_i)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
  void (*dot)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
  void (*T_dot)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
};
static struct __pyx_vtabstruct_5thinc_6linalg_MatVec *__pyx_vtabptr_5thinc_6linalg_MatVec;
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatVec_mul(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatVec_mul_i(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatVec_dot(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatVec_T_dot(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);


/* "linalg.pxd":322
 * 
 * 
 * cdef class MatMat:             # <<<<<<<<<<<<<<
 *     @staticmethod
 *     cdef inline void add(weight_t* output,
 */

struct __pyx_vtabstruct_5thinc_6linalg_MatMat {
  void (*add)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
  void (*add_i)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
  void (*mul)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
  void (*mul_i)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
  void (*add_outer_i)(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
};
static struct __pyx_vtabstruct_5thinc_6linalg_MatMat *__pyx_vtabptr_5thinc_6linalg_MatMat;
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_add(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_add_i(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_mul(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_mul_i(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_add_outer_i(__pyx_t_5thinc_6linalg_weight_t *, __pyx_t_5thinc_6linalg_weight_t const *, __pyx_t_5thinc_6linalg_weight_t const *, int32_t, int32_t);


/* "thinc/extra/eg.pxd":14
 * 
 * 
 * cdef class Example:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cdef ExampleC c
 */

struct __pyx_vtabstruct_5thinc_5extra_2eg_Example {
  int (*fill_atoms)(struct __pyx_obj_5thinc_5extra_2eg_Example *, __pyx_t_5thinc_8typedefs_atom_t, int, int __pyx_skip_dispatch);
  int (*fill_features)(struct __pyx_obj_5thinc_5extra_2eg_Example *, int, int, int __pyx_skip_dispatch);
  int (*fill_is_valid)(struct __pyx_obj_5thinc_5extra_2eg_Example *, int, int, int __pyx_skip_dispatch);
  int (*fill_costs)(struct __pyx_obj_5thinc_5extra_2eg_Example *, __pyx_t_5thinc_8typedefs_weight_t, int, int __pyx_skip_dispatch);
  int (*fill_scores)(struct __pyx_obj_5thinc_5extra_2eg_Example *, __pyx_t_5thinc_8typedefs_weight_t, int, int __pyx_skip_dispatch);
  struct __pyx_obj_5thinc_5extra_2eg_Example *(*from_ptr)(struct __pyx_obj_5cymem_5cymem_Pool *, struct __pyx_t_5thinc_7structs_ExampleC *);
  void (*init)(struct __pyx_t_5thinc_7structs_ExampleC *, struct __pyx_obj_5cymem_5cymem_Pool *, PyObject *, PyObject *);
};
static struct __pyx_vtabstruct_5thinc_5extra_2eg_Example *__pyx_vtabptr_5thinc_5extra_2eg_Example;
static CYTHON_INLINE struct __pyx_obj_5thinc_5extra_2eg_Example *__pyx_f_5thinc_5extra_2eg_7Example_from_ptr(struct __pyx_obj_5cymem_5cymem_Pool *, struct __pyx_t_5thinc_7structs_ExampleC *);
static CYTHON_INLINE void __pyx_f_5thinc_5extra_2eg_7Example_init(struct __pyx_t_5thinc_7structs_ExampleC *, struct __pyx_obj_5cymem_5cymem_Pool *, PyObject *, PyObject *);


/* "strings.pxd":18
 * 
 * 
 * cdef class StringStore:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cdef Utf8Str* c
 */

struct __pyx_vtabstruct_5spacy_7strings_StringStore {
  __pyx_t_5spacy_7strings_Utf8Str const *(*intern)(struct __pyx_obj_5spacy_7strings_StringStore *, PyObject *);
  __pyx_t_5spacy_7strings_Utf8Str const *(*_intern_utf8)(struct __pyx_obj_5spacy_7strings_StringStore *, char *, int);
};
static struct __pyx_vtabstruct_5spacy_7strings_StringStore *__pyx_vtabptr_5spacy_7strings_StringStore;


/* "morphology.pxd":24
 * 
 * 
 * cdef class Morphology:             # <<<<<<<<<<<<<<
 *     cdef readonly Pool mem
 *     cdef readonly StringStore strings
 */

struct __pyx_vtabstruct_5spacy_10morphology_Morphology {
  int (*assign_tag)(struct __pyx_obj_5spacy_10morphology_Morphology *, struct __pyx_t_5spacy_7structs_TokenC *, PyObject *);
  int (*assign_feature)(struct __pyx_obj_5spacy_10morphology_Morphology *, uint64_t *, PyObject *, PyObject *);
};
static struct __pyx_vtabstruct_5spacy_10morphology_Morphology *__pyx_vtabptr_5spacy_10morphology_Morphology;


/* "vocab.pxd":27
 * 
 * 
 * cdef class Vocab:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cpdef readonly StringStore strings
 */

struct __pyx_vtabstruct_5spacy_5vocab_Vocab {
  struct __pyx_t_5spacy_7structs_LexemeC const *(*get)(struct __pyx_obj_5spacy_5vocab_Vocab *, struct __pyx_obj_5cymem_5cymem_Pool *, PyObject *);
  struct __pyx_t_5spacy_7structs_LexemeC const *(*get_by_orth)(struct __pyx_obj_5spacy_5vocab_Vocab *, struct __pyx_obj_5cymem_5cymem_Pool *, __pyx_t_5spacy_8typedefs_attr_t);
  struct __pyx_t_5spacy_7structs_TokenC const *(*make_fused_token)(struct __pyx_obj_5spacy_5vocab_Vocab *, PyObject *);
  struct __pyx_t_5spacy_7structs_LexemeC const *(*_new_lexeme)(struct __pyx_obj_5spacy_5vocab_Vocab *, struct __pyx_obj_5cymem_5cymem_Pool *, PyObject *);
  int (*_add_lex_to_vocab)(struct __pyx_obj_5spacy_5vocab_Vocab *, __pyx_t_5spacy_8typedefs_hash_t, struct __pyx_t_5spacy_7structs_LexemeC const *);
};
static struct __pyx_vtabstruct_5spacy_5vocab_Vocab *__pyx_vtabptr_5spacy_5vocab_Vocab;


/* "lexeme.pxd":14
 * cdef LexemeC EMPTY_LEXEME
 * 
 * cdef class Lexeme:             # <<<<<<<<<<<<<<
 *     cdef LexemeC* c
 *     cdef readonly Vocab vocab
 */

struct __pyx_vtabstruct_5spacy_6lexeme_Lexeme {
  struct __pyx_obj_5spacy_6lexeme_Lexeme *(*from_ptr)(struct __pyx_t_5spacy_7structs_LexemeC *, struct __pyx_obj_5spacy_5vocab_Vocab *, int);
  void (*set_struct_attr)(struct __pyx_t_5spacy_7structs_LexemeC *, enum __pyx_t_5spacy_5attrs_attr_id_t, __pyx_t_5spacy_8typedefs_attr_t);
  __pyx_t_5spacy_8typedefs_attr_t (*get_struct_attr)(struct __pyx_t_5spacy_7structs_LexemeC const *, enum __pyx_t_5spacy_5attrs_attr_id_t);
  int (*c_check_flag)(struct __pyx_t_5spacy_7structs_LexemeC const *, enum __pyx_t_5spacy_5attrs_attr_id_t);
  int (*c_set_flag)(struct __pyx_t_5spacy_7structs_LexemeC *, enum __pyx_t_5spacy_5attrs_attr_id_t, int);
};
static struct __pyx_vtabstruct_5spacy_6lexeme_Lexeme *__pyx_vtabptr_5spacy_6lexeme_Lexeme;
static CYTHON_INLINE struct __pyx_obj_5spacy_6lexeme_Lexeme *__pyx_f_5spacy_6lexeme_6Lexeme_from_ptr(struct __pyx_t_5spacy_7structs_LexemeC *, struct __pyx_obj_5spacy_5vocab_Vocab *, int);
static CYTHON_INLINE void __pyx_f_5spacy_6lexeme_6Lexeme_set_struct_attr(struct __pyx_t_5spacy_7structs_LexemeC *, enum __pyx_t_5spacy_5attrs_attr_id_t, __pyx_t_5spacy_8typedefs_attr_t);
static CYTHON_INLINE __pyx_t_5spacy_8typedefs_attr_t __pyx_f_5spacy_6lexeme_6Lexeme_get_struct_attr(struct __pyx_t_5spacy_7structs_LexemeC const *, enum __pyx_t_5spacy_5attrs_attr_id_t);
static CYTHON_INLINE int __pyx_f_5spacy_6lexeme_6Lexeme_c_check_flag(struct __pyx_t_5spacy_7structs_LexemeC const *, enum __pyx_t_5spacy_5attrs_attr_id_t);
static CYTHON_INLINE int __pyx_f_5spacy_6lexeme_6Lexeme_c_set_flag(struct __pyx_t_5spacy_7structs_LexemeC *, enum __pyx_t_5spacy_5attrs_attr_id_t, int);


/* "stateclass.pxd":12
 * 
 * 
 * cdef class StateClass:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cdef StateC* c
 */

struct __pyx_vtabstruct_5spacy_6syntax_10stateclass_StateClass {
  struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *(*init)(struct __pyx_t_5spacy_7structs_TokenC const *, int);
  int (*S)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
  int (*B)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
  struct __pyx_t_5spacy_7structs_TokenC const *(*S_)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
  struct __pyx_t_5spacy_7structs_TokenC const *(*B_)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
  struct __pyx_t_5spacy_7structs_TokenC const *(*H_)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
  struct __pyx_t_5spacy_7structs_TokenC const *(*E_)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
  struct __pyx_t_5spacy_7structs_TokenC const *(*L_)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int, int);
  struct __pyx_t_5spacy_7structs_TokenC const *(*R_)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int, int);
  struct __pyx_t_5spacy_7structs_TokenC const *(*safe_get)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
  int (*H)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
  int (*E)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
  int (*L)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int, int);
  int (*R)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int, int);
  int (*empty)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
  int (*eol)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
  int (*at_break)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
  int (*is_final)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
  int (*has_head)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
  int (*n_L)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
  int (*n_R)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
  int (*stack_is_connected)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
  int (*entity_is_open)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
  int (*stack_depth)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
  int (*buffer_length)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
  void (*push)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
  void (*pop)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
  void (*unshift)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
  void (*add_arc)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int, int, int);
  void (*del_arc)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int, int);
  void (*open_ent)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
  void (*close_ent)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
  void (*set_ent_tag)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int, int, int);
  void (*set_break)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
  void (*clone)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
  void (*fast_forward)(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
};
static struct __pyx_vtabstruct_5spacy_6syntax_10stateclass_StateClass *__pyx_vtabptr_5spacy_6syntax_10stateclass_StateClass;
static CYTHON_INLINE struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_init(struct __pyx_t_5spacy_7structs_TokenC const *, int);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_S(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_B(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_S_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_B_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_H_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_E_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_L_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int, int);
static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_R_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int, int);
static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_safe_get(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_H(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_E(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_L(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int, int);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_R(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int, int);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_empty(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_eol(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_at_break(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_is_final(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_has_head(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_n_L(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_n_R(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_stack_is_connected(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_entity_is_open(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_stack_depth(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_buffer_length(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_push(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_pop(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_unshift(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_add_arc(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int, int, int);
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_del_arc(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int, int);
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_open_ent(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_close_ent(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_set_ent_tag(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int, int, int);
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_set_break(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, int);
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_clone(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_fast_forward(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *);


/* "transition_system.pxd":32
 * 
 * 
 * cdef class TransitionSystem:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cdef StringStore strings
 */

struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem {
  int (*initialize_state)(struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem *, __pyx_t_5spacy_6syntax_6_state_StateC *);
  int (*finalize_state)(struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem *, __pyx_t_5spacy_6syntax_6_state_StateC *);
  int (*preprocess_gold)(struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem *, struct __pyx_obj_5spacy_4gold_GoldParse *);
  struct __pyx_t_5spacy_6syntax_17transition_system_Transition (*lookup_transition)(struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem *, PyObject *);
  struct __pyx_t_5spacy_6syntax_17transition_system_Transition (*init_transition)(struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem *, int, int, int);
  int (*set_valid)(struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem *, int *, __pyx_t_5spacy_6syntax_6_state_StateC const *);
  int (*set_costs)(struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem *, int *, __pyx_t_5thinc_8typedefs_weight_t *, struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *, struct __pyx_obj_5spacy_4gold_GoldParse *);
};
static struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem *__pyx_vtabptr_5spacy_6syntax_17transition_system_TransitionSystem;


/* "arc_eager.pxd":11
 * 
 * 
 * cdef class ArcEager(TransitionSystem):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */

struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_ArcEager {
  struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem __pyx_base;
};
static struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_ArcEager *__pyx_vtabptr_5spacy_6syntax_9arc_eager_ArcEager;


/* "preshed/counter.pxd":13
 * 
 * 
 * cdef class PreshCounter:             # <<<<<<<<<<<<<<
 *     cdef Pool mem
 *     cdef MapStruct* c_map
 */

struct __pyx_vtabstruct_7preshed_7counter_PreshCounter {
  int (*inc)(struct __pyx_obj_7preshed_7counter_PreshCounter *, __pyx_t_7preshed_4maps_key_t, __pyx_t_7preshed_7counter_count_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_7preshed_7counter_PreshCounter *__pyx_vtabptr_7preshed_7counter_PreshCounter;


/* "tokens/doc.pxd":28
 * 
 * 
 * cdef class Doc:             # <<<<<<<<<<<<<<
 *     cdef readonly Pool mem
 *     cdef readonly Vocab vocab
 */

struct __pyx_vtabstruct_5spacy_6tokens_3doc_Doc {
  PyArrayObject *(*to_array)(struct __pyx_obj_5spacy_6tokens_3doc_Doc *, PyObject *, int __pyx_skip_dispatch);
  void (*set_parse)(struct __pyx_obj_5spacy_6tokens_3doc_Doc *, struct __pyx_t_5spacy_7structs_TokenC const *);
  int (*__pyx_fuse_0push_back)(struct __pyx_obj_5spacy_6tokens_3doc_Doc *, __pyx_t_5spacy_6tokens_3doc_const_Lexeme_ptr, int);
  int (*__pyx_fuse_1push_back)(struct __pyx_obj_5spacy_6tokens_3doc_Doc *, __pyx_t_5spacy_6tokens_3doc_const_TokenC_ptr, int);
};
static struct __pyx_vtabstruct_5spacy_6tokens_3doc_Doc *__pyx_vtabptr_5spacy_6tokens_3doc_Doc;


/* "spacy/syntax/parser.pyx":70
 * 
 * 
 * cdef class ParserModel(AveragedPerceptron):             # <<<<<<<<<<<<<<
 *     cdef void set_featuresC(self, ExampleC* eg, const StateC* state) nogil:
 *         fill_context(eg.atoms, state)
 */

struct __pyx_vtabstruct_5spacy_6syntax_6parser_ParserModel {
  struct __pyx_vtabstruct_5thinc_6linear_7avgtron_AveragedPerceptron __pyx_base;
  void (*set_featuresC)(struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *, struct __pyx_t_5thinc_7structs_ExampleC *, __pyx_t_5spacy_6syntax_6_state_StateC const *);
};
static struct __pyx_vtabstruct_5spacy_6syntax_6parser_ParserModel *__pyx_vtabptr_5spacy_6syntax_6parser_ParserModel;


/* "spacy/syntax/parser.pyx":76
 * 
 * 
 * cdef class Parser:             # <<<<<<<<<<<<<<
 *     @classmethod
 *     def load(cls, path, Vocab vocab, TransitionSystem=None, require=False):
 */

struct __pyx_vtabstruct_5spacy_6syntax_6parser_Parser {
  int (*parseC)(struct __pyx_obj_5spacy_6syntax_6parser_Parser *, struct __pyx_t_5spacy_7structs_TokenC *, int, int, int);
};
static struct __pyx_vtabstruct_5spacy_6syntax_6parser_Parser *__pyx_vtabptr_5spacy_6syntax_6parser_Parser;

/* --- Runtime support code (head) --- */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

static PyObject *__Pyx_GetBuiltinName(PyObject *name);

static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);

#include <string.h>

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return __Pyx_PyObject_GetAttrStr(obj, attr_name);
#endif
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#else
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

static CYTHON_INLINE int __Pyx_IterFinish(void);

static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);

static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2,
                                             int is_tuple, int has_known_size, int decref_tuple);

static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping);

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);

#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args))
                PyErr_SetObject(PyExc_KeyError, args);
            Py_XDECREF(args);
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#else
    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#endif

static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

#define __Pyx_tp_new(type_obj, args) __Pyx_tp_new_kwargs(type_obj, args, NULL)
static CYTHON_INLINE PyObject* __Pyx_tp_new_kwargs(PyObject* type_obj, PyObject* args, PyObject* kwargs) {
    return (PyObject*) (((PyTypeObject*)type_obj)->tp_new((PyTypeObject*)type_obj, args, kwargs));
}

static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);

static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);

static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);

static void* __Pyx_GetVtable(PyObject *dict);

static int __Pyx_SetVtable(PyObject *dict, void *vtable);

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name);

static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

#define __Pyx_CyFunction_USED 1
#include <structmember.h>
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f)\
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(void);

static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

typedef struct {
    int code_line;
    PyCodeObject* code_object;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

#include "descrobject.h"
static PyObject* __Pyx_Method_ClassMethod(PyObject *method);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #define __Pyx_CREAL(z) ((z).real())
    #define __Pyx_CIMAG(z) ((z).imag())
  #else
    #define __Pyx_CREAL(z) (__real__(z))
    #define __Pyx_CIMAG(z) (__imag__(z))
  #endif
#else
    #define __Pyx_CREAL(z) ((z).real)
    #define __Pyx_CIMAG(z) ((z).imag)
#endif
#if (defined(_WIN32) || defined(__clang__)) && defined(__cplusplus) && CYTHON_CCOMPLEX
    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif

static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

#if CYTHON_CCOMPLEX
    #define __Pyx_c_eqf(a, b)   ((a)==(b))
    #define __Pyx_c_sumf(a, b)  ((a)+(b))
    #define __Pyx_c_difff(a, b) ((a)-(b))
    #define __Pyx_c_prodf(a, b) ((a)*(b))
    #define __Pyx_c_quotf(a, b) ((a)/(b))
    #define __Pyx_c_negf(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zerof(z) ((z)==(float)0)
    #define __Pyx_c_conjf(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_absf(z)     (::std::abs(z))
        #define __Pyx_c_powf(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zerof(z) ((z)==0)
    #define __Pyx_c_conjf(z)    (conjf(z))
    #if 1
        #define __Pyx_c_absf(z)     (cabsf(z))
        #define __Pyx_c_powf(a, b)  (cpowf(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex);
    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex);
    #if 1
        static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex);
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex);
    #endif
#endif

static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);

#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq(a, b)   ((a)==(b))
    #define __Pyx_c_sum(a, b)  ((a)+(b))
    #define __Pyx_c_diff(a, b) ((a)-(b))
    #define __Pyx_c_prod(a, b) ((a)*(b))
    #define __Pyx_c_quot(a, b) ((a)/(b))
    #define __Pyx_c_neg(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero(z) ((z)==(double)0)
    #define __Pyx_c_conj(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs(z)     (::std::abs(z))
        #define __Pyx_c_pow(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero(z) ((z)==0)
    #define __Pyx_c_conj(z)    (conj(z))
    #if 1
        #define __Pyx_c_abs(z)     (cabs(z))
        #define __Pyx_c_pow(a, b)  (cpow(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex);
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex);
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex);
    #endif
#endif

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value);

static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);

static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyObject *);
typedef struct {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject *type, __pyx_coroutine_body_t body,
                                                   PyObject *closure, PyObject *name, PyObject *qualname);
static int __Pyx_Coroutine_clear(PyObject *self);
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
#endif

static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

static int __Pyx_patch_abc(void);

#define __Pyx_Generator_USED
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_New(body, closure, name, qualname)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(void);

static int __Pyx_check_binary_version(void);

#if !defined(__Pyx_PyIdentifier_FromString)
#if PY_MAJOR_VERSION < 3
  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#else
  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#endif
#endif

static PyObject *__Pyx_ImportModule(const char *name);

static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);

static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig);

static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig);

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

static void __pyx_f_5spacy_6syntax_6parser_11ParserModel_set_featuresC(struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *__pyx_v_self, struct __pyx_t_5thinc_7structs_ExampleC *__pyx_v_eg, __pyx_t_5spacy_6syntax_6_state_StateC const *__pyx_v_state); /* proto*/
static int __pyx_f_5spacy_6syntax_6parser_6Parser_parseC(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, struct __pyx_t_5spacy_7structs_TokenC *__pyx_v_tokens, int __pyx_v_length, int __pyx_v_nr_feat, int __pyx_v_nr_class); /* proto*/
static CYTHON_INLINE int __pyx_f_5thinc_6linalg_3Vec_arg_max(__pyx_t_5thinc_6linalg_weight_t const *__pyx_v_scores, int const __pyx_v_n_classes); /* proto*/
static CYTHON_INLINE __pyx_t_5thinc_6linalg_weight_t __pyx_f_5thinc_6linalg_3Vec_max(__pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE __pyx_t_5thinc_6linalg_weight_t __pyx_f_5thinc_6linalg_3Vec_sum(__pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_add(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t __pyx_v_inc, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_add_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_vec, __pyx_t_5thinc_6linalg_weight_t __pyx_v_inc, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_mul(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, __pyx_t_5thinc_6linalg_weight_t __pyx_v_scal, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_mul_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_vec, __pyx_t_5thinc_6linalg_weight_t const __pyx_v_scal, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_pow(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, __pyx_t_5thinc_6linalg_weight_t __pyx_v_scal, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_pow_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_vec, __pyx_t_5thinc_6linalg_weight_t const __pyx_v_scal, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_div(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, __pyx_t_5thinc_6linalg_weight_t __pyx_v_scal, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_div_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_vec, __pyx_t_5thinc_6linalg_weight_t const __pyx_v_scal, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_exp(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_exp_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_vec, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_reciprocal_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_vec, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_add(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, __pyx_t_5thinc_6linalg_weight_t __pyx_v_scale, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_add_i(float *__pyx_v_x, float const *__pyx_v_y, float __pyx_v_scale, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_add_pow(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, __pyx_t_5thinc_6linalg_weight_t __pyx_v_power, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_add_pow_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, __pyx_t_5thinc_6linalg_weight_t __pyx_v_power, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_mul(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_mul_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE __pyx_t_5thinc_6linalg_weight_t __pyx_f_5thinc_6linalg_6VecVec_dot(__pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr); /* proto*/
static CYTHON_INLINE int __pyx_f_5thinc_6linalg_6VecVec_arg_max_if_true(__pyx_t_5thinc_6linalg_weight_t const *__pyx_v_scores, int const *__pyx_v_is_valid, int const __pyx_v_n_classes); /* proto*/
static CYTHON_INLINE int __pyx_f_5thinc_6linalg_6VecVec_arg_max_if_zero(__pyx_t_5thinc_6linalg_weight_t const *__pyx_v_scores, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_costs, int const __pyx_v_n_classes); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatVec_mul(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_mat, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatVec_mul_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_mat, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatVec_dot(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_mat, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatVec_T_dot(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_mat, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_add(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_add_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_mul(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_mul_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_add_outer_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_mat, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col); /* proto*/
static CYTHON_INLINE struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_init(struct __pyx_t_5spacy_7structs_TokenC const *__pyx_v_sent, int __pyx_v_length); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_S(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_B(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i); /* proto*/
static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_S_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i); /* proto*/
static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_B_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i); /* proto*/
static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_H_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i); /* proto*/
static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_E_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i); /* proto*/
static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_L_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i, int __pyx_v_idx); /* proto*/
static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_R_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i, int __pyx_v_idx); /* proto*/
static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_safe_get(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_H(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_E(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_L(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i, int __pyx_v_idx); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_R(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i, int __pyx_v_idx); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_empty(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_eol(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_at_break(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_is_final(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_has_head(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_n_L(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_n_R(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_stack_is_connected(CYTHON_UNUSED struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_entity_is_open(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_stack_depth(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_buffer_length(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self); /* proto*/
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_push(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self); /* proto*/
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_pop(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self); /* proto*/
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_unshift(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self); /* proto*/
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_add_arc(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_head, int __pyx_v_child, int __pyx_v_label); /* proto*/
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_del_arc(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_head, int __pyx_v_child); /* proto*/
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_open_ent(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_label); /* proto*/
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_close_ent(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self); /* proto*/
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_set_ent_tag(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i, int __pyx_v_ent_iob, int __pyx_v_ent_type); /* proto*/
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_set_break(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i); /* proto*/
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_clone(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_src); /* proto*/
static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_fast_forward(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self); /* proto*/
static CYTHON_INLINE struct __pyx_obj_5spacy_6lexeme_Lexeme *__pyx_f_5spacy_6lexeme_6Lexeme_from_ptr(struct __pyx_t_5spacy_7structs_LexemeC *__pyx_v_lex, struct __pyx_obj_5spacy_5vocab_Vocab *__pyx_v_vocab, CYTHON_UNUSED int __pyx_v_vector_length); /* proto*/
static CYTHON_INLINE void __pyx_f_5spacy_6lexeme_6Lexeme_set_struct_attr(struct __pyx_t_5spacy_7structs_LexemeC *__pyx_v_lex, enum __pyx_t_5spacy_5attrs_attr_id_t __pyx_v_name, __pyx_t_5spacy_8typedefs_attr_t __pyx_v_value); /* proto*/
static CYTHON_INLINE __pyx_t_5spacy_8typedefs_attr_t __pyx_f_5spacy_6lexeme_6Lexeme_get_struct_attr(struct __pyx_t_5spacy_7structs_LexemeC const *__pyx_v_lex, enum __pyx_t_5spacy_5attrs_attr_id_t __pyx_v_feat_name); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6lexeme_6Lexeme_c_check_flag(struct __pyx_t_5spacy_7structs_LexemeC const *__pyx_v_lexeme, enum __pyx_t_5spacy_5attrs_attr_id_t __pyx_v_flag_id); /* proto*/
static CYTHON_INLINE int __pyx_f_5spacy_6lexeme_6Lexeme_c_set_flag(struct __pyx_t_5spacy_7structs_LexemeC *__pyx_v_lex, enum __pyx_t_5spacy_5attrs_attr_id_t __pyx_v_flag_id, int __pyx_v_value); /* proto*/
static CYTHON_INLINE struct __pyx_obj_5thinc_5extra_2eg_Example *__pyx_f_5thinc_5extra_2eg_7Example_from_ptr(struct __pyx_obj_5cymem_5cymem_Pool *__pyx_v_mem, struct __pyx_t_5thinc_7structs_ExampleC *__pyx_v_ptr); /* proto*/
static CYTHON_INLINE void __pyx_f_5thinc_5extra_2eg_7Example_init(CYTHON_UNUSED struct __pyx_t_5thinc_7structs_ExampleC *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_5cymem_5cymem_Pool *__pyx_v_mem, CYTHON_UNUSED PyObject *__pyx_v_model_shape, CYTHON_UNUSED PyObject *__pyx_v_blocks_per_layer); /* proto*/

/* Module declarations from 'cymem.cymem' */
static PyTypeObject *__pyx_ptype_5cymem_5cymem_Pool = 0;
static PyTypeObject *__pyx_ptype_5cymem_5cymem_Address = 0;

/* Module declarations from 'libc.stdint' */

/* Module declarations from 'preshed.maps' */
static PyTypeObject *__pyx_ptype_7preshed_4maps_PreshMap = 0;
static PyTypeObject *__pyx_ptype_7preshed_4maps_PreshMapArray = 0;
static void *(*__pyx_f_7preshed_4maps_map_get)(struct __pyx_t_7preshed_4maps_MapStruct const *, __pyx_t_7preshed_4maps_key_t const ); /*proto*/
static void (*__pyx_f_7preshed_4maps_map_set)(struct __pyx_obj_5cymem_5cymem_Pool *, struct __pyx_t_7preshed_4maps_MapStruct *, __pyx_t_7preshed_4maps_key_t, void *); /*proto*/
static void (*__pyx_f_7preshed_4maps_map_init)(struct __pyx_obj_5cymem_5cymem_Pool *, struct __pyx_t_7preshed_4maps_MapStruct *, size_t); /*proto*/

/* Module declarations from 'thinc.typedefs' */

/* Module declarations from 'thinc.structs' */

/* Module declarations from 'thinc.linear.features' */
static PyTypeObject *__pyx_ptype_5thinc_6linear_8features_ConjunctionExtracter = 0;

/* Module declarations from 'thinc.linear.avgtron' */
static PyTypeObject *__pyx_ptype_5thinc_6linear_7avgtron_AveragedPerceptron = 0;

/* Module declarations from 'libc.math' */

/* Module declarations from 'libc.string' */

/* Module declarations from 'cython' */

/* Module declarations from 'thinc.linalg' */
static PyTypeObject *__pyx_ptype_5thinc_6linalg_Matrix = 0;
static PyTypeObject *__pyx_ptype_5thinc_6linalg_Vec = 0;
static PyTypeObject *__pyx_ptype_5thinc_6linalg_VecVec = 0;
static PyTypeObject *__pyx_ptype_5thinc_6linalg_MatVec = 0;
static PyTypeObject *__pyx_ptype_5thinc_6linalg_MatMat = 0;

/* Module declarations from 'thinc.extra.eg' */
static PyTypeObject *__pyx_ptype_5thinc_5extra_2eg_Example = 0;

/* Module declarations from 'spacy.typedefs' */

/* Module declarations from 'spacy' */

/* Module declarations from 'spacy.symbols' */

/* Module declarations from 'spacy.parts_of_speech' */

/* Module declarations from 'spacy.structs' */

/* Module declarations from 'libcpp.vector' */

/* Module declarations from 'murmurhash.mrmr' */
static uint64_t (*__pyx_f_10murmurhash_4mrmr_hash64)(void *, int, uint64_t); /*proto*/

/* Module declarations from 'spacy.strings' */
static PyTypeObject *__pyx_ptype_5spacy_7strings_StringStore = 0;

/* Module declarations from 'spacy.morphology' */
static PyTypeObject *__pyx_ptype_5spacy_10morphology_Morphology = 0;

/* Module declarations from 'spacy.vocab' */
static PyTypeObject *__pyx_ptype_5spacy_5vocab_Vocab = 0;
static struct __pyx_t_5spacy_7structs_LexemeC *__pyx_vp_5spacy_5vocab_EMPTY_LEXEME = 0;
#define __pyx_v_5spacy_5vocab_EMPTY_LEXEME (*__pyx_vp_5spacy_5vocab_EMPTY_LEXEME)

/* Module declarations from 'libc.stdlib' */

/* Module declarations from 'spacy.attrs' */

/* Module declarations from 'cpython.buffer' */

/* Module declarations from 'libc.stdio' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;

/* Module declarations from 'cpython' */

/* Module declarations from 'cpython.object' */

/* Module declarations from 'cpython.ref' */

/* Module declarations from 'numpy' */

/* Module declarations from 'numpy' */
static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/

/* Module declarations from 'spacy.lexeme' */
static PyTypeObject *__pyx_ptype_5spacy_6lexeme_Lexeme = 0;
static struct __pyx_t_5spacy_7structs_LexemeC *__pyx_vp_5spacy_6lexeme_EMPTY_LEXEME = 0;
#define __pyx_v_5spacy_6lexeme_EMPTY_LEXEME (*__pyx_vp_5spacy_6lexeme_EMPTY_LEXEME)

/* Module declarations from 'spacy.syntax._state' */
static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_space_token(struct __pyx_t_5spacy_7structs_TokenC const *); /*proto*/

/* Module declarations from 'spacy.syntax.stateclass' */
static PyTypeObject *__pyx_ptype_5spacy_6syntax_10stateclass_StateClass = 0;

/* Module declarations from 'spacy.gold' */
static PyTypeObject *__pyx_ptype_5spacy_4gold_GoldParse = 0;

/* Module declarations from 'spacy.syntax.transition_system' */
static PyTypeObject *__pyx_ptype_5spacy_6syntax_17transition_system_TransitionSystem = 0;

/* Module declarations from 'spacy.syntax.arc_eager' */
static PyTypeObject *__pyx_ptype_5spacy_6syntax_9arc_eager_ArcEager = 0;

/* Module declarations from 'preshed.counter' */
static PyTypeObject *__pyx_ptype_7preshed_7counter_PreshCounter = 0;

/* Module declarations from 'spacy.tokens.doc' */
static PyTypeObject *__pyx_ptype_5spacy_6tokens_3doc_Doc = 0;

/* Module declarations from 'cpython.exc' */

/* Module declarations from 'spacy.syntax._parse_features' */
static int (*__pyx_f_5spacy_6syntax_15_parse_features_fill_context)(__pyx_t_5thinc_8typedefs_atom_t *, __pyx_t_5spacy_6syntax_6_state_StateC const *); /*proto*/

/* Module declarations from 'spacy.syntax.parser' */
static PyTypeObject *__pyx_ptype_5spacy_6syntax_6parser_ParserModel = 0;
static PyTypeObject *__pyx_ptype_5spacy_6syntax_6parser_Parser = 0;
static PyTypeObject *__pyx_ptype_5spacy_6syntax_6parser_StepwiseState = 0;
static PyTypeObject *__pyx_ptype_5spacy_6syntax_6parser___pyx_scope_struct__pipe = 0;
static int __pyx_f_5spacy_6syntax_6parser__arg_max_clas(__pyx_t_5thinc_8typedefs_weight_t const *, int, struct __pyx_t_5spacy_6syntax_17transition_system_Transition const *, int); /*proto*/
#define __Pyx_MODULE_NAME "spacy.syntax.parser"
int __pyx_module_is_main_spacy__syntax__parser = 0;

/* Implementation of 'spacy.syntax.parser' */
static PyObject *__pyx_builtin_property;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_IOError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_NotImplementedError;
static char __pyx_k_B[] = "B";
static char __pyx_k_D[] = "D";
static char __pyx_k_H[] = "H";
static char __pyx_k_I[] = "I";
static char __pyx_k_L[] = "L";
static char __pyx_k_O[] = "O";
static char __pyx_k_Q[] = "Q";
static char __pyx_k_R[] = "R";
static char __pyx_k_S[] = "S";
static char __pyx_k_b[] = "b";
static char __pyx_k_d[] = "d";
static char __pyx_k_f[] = "f";
static char __pyx_k_g[] = "g";
static char __pyx_k_h[] = "h";
static char __pyx_k_i[] = "i";
static char __pyx_k_l[] = "l";
static char __pyx_k_q[] = "q";
static char __pyx_k_Zd[] = "Zd";
static char __pyx_k_Zf[] = "Zf";
static char __pyx_k_Zg[] = "Zg";
static char __pyx_k__5[] = "_";
static char __pyx_k_os[] = "os";
static char __pyx_k_pf[] = "pf";
static char __pyx_k__12[] = "";
static char __pyx_k_doc[] = "doc";
static char __pyx_k_get[] = "get";
static char __pyx_k_ner[] = "ner";
static char __pyx_k_pop[] = "pop";
static char __pyx_k_sys[] = "sys";
static char __pyx_k_val[] = "val";
static char __pyx_k_args[] = "args";
static char __pyx_k_deps[] = "deps";
static char __pyx_k_exit[] = "__exit__";
static char __pyx_k_gold[] = "gold";
static char __pyx_k_init[] = "__init__";
static char __pyx_k_json[] = "json";
static char __pyx_k_load[] = "load";
static char __pyx_k_main[] = "__main__";
static char __pyx_k_name[] = "name";
static char __pyx_k_open[] = "open";
static char __pyx_k_path[] = "path";
static char __pyx_k_pipe[] = "pipe";
static char __pyx_k_self[] = "self";
static char __pyx_k_send[] = "send";
static char __pyx_k_tags[] = "tags";
static char __pyx_k_test[] = "__test__";
static char __pyx_k_text[] = "text";
static char __pyx_k_type[] = "type";
static char __pyx_k_util[] = "util";
static char __pyx_k_DEBUG[] = "DEBUG";
static char __pyx_k_close[] = "close";
static char __pyx_k_costs[] = "costs";
static char __pyx_k_debug[] = "debug";
static char __pyx_k_doc_2[] = "__doc__";
static char __pyx_k_embed[] = "embed";
static char __pyx_k_enter[] = "__enter__";
static char __pyx_k_guess[] = "guess";
static char __pyx_k_heads[] = "heads";
static char __pyx_k_items[] = "items";
static char __pyx_k_model[] = "model";
static char __pyx_k_n0_n1[] = "n0_n1";
static char __pyx_k_queue[] = "queue";
static char __pyx_k_range[] = "range";
static char __pyx_k_reset[] = "reset";
static char __pyx_k_s0_n0[] = "s0_n0";
static char __pyx_k_s0_n1[] = "s0_n1";
static char __pyx_k_s1_n0[] = "s1_n0";
static char __pyx_k_s1_s0[] = "s1_s0";
static char __pyx_k_stack[] = "stack";
static char __pyx_k_throw[] = "throw";
static char __pyx_k_value[] = "value";
static char __pyx_k_vocab[] = "vocab";
static char __pyx_k_words[] = "words";
static char __pyx_k_Config[] = "Config";
static char __pyx_k_exists[] = "exists";
static char __pyx_k_finish[] = "finish";
static char __pyx_k_import[] = "__import__";
static char __pyx_k_labels[] = "labels";
static char __pyx_k_module[] = "__module__";
static char __pyx_k_parser[] = "parser";
static char __pyx_k_shutil[] = "shutil";
static char __pyx_k_stream[] = "stream";
static char __pyx_k_tokens[] = "tokens";
static char __pyx_k_IOError[] = "IOError";
static char __pyx_k_actions[] = "actions";
static char __pyx_k_nonproj[] = "nonproj";
static char __pyx_k_nr_atom[] = "nr_atom";
static char __pyx_k_nr_feat[] = "nr_feat";
static char __pyx_k_os_path[] = "os.path";
static char __pyx_k_predict[] = "predict";
static char __pyx_k_prepare[] = "__prepare__";
static char __pyx_k_require[] = "require";
static char __pyx_k_features[] = "features";
static char __pyx_k_is_final[] = "is_final";
static char __pyx_k_nr_class[] = "nr_class";
static char __pyx_k_property[] = "property";
static char __pyx_k_qualname[] = "__qualname__";
static char __pyx_k_sequence[] = "sequence";
static char __pyx_k_trigrams[] = "trigrams";
static char __pyx_k_unigrams[] = "unigrams";
static char __pyx_k_metaclass[] = "__metaclass__";
static char __pyx_k_move_name[] = "move_name";
static char __pyx_k_n_threads[] = "n_threads";
static char __pyx_k_set_debug[] = "set_debug";
static char __pyx_k_traceback[] = "traceback";
static char __pyx_k_ValueError[] = "ValueError";
static char __pyx_k_add_action[] = "add_action";
static char __pyx_k_batch_size[] = "batch_size";
static char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static char __pyx_k_startswith[] = "startswith";
static char __pyx_k_transition[] = "transition";
static char __pyx_k_tree_shape[] = "tree_shape";
static char __pyx_k_OracleError[] = "OracleError";
static char __pyx_k_Parser_pipe[] = "Parser.pipe";
static char __pyx_k_action_name[] = "action_name";
static char __pyx_k_config_json[] = "config.json";
static char __pyx_k_get_actions[] = "get_actions";
static char __pyx_k_RuntimeError[] = "RuntimeError";
static char __pyx_k_action_types[] = "action_types";
static char __pyx_k_finalize_doc[] = "finalize_doc";
static char __pyx_k_step_through[] = "step_through";
static char __pyx_k_get_templates[] = "get_templates";
static char __pyx_k_parse_features[] = "_parse_features";
static char __pyx_k_ParserStateError[] = "ParserStateError";
static char __pyx_k_TransitionSystem[] = "TransitionSystem";
static char __pyx_k_feature_templates[] = "feature_templates";
static char __pyx_k_transition_system[] = "transition_system";
static char __pyx_k_PseudoProjectivity[] = "PseudoProjectivity";
static char __pyx_k_NotImplementedError[] = "NotImplementedError";
static char __pyx_k_spacy_syntax_parser[] = "spacy.syntax.parser";
static char __pyx_k_ParserStateError___init[] = "ParserStateError.__init__";
static char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
static char __pyx_k_MALT_style_dependency_parser[] = "\nMALT-style dependency parser\n";
static char __pyx_k_home_pixie_repos_bdist_builder[] = "/home/pixie/repos/bdist-builder/spaCy/spacy/syntax/parser.pyx";
static char __pyx_k_Required_file_s_model_not_found[] = "Required file %s/model not found when loading";
static char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
static char __pyx_k_Error_analysing_doc_no_valid_act[] = "Error analysing doc -- no valid actions available. This should never happen, so please report the error on the issue tracker. Here's the thread to do so --- reopen it if it's closed:\nhttps://github.com/spacy-io/spaCy/issues/429\nPlease include the text that the parser failed on, which is:\n%s";
static char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
static char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
static PyObject *__pyx_n_s_Config;
static PyObject *__pyx_n_u_D;
static PyObject *__pyx_n_s_DEBUG;
static PyObject *__pyx_kp_u_Error_analysing_doc_no_valid_act;
static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
static PyObject *__pyx_n_s_IOError;
static PyObject *__pyx_n_u_L;
static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_n_s_OracleError;
static PyObject *__pyx_n_s_ParserStateError;
static PyObject *__pyx_n_s_ParserStateError___init;
static PyObject *__pyx_n_s_Parser_pipe;
static PyObject *__pyx_n_s_PseudoProjectivity;
static PyObject *__pyx_n_u_R;
static PyObject *__pyx_kp_u_Required_file_s_model_not_found;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_u_S;
static PyObject *__pyx_n_s_TransitionSystem;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s__12;
static PyObject *__pyx_n_u__5;
static PyObject *__pyx_n_s_action_name;
static PyObject *__pyx_n_s_action_types;
static PyObject *__pyx_n_u_actions;
static PyObject *__pyx_n_s_add_action;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_batch_size;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_kp_u_config_json;
static PyObject *__pyx_n_s_costs;
static PyObject *__pyx_n_u_debug;
static PyObject *__pyx_n_s_deps;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_doc_2;
static PyObject *__pyx_n_u_embed;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_exists;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_feature_templates;
static PyObject *__pyx_n_u_features;
static PyObject *__pyx_n_s_finalize_doc;
static PyObject *__pyx_n_s_finish;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_get_actions;
static PyObject *__pyx_n_s_get_templates;
static PyObject *__pyx_n_s_gold;
static PyObject *__pyx_n_s_guess;
static PyObject *__pyx_n_s_heads;
static PyObject *__pyx_kp_s_home_pixie_repos_bdist_builder;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_is_final;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_json;
static PyObject *__pyx_n_s_labels;
static PyObject *__pyx_n_u_labels;
static PyObject *__pyx_n_s_load;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_model;
static PyObject *__pyx_n_u_model;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_move_name;
static PyObject *__pyx_n_s_n0_n1;
static PyObject *__pyx_n_s_n_threads;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
static PyObject *__pyx_n_s_ner;
static PyObject *__pyx_n_u_ner;
static PyObject *__pyx_n_s_nonproj;
static PyObject *__pyx_n_s_nr_atom;
static PyObject *__pyx_n_s_nr_class;
static PyObject *__pyx_n_s_nr_feat;
static PyObject *__pyx_n_s_open;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_os_path;
static PyObject *__pyx_n_s_parse_features;
static PyObject *__pyx_n_s_parser;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_pf;
static PyObject *__pyx_n_s_pipe;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_predict;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_property;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_queue;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_require;
static PyObject *__pyx_n_s_reset;
static PyObject *__pyx_n_s_s0_n0;
static PyObject *__pyx_n_s_s0_n1;
static PyObject *__pyx_n_s_s1_n0;
static PyObject *__pyx_n_s_s1_s0;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_sequence;
static PyObject *__pyx_n_s_set_debug;
static PyObject *__pyx_n_s_shutil;
static PyObject *__pyx_n_s_spacy_syntax_parser;
static PyObject *__pyx_n_s_stack;
static PyObject *__pyx_n_s_startswith;
static PyObject *__pyx_n_s_step_through;
static PyObject *__pyx_n_s_stream;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_tags;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_text;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_tokens;
static PyObject *__pyx_n_s_traceback;
static PyObject *__pyx_n_s_transition;
static PyObject *__pyx_n_s_transition_system;
static PyObject *__pyx_n_s_tree_shape;
static PyObject *__pyx_n_s_trigrams;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_unigrams;
static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
static PyObject *__pyx_n_s_util;
static PyObject *__pyx_n_s_val;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_vocab;
static PyObject *__pyx_n_s_words;
static PyObject *__pyx_pf_5spacy_6syntax_6parser_set_debug(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_2get_templates(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_load(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_path, struct __pyx_obj_5spacy_5vocab_Vocab *__pyx_v_vocab, PyObject *__pyx_v_TransitionSystem, PyObject *__pyx_v_require); /* proto */
static int __pyx_pf_5spacy_6syntax_6parser_6Parser_2__init__(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, struct __pyx_obj_5spacy_5vocab_Vocab *__pyx_v_vocab, PyObject *__pyx_v_TransitionSystem, CYTHON_UNUSED struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *__pyx_v_model, PyObject *__pyx_v_cfg); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_4__reduce__(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_6__call__(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_tokens); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_8pipe(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, PyObject *__pyx_v_stream, int __pyx_v_batch_size, CYTHON_UNUSED int __pyx_v_n_threads); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_11update(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_tokens, struct __pyx_obj_5spacy_4gold_GoldParse *__pyx_v_gold); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_13step_through(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_doc); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_15from_transition_sequence(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_doc, PyObject *__pyx_v_sequence); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_17add_label(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, PyObject *__pyx_v_label); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_5vocab___get__(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_5model___get__(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_5moves___get__(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_3cfg___get__(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self); /* proto */
static int __pyx_pf_5spacy_6syntax_6parser_13StepwiseState___init__(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self, struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_parser, struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_doc); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_2__enter__(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_4__exit__(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_type, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_6is_final(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_8stack(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_10queue(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_12heads(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_14deps(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_16predict(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_18transition(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self, PyObject *__pyx_v_action_name); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_20finish(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_5stcls___get__(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_2eg___get__(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_3doc___get__(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_6parser___get__(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5spacy_6syntax_6parser_16ParserStateError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_doc); /* proto */
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
static PyObject *__pyx_tp_new_5spacy_6syntax_6parser_ParserModel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5spacy_6syntax_6parser_Parser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5spacy_6syntax_6parser_StepwiseState(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5spacy_6syntax_6parser___pyx_scope_struct__pipe(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_codeobj__14;
static PyObject *__pyx_codeobj__16;
static PyObject *__pyx_codeobj__18;

/* "spacy/syntax/parser.pyx":52
 * 
 * DEBUG = False
 * def set_debug(val):             # <<<<<<<<<<<<<<
 *     global DEBUG
 *     DEBUG = val
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_1set_debug(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/
static PyMethodDef __pyx_mdef_5spacy_6syntax_6parser_1set_debug = {"set_debug", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_1set_debug, METH_O, 0};
static PyObject *__pyx_pw_5spacy_6syntax_6parser_1set_debug(PyObject *__pyx_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_debug (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_set_debug(__pyx_self, ((PyObject *)__pyx_v_val));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_set_debug(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_debug", 0);

  /* "spacy/syntax/parser.pyx":54
 * def set_debug(val):
 *     global DEBUG
 *     DEBUG = val             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG, __pyx_v_val) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "spacy/syntax/parser.pyx":52
 * 
 * DEBUG = False
 * def set_debug(val):             # <<<<<<<<<<<<<<
 *     global DEBUG
 *     DEBUG = val
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("spacy.syntax.parser.set_debug", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":57
 * 
 * 
 * def get_templates(name):             # <<<<<<<<<<<<<<
 *     pf = _parse_features
 *     if name == 'ner':
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_3get_templates(PyObject *__pyx_self, PyObject *__pyx_v_name); /*proto*/
static PyMethodDef __pyx_mdef_5spacy_6syntax_6parser_3get_templates = {"get_templates", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_3get_templates, METH_O, 0};
static PyObject *__pyx_pw_5spacy_6syntax_6parser_3get_templates(PyObject *__pyx_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_templates (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_2get_templates(__pyx_self, ((PyObject *)__pyx_v_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_2get_templates(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_v_pf = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_templates", 0);

  /* "spacy/syntax/parser.pyx":58
 * 
 * def get_templates(name):
 *     pf = _parse_features             # <<<<<<<<<<<<<<
 *     if name == 'ner':
 *         return pf.ner
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_features); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pf = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "spacy/syntax/parser.pyx":59
 * def get_templates(name):
 *     pf = _parse_features
 *     if name == 'ner':             # <<<<<<<<<<<<<<
 *         return pf.ner
 *     elif name == 'debug':
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_ner, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "spacy/syntax/parser.pyx":60
 *     pf = _parse_features
 *     if name == 'ner':
 *         return pf.ner             # <<<<<<<<<<<<<<
 *     elif name == 'debug':
 *         return pf.unigrams
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pf, __pyx_n_s_ner); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "spacy/syntax/parser.pyx":59
 * def get_templates(name):
 *     pf = _parse_features
 *     if name == 'ner':             # <<<<<<<<<<<<<<
 *         return pf.ner
 *     elif name == 'debug':
 */
  }

  /* "spacy/syntax/parser.pyx":61
 *     if name == 'ner':
 *         return pf.ner
 *     elif name == 'debug':             # <<<<<<<<<<<<<<
 *         return pf.unigrams
 *     elif name.startswith('embed'):
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_debug, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "spacy/syntax/parser.pyx":62
 *         return pf.ner
 *     elif name == 'debug':
 *         return pf.unigrams             # <<<<<<<<<<<<<<
 *     elif name.startswith('embed'):
 *         return (pf.words, pf.tags, pf.labels)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pf, __pyx_n_s_unigrams); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "spacy/syntax/parser.pyx":61
 *     if name == 'ner':
 *         return pf.ner
 *     elif name == 'debug':             # <<<<<<<<<<<<<<
 *         return pf.unigrams
 *     elif name.startswith('embed'):
 */
  }

  /* "spacy/syntax/parser.pyx":63
 *     elif name == 'debug':
 *         return pf.unigrams
 *     elif name.startswith('embed'):             # <<<<<<<<<<<<<<
 *         return (pf.words, pf.tags, pf.labels)
 *     else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "spacy/syntax/parser.pyx":64
 *         return pf.unigrams
 *     elif name.startswith('embed'):
 *         return (pf.words, pf.tags, pf.labels)             # <<<<<<<<<<<<<<
 *     else:
 *         return (pf.unigrams + pf.s0_n0 + pf.s1_n0 + pf.s1_s0 + pf.s0_n1 + pf.n0_n1 + \
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pf, __pyx_n_s_words); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pf, __pyx_n_s_tags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pf, __pyx_n_s_labels); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
    __pyx_t_3 = 0;
    __pyx_t_1 = 0;
    __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "spacy/syntax/parser.pyx":63
 *     elif name == 'debug':
 *         return pf.unigrams
 *     elif name.startswith('embed'):             # <<<<<<<<<<<<<<
 *         return (pf.words, pf.tags, pf.labels)
 *     else:
 */
  }

  /* "spacy/syntax/parser.pyx":66
 *         return (pf.words, pf.tags, pf.labels)
 *     else:
 *         return (pf.unigrams + pf.s0_n0 + pf.s1_n0 + pf.s1_s0 + pf.s0_n1 + pf.n0_n1 + \             # <<<<<<<<<<<<<<
 *                 pf.tree_shape + pf.trigrams)
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_pf, __pyx_n_s_unigrams); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pf, __pyx_n_s_s0_n0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pf, __pyx_n_s_s1_n0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pf, __pyx_n_s_s1_s0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pf, __pyx_n_s_s0_n1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pf, __pyx_n_s_n0_n1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "spacy/syntax/parser.pyx":67
 *     else:
 *         return (pf.unigrams + pf.s0_n0 + pf.s1_n0 + pf.s1_s0 + pf.s0_n1 + pf.n0_n1 + \
 *                 pf.tree_shape + pf.trigrams)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pf, __pyx_n_s_tree_shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);

    /* "spacy/syntax/parser.pyx":66
 *         return (pf.words, pf.tags, pf.labels)
 *     else:
 *         return (pf.unigrams + pf.s0_n0 + pf.s1_n0 + pf.s1_s0 + pf.s0_n1 + pf.n0_n1 + \             # <<<<<<<<<<<<<<
 *                 pf.tree_shape + pf.trigrams)
 * 
 */
    __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "spacy/syntax/parser.pyx":67
 *     else:
 *         return (pf.unigrams + pf.s0_n0 + pf.s1_n0 + pf.s1_s0 + pf.s0_n1 + pf.n0_n1 + \
 *                 pf.tree_shape + pf.trigrams)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pf, __pyx_n_s_trigrams); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "spacy/syntax/parser.pyx":57
 * 
 * 
 * def get_templates(name):             # <<<<<<<<<<<<<<
 *     pf = _parse_features
 *     if name == 'ner':
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("spacy.syntax.parser.get_templates", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":71
 * 
 * cdef class ParserModel(AveragedPerceptron):
 *     cdef void set_featuresC(self, ExampleC* eg, const StateC* state) nogil:             # <<<<<<<<<<<<<<
 *         fill_context(eg.atoms, state)
 *         eg.nr_feat = self.extracter.set_features(eg.features, eg.atoms)
 */

static void __pyx_f_5spacy_6syntax_6parser_11ParserModel_set_featuresC(struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *__pyx_v_self, struct __pyx_t_5thinc_7structs_ExampleC *__pyx_v_eg, __pyx_t_5spacy_6syntax_6_state_StateC const *__pyx_v_state) {

  /* "spacy/syntax/parser.pyx":72
 * cdef class ParserModel(AveragedPerceptron):
 *     cdef void set_featuresC(self, ExampleC* eg, const StateC* state) nogil:
 *         fill_context(eg.atoms, state)             # <<<<<<<<<<<<<<
 *         eg.nr_feat = self.extracter.set_features(eg.features, eg.atoms)
 * 
 */
  __pyx_f_5spacy_6syntax_15_parse_features_fill_context(__pyx_v_eg->atoms, __pyx_v_state);

  /* "spacy/syntax/parser.pyx":73
 *     cdef void set_featuresC(self, ExampleC* eg, const StateC* state) nogil:
 *         fill_context(eg.atoms, state)
 *         eg.nr_feat = self.extracter.set_features(eg.features, eg.atoms)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_eg->nr_feat = ((struct __pyx_vtabstruct_5thinc_6linear_8features_ConjunctionExtracter *)__pyx_v_self->__pyx_base.extracter->__pyx_vtab)->set_features(__pyx_v_self->__pyx_base.extracter, __pyx_v_eg->features, __pyx_v_eg->atoms);

  /* "spacy/syntax/parser.pyx":71
 * 
 * cdef class ParserModel(AveragedPerceptron):
 *     cdef void set_featuresC(self, ExampleC* eg, const StateC* state) nogil:             # <<<<<<<<<<<<<<
 *         fill_context(eg.atoms, state)
 *         eg.nr_feat = self.extracter.set_features(eg.features, eg.atoms)
 */

  /* function exit code */
}

/* "spacy/syntax/parser.pyx":78
 * cdef class Parser:
 *     @classmethod
 *     def load(cls, path, Vocab vocab, TransitionSystem=None, require=False):             # <<<<<<<<<<<<<<
 *         with (path / 'config.json').open() as file_:
 *             cfg = json.load(file_)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_1load(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_1load(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  struct __pyx_obj_5spacy_5vocab_Vocab *__pyx_v_vocab = 0;
  PyObject *__pyx_v_TransitionSystem = 0;
  PyObject *__pyx_v_require = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_vocab,&__pyx_n_s_TransitionSystem,&__pyx_n_s_require,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_False);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vocab)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("load", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_TransitionSystem);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_require);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "load") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_path = values[0];
    __pyx_v_vocab = ((struct __pyx_obj_5spacy_5vocab_Vocab *)values[1]);
    __pyx_v_TransitionSystem = values[2];
    __pyx_v_require = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("load", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vocab), __pyx_ptype_5spacy_5vocab_Vocab, 1, "vocab", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_6Parser_load(((PyTypeObject*)__pyx_v_cls), __pyx_v_path, __pyx_v_vocab, __pyx_v_TransitionSystem, __pyx_v_require);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_load(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_path, struct __pyx_obj_5spacy_5vocab_Vocab *__pyx_v_vocab, PyObject *__pyx_v_TransitionSystem, PyObject *__pyx_v_require) {
  PyObject *__pyx_v_file_ = NULL;
  PyObject *__pyx_v_cfg = NULL;
  PyObject *__pyx_v_self = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load", 0);

  /* "spacy/syntax/parser.pyx":79
 *     @classmethod
 *     def load(cls, path, Vocab vocab, TransitionSystem=None, require=False):
 *         with (path / 'config.json').open() as file_:             # <<<<<<<<<<<<<<
 *             cfg = json.load(file_)
 *         # TODO: remove this shim when we don't have to support older data
 */
  /*with:*/ {
    __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_v_path, __pyx_kp_u_config_json); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_2) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    /*try:*/ {
      {
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {
          __pyx_v_file_ = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "spacy/syntax/parser.pyx":80
 *     def load(cls, path, Vocab vocab, TransitionSystem=None, require=False):
 *         with (path / 'config.json').open() as file_:
 *             cfg = json.load(file_)             # <<<<<<<<<<<<<<
 *         # TODO: remove this shim when we don't have to support older data
 *         if 'labels' in cfg:
 */
          __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_json); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_load); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = NULL;
          if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          if (!__pyx_t_1) {
            __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_file_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_2);
          } else {
            __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
            __Pyx_INCREF(__pyx_v_file_);
            __Pyx_GIVEREF(__pyx_v_file_);
            PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_file_);
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_v_cfg = __pyx_t_2;
          __pyx_t_2 = 0;

          /* "spacy/syntax/parser.pyx":79
 *     @classmethod
 *     def load(cls, path, Vocab vocab, TransitionSystem=None, require=False):
 *         with (path / 'config.json').open() as file_:             # <<<<<<<<<<<<<<
 *             cfg = json.load(file_)
 *         # TODO: remove this shim when we don't have to support older data
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L14_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("spacy.syntax.parser.Parser.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (__pyx_t_10 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0);
          if (__pyx_t_11) {
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_XGIVEREF(__pyx_t_5);
            __Pyx_ErrRestore(__pyx_t_2, __pyx_t_3, __pyx_t_5);
            __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; 
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L14_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_4) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__2, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L18;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L1_error;
    __pyx_L18:;
  }

  /* "spacy/syntax/parser.pyx":82
 *             cfg = json.load(file_)
 *         # TODO: remove this shim when we don't have to support older data
 *         if 'labels' in cfg:             # <<<<<<<<<<<<<<
 *             cfg['actions'] = cfg.pop('labels')
 *         self = cls(vocab, TransitionSystem=TransitionSystem, model=None, **cfg)
 */
  if (unlikely(!__pyx_v_cfg)) { __Pyx_RaiseUnboundLocalError("cfg"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_labels, __pyx_v_cfg, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_10 = (__pyx_t_11 != 0);
  if (__pyx_t_10) {

    /* "spacy/syntax/parser.pyx":83
 *         # TODO: remove this shim when we don't have to support older data
 *         if 'labels' in cfg:
 *             cfg['actions'] = cfg.pop('labels')             # <<<<<<<<<<<<<<
 *         self = cls(vocab, TransitionSystem=TransitionSystem, model=None, **cfg)
 *         if (path / 'model').exists():
 */
    if (unlikely(!__pyx_v_cfg)) { __Pyx_RaiseUnboundLocalError("cfg"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cfg, __pyx_n_s_pop); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_v_cfg)) { __Pyx_RaiseUnboundLocalError("cfg"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    if (unlikely(PyObject_SetItem(__pyx_v_cfg, __pyx_n_u_actions, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "spacy/syntax/parser.pyx":82
 *             cfg = json.load(file_)
 *         # TODO: remove this shim when we don't have to support older data
 *         if 'labels' in cfg:             # <<<<<<<<<<<<<<
 *             cfg['actions'] = cfg.pop('labels')
 *         self = cls(vocab, TransitionSystem=TransitionSystem, model=None, **cfg)
 */
  }

  /* "spacy/syntax/parser.pyx":84
 *         if 'labels' in cfg:
 *             cfg['actions'] = cfg.pop('labels')
 *         self = cls(vocab, TransitionSystem=TransitionSystem, model=None, **cfg)             # <<<<<<<<<<<<<<
 *         if (path / 'model').exists():
 *             self.model.load(str(path / 'model'))
 */
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_vocab));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_vocab));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_vocab));
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_TransitionSystem, __pyx_v_TransitionSystem) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_model, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = __pyx_t_2;
  __pyx_t_2 = 0;
  if (unlikely(!__pyx_v_cfg)) { __Pyx_RaiseUnboundLocalError("cfg"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (unlikely(__pyx_v_cfg == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  if (__Pyx_MergeKeywords(__pyx_t_5, __pyx_v_cfg) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_cls), __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_self = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "spacy/syntax/parser.pyx":85
 *             cfg['actions'] = cfg.pop('labels')
 *         self = cls(vocab, TransitionSystem=TransitionSystem, model=None, **cfg)
 *         if (path / 'model').exists():             # <<<<<<<<<<<<<<
 *             self.model.load(str(path / 'model'))
 *         elif require:
 */
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_v_path, __pyx_n_u_model); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_exists); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (__pyx_t_5) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_10) {

    /* "spacy/syntax/parser.pyx":86
 *         self = cls(vocab, TransitionSystem=TransitionSystem, model=None, **cfg)
 *         if (path / 'model').exists():
 *             self.model.load(str(path / 'model'))             # <<<<<<<<<<<<<<
 *         elif require:
 *             raise IOError(
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_model); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_load); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_path, __pyx_n_u_model); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_1) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_1); __pyx_t_1 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "spacy/syntax/parser.pyx":85
 *             cfg['actions'] = cfg.pop('labels')
 *         self = cls(vocab, TransitionSystem=TransitionSystem, model=None, **cfg)
 *         if (path / 'model').exists():             # <<<<<<<<<<<<<<
 *             self.model.load(str(path / 'model'))
 *         elif require:
 */
    goto __pyx_L20;
  }

  /* "spacy/syntax/parser.pyx":87
 *         if (path / 'model').exists():
 *             self.model.load(str(path / 'model'))
 *         elif require:             # <<<<<<<<<<<<<<
 *             raise IOError(
 *                 "Required file %s/model not found when loading" % str(path))
 */
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_require); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_10) {

    /* "spacy/syntax/parser.pyx":89
 *         elif require:
 *             raise IOError(
 *                 "Required file %s/model not found when loading" % str(path))             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_path);
    __Pyx_GIVEREF(__pyx_v_path);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_Required_file_s_model_not_found, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "spacy/syntax/parser.pyx":88
 *             self.model.load(str(path / 'model'))
 *         elif require:
 *             raise IOError(             # <<<<<<<<<<<<<<
 *                 "Required file %s/model not found when loading" % str(path))
 *         return self
 */
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "spacy/syntax/parser.pyx":87
 *         if (path / 'model').exists():
 *             self.model.load(str(path / 'model'))
 *         elif require:             # <<<<<<<<<<<<<<
 *             raise IOError(
 *                 "Required file %s/model not found when loading" % str(path))
 */
  }
  __pyx_L20:;

  /* "spacy/syntax/parser.pyx":90
 *             raise IOError(
 *                 "Required file %s/model not found when loading" % str(path))
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, Vocab vocab, TransitionSystem=None, ParserModel model=None, **cfg):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "spacy/syntax/parser.pyx":78
 * cdef class Parser:
 *     @classmethod
 *     def load(cls, path, Vocab vocab, TransitionSystem=None, require=False):             # <<<<<<<<<<<<<<
 *         with (path / 'config.json').open() as file_:
 *             cfg = json.load(file_)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_file_);
  __Pyx_XDECREF(__pyx_v_cfg);
  __Pyx_XDECREF(__pyx_v_self);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":92
 *         return self
 * 
 *     def __init__(self, Vocab vocab, TransitionSystem=None, ParserModel model=None, **cfg):             # <<<<<<<<<<<<<<
 *         if TransitionSystem is None:
 *             TransitionSystem = self.TransitionSystem
 */

/* Python wrapper */
static int __pyx_pw_5spacy_6syntax_6parser_6Parser_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5spacy_6syntax_6parser_6Parser_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_5spacy_5vocab_Vocab *__pyx_v_vocab = 0;
  PyObject *__pyx_v_TransitionSystem = 0;
  CYTHON_UNUSED struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *__pyx_v_model = 0;
  PyObject *__pyx_v_cfg = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_cfg = PyDict_New(); if (unlikely(!__pyx_v_cfg)) return -1;
  __Pyx_GOTREF(__pyx_v_cfg);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vocab,&__pyx_n_s_TransitionSystem,&__pyx_n_s_model,0};
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = (PyObject *)((struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vocab)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_TransitionSystem);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_model);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_cfg, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_vocab = ((struct __pyx_obj_5spacy_5vocab_Vocab *)values[0]);
    __pyx_v_TransitionSystem = values[1];
    __pyx_v_model = ((struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_cfg); __pyx_v_cfg = 0;
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vocab), __pyx_ptype_5spacy_5vocab_Vocab, 1, "vocab", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_model), __pyx_ptype_5spacy_6syntax_6parser_ParserModel, 1, "model", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_6Parser_2__init__(((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)__pyx_v_self), __pyx_v_vocab, __pyx_v_TransitionSystem, __pyx_v_model, __pyx_v_cfg);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cfg);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5spacy_6syntax_6parser_6Parser_2__init__(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, struct __pyx_obj_5spacy_5vocab_Vocab *__pyx_v_vocab, PyObject *__pyx_v_TransitionSystem, CYTHON_UNUSED struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *__pyx_v_model, PyObject *__pyx_v_cfg) {
  PyObject *__pyx_v_actions = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_TransitionSystem);

  /* "spacy/syntax/parser.pyx":93
 * 
 *     def __init__(self, Vocab vocab, TransitionSystem=None, ParserModel model=None, **cfg):
 *         if TransitionSystem is None:             # <<<<<<<<<<<<<<
 *             TransitionSystem = self.TransitionSystem
 *         self.vocab = vocab
 */
  __pyx_t_1 = (__pyx_v_TransitionSystem == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "spacy/syntax/parser.pyx":94
 *     def __init__(self, Vocab vocab, TransitionSystem=None, ParserModel model=None, **cfg):
 *         if TransitionSystem is None:
 *             TransitionSystem = self.TransitionSystem             # <<<<<<<<<<<<<<
 *         self.vocab = vocab
 *         actions = TransitionSystem.get_actions(**cfg)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_TransitionSystem); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_TransitionSystem, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "spacy/syntax/parser.pyx":93
 * 
 *     def __init__(self, Vocab vocab, TransitionSystem=None, ParserModel model=None, **cfg):
 *         if TransitionSystem is None:             # <<<<<<<<<<<<<<
 *             TransitionSystem = self.TransitionSystem
 *         self.vocab = vocab
 */
  }

  /* "spacy/syntax/parser.pyx":95
 *         if TransitionSystem is None:
 *             TransitionSystem = self.TransitionSystem
 *         self.vocab = vocab             # <<<<<<<<<<<<<<
 *         actions = TransitionSystem.get_actions(**cfg)
 *         self.moves = TransitionSystem(vocab.strings, actions)
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_vocab));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_vocab));
  __Pyx_GOTREF(__pyx_v_self->vocab);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->vocab));
  __pyx_v_self->vocab = __pyx_v_vocab;

  /* "spacy/syntax/parser.pyx":96
 *             TransitionSystem = self.TransitionSystem
 *         self.vocab = vocab
 *         actions = TransitionSystem.get_actions(**cfg)             # <<<<<<<<<<<<<<
 *         self.moves = TransitionSystem(vocab.strings, actions)
 *         # TODO: Remove this when we no longer need to support old-style models
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_TransitionSystem, __pyx_n_s_get_actions); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_v_cfg); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_actions = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "spacy/syntax/parser.pyx":97
 *         self.vocab = vocab
 *         actions = TransitionSystem.get_actions(**cfg)
 *         self.moves = TransitionSystem(vocab.strings, actions)             # <<<<<<<<<<<<<<
 *         # TODO: Remove this when we no longer need to support old-style models
 *         if isinstance(cfg.get('features'), basestring):
 */
  __Pyx_INCREF(__pyx_v_TransitionSystem);
  __pyx_t_3 = __pyx_v_TransitionSystem; __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_5) {
    __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
  }
  __Pyx_INCREF(((PyObject *)__pyx_v_vocab->strings));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_vocab->strings));
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_vocab->strings));
  __Pyx_INCREF(__pyx_v_actions);
  __Pyx_GIVEREF(__pyx_v_actions);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_actions);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5spacy_6syntax_17transition_system_TransitionSystem))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->moves);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->moves));
  __pyx_v_self->moves = ((struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "spacy/syntax/parser.pyx":99
 *         self.moves = TransitionSystem(vocab.strings, actions)
 *         # TODO: Remove this when we no longer need to support old-style models
 *         if isinstance(cfg.get('features'), basestring):             # <<<<<<<<<<<<<<
 *             cfg['features'] = get_templates(cfg['features'])
 *         elif 'features' not in cfg:
 */
  __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_cfg, __pyx_n_u_features, Py_None); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyBaseString_Check(__pyx_t_4); 
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "spacy/syntax/parser.pyx":100
 *         # TODO: Remove this when we no longer need to support old-style models
 *         if isinstance(cfg.get('features'), basestring):
 *             cfg['features'] = get_templates(cfg['features'])             # <<<<<<<<<<<<<<
 *         elif 'features' not in cfg:
 *             cfg['features'] = self.feature_templates
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_templates); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_cfg, __pyx_n_u_features); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(PyDict_SetItem(__pyx_v_cfg, __pyx_n_u_features, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "spacy/syntax/parser.pyx":99
 *         self.moves = TransitionSystem(vocab.strings, actions)
 *         # TODO: Remove this when we no longer need to support old-style models
 *         if isinstance(cfg.get('features'), basestring):             # <<<<<<<<<<<<<<
 *             cfg['features'] = get_templates(cfg['features'])
 *         elif 'features' not in cfg:
 */
    goto __pyx_L4;
  }

  /* "spacy/syntax/parser.pyx":101
 *         if isinstance(cfg.get('features'), basestring):
 *             cfg['features'] = get_templates(cfg['features'])
 *         elif 'features' not in cfg:             # <<<<<<<<<<<<<<
 *             cfg['features'] = self.feature_templates
 *         self.model = ParserModel(cfg['features'])
 */
  __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_features, __pyx_v_cfg, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "spacy/syntax/parser.pyx":102
 *             cfg['features'] = get_templates(cfg['features'])
 *         elif 'features' not in cfg:
 *             cfg['features'] = self.feature_templates             # <<<<<<<<<<<<<<
 *         self.model = ParserModel(cfg['features'])
 *         self.cfg = cfg
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_feature_templates); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(PyDict_SetItem(__pyx_v_cfg, __pyx_n_u_features, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "spacy/syntax/parser.pyx":101
 *         if isinstance(cfg.get('features'), basestring):
 *             cfg['features'] = get_templates(cfg['features'])
 *         elif 'features' not in cfg:             # <<<<<<<<<<<<<<
 *             cfg['features'] = self.feature_templates
 *         self.model = ParserModel(cfg['features'])
 */
  }
  __pyx_L4:;

  /* "spacy/syntax/parser.pyx":103
 *         elif 'features' not in cfg:
 *             cfg['features'] = self.feature_templates
 *         self.model = ParserModel(cfg['features'])             # <<<<<<<<<<<<<<
 *         self.cfg = cfg
 * 
 */
  __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_cfg, __pyx_n_u_features); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_ParserModel), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->model);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->model));
  __pyx_v_self->model = ((struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "spacy/syntax/parser.pyx":104
 *             cfg['features'] = self.feature_templates
 *         self.model = ParserModel(cfg['features'])
 *         self.cfg = cfg             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
 */
  __Pyx_INCREF(__pyx_v_cfg);
  __Pyx_GIVEREF(__pyx_v_cfg);
  __Pyx_GOTREF(__pyx_v_self->cfg);
  __Pyx_DECREF(__pyx_v_self->cfg);
  __pyx_v_self->cfg = __pyx_v_cfg;

  /* "spacy/syntax/parser.pyx":92
 *         return self
 * 
 *     def __init__(self, Vocab vocab, TransitionSystem=None, ParserModel model=None, **cfg):             # <<<<<<<<<<<<<<
 *         if TransitionSystem is None:
 *             TransitionSystem = self.TransitionSystem
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_actions);
  __Pyx_XDECREF(__pyx_v_TransitionSystem);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":106
 *         self.cfg = cfg
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return (Parser, (self.vocab, self.moves, self.model), None, None)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_5__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_5__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_6Parser_4__reduce__(((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_4__reduce__(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 0);

  /* "spacy/syntax/parser.pyx":107
 * 
 *     def __reduce__(self):
 *         return (Parser, (self.vocab, self.moves, self.model), None, None)             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, Doc tokens):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->vocab));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->vocab));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->vocab));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->moves));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->moves));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->moves));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->model));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->model));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_self->model));
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_Parser));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_Parser));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_Parser));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 3, Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "spacy/syntax/parser.pyx":106
 *         self.cfg = cfg
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         return (Parser, (self.vocab, self.moves, self.model), None, None)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":109
 *         return (Parser, (self.vocab, self.moves, self.model), None, None)
 * 
 *     def __call__(self, Doc tokens):             # <<<<<<<<<<<<<<
 *         cdef int nr_class = self.moves.n_moves
 *         cdef int nr_feat = self.model.nr_feat
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_7__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_7__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_tokens = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tokens,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tokens)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_tokens = ((struct __pyx_obj_5spacy_6tokens_3doc_Doc *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tokens), __pyx_ptype_5spacy_6tokens_3doc_Doc, 1, "tokens", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_6Parser_6__call__(((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)__pyx_v_self), __pyx_v_tokens);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_6__call__(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_tokens) {
  int __pyx_v_nr_class;
  int __pyx_v_nr_feat;
  int __pyx_v_status;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__call__", 0);

  /* "spacy/syntax/parser.pyx":110
 * 
 *     def __call__(self, Doc tokens):
 *         cdef int nr_class = self.moves.n_moves             # <<<<<<<<<<<<<<
 *         cdef int nr_feat = self.model.nr_feat
 *         with nogil:
 */
  __pyx_t_1 = __pyx_v_self->moves->n_moves;
  __pyx_v_nr_class = __pyx_t_1;

  /* "spacy/syntax/parser.pyx":111
 *     def __call__(self, Doc tokens):
 *         cdef int nr_class = self.moves.n_moves
 *         cdef int nr_feat = self.model.nr_feat             # <<<<<<<<<<<<<<
 *         with nogil:
 *             status = self.parseC(tokens.c, tokens.length, nr_feat, nr_class)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->model), __pyx_n_s_nr_feat); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_nr_feat = __pyx_t_1;

  /* "spacy/syntax/parser.pyx":112
 *         cdef int nr_class = self.moves.n_moves
 *         cdef int nr_feat = self.model.nr_feat
 *         with nogil:             # <<<<<<<<<<<<<<
 *             status = self.parseC(tokens.c, tokens.length, nr_feat, nr_class)
 *         # Check for KeyboardInterrupt etc. Untested
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "spacy/syntax/parser.pyx":113
 *         cdef int nr_feat = self.model.nr_feat
 *         with nogil:
 *             status = self.parseC(tokens.c, tokens.length, nr_feat, nr_class)             # <<<<<<<<<<<<<<
 *         # Check for KeyboardInterrupt etc. Untested
 *         PyErr_CheckSignals()
 */
        __pyx_v_status = ((struct __pyx_vtabstruct_5spacy_6syntax_6parser_Parser *)__pyx_v_self->__pyx_vtab)->parseC(__pyx_v_self, __pyx_v_tokens->c, __pyx_v_tokens->length, __pyx_v_nr_feat, __pyx_v_nr_class);
      }

      /* "spacy/syntax/parser.pyx":112
 *         cdef int nr_class = self.moves.n_moves
 *         cdef int nr_feat = self.model.nr_feat
 *         with nogil:             # <<<<<<<<<<<<<<
 *             status = self.parseC(tokens.c, tokens.length, nr_feat, nr_class)
 *         # Check for KeyboardInterrupt etc. Untested
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L5:;
      }
  }

  /* "spacy/syntax/parser.pyx":115
 *             status = self.parseC(tokens.c, tokens.length, nr_feat, nr_class)
 *         # Check for KeyboardInterrupt etc. Untested
 *         PyErr_CheckSignals()             # <<<<<<<<<<<<<<
 *         if status != 0:
 *             raise ParserStateError(tokens)
 */
  __pyx_t_1 = PyErr_CheckSignals(); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "spacy/syntax/parser.pyx":116
 *         # Check for KeyboardInterrupt etc. Untested
 *         PyErr_CheckSignals()
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise ParserStateError(tokens)
 *         self.moves.finalize_doc(tokens)
 */
  __pyx_t_3 = ((__pyx_v_status != 0) != 0);
  if (__pyx_t_3) {

    /* "spacy/syntax/parser.pyx":117
 *         PyErr_CheckSignals()
 *         if status != 0:
 *             raise ParserStateError(tokens)             # <<<<<<<<<<<<<<
 *         self.moves.finalize_doc(tokens)
 * 
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ParserStateError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_tokens)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
      __Pyx_INCREF(((PyObject *)__pyx_v_tokens));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_tokens));
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, ((PyObject *)__pyx_v_tokens));
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "spacy/syntax/parser.pyx":116
 *         # Check for KeyboardInterrupt etc. Untested
 *         PyErr_CheckSignals()
 *         if status != 0:             # <<<<<<<<<<<<<<
 *             raise ParserStateError(tokens)
 *         self.moves.finalize_doc(tokens)
 */
  }

  /* "spacy/syntax/parser.pyx":118
 *         if status != 0:
 *             raise ParserStateError(tokens)
 *         self.moves.finalize_doc(tokens)             # <<<<<<<<<<<<<<
 * 
 *     def pipe(self, stream, int batch_size=1000, int n_threads=2):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->moves), __pyx_n_s_finalize_doc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_tokens)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
    __Pyx_INCREF(((PyObject *)__pyx_v_tokens));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_tokens));
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_tokens));
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spacy/syntax/parser.pyx":109
 *         return (Parser, (self.vocab, self.moves, self.model), None, None)
 * 
 *     def __call__(self, Doc tokens):             # <<<<<<<<<<<<<<
 *         cdef int nr_class = self.moves.n_moves
 *         cdef int nr_feat = self.model.nr_feat
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5spacy_6syntax_6parser_6Parser_10generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "spacy/syntax/parser.pyx":120
 *         self.moves.finalize_doc(tokens)
 * 
 *     def pipe(self, stream, int batch_size=1000, int n_threads=2):             # <<<<<<<<<<<<<<
 *         cdef Pool mem = Pool()
 *         cdef TokenC** doc_ptr = <TokenC**>mem.alloc(batch_size, sizeof(TokenC*))
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_9pipe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_9pipe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_stream = 0;
  int __pyx_v_batch_size;
  CYTHON_UNUSED int __pyx_v_n_threads;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pipe (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stream,&__pyx_n_s_batch_size,&__pyx_n_s_n_threads,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stream)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_batch_size);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n_threads);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pipe") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_stream = values[0];
    if (values[1]) {
      __pyx_v_batch_size = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_batch_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_batch_size = ((int)0x3E8);
    }
    if (values[2]) {
      __pyx_v_n_threads = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_n_threads == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_n_threads = ((int)2);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pipe", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_6Parser_8pipe(((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)__pyx_v_self), __pyx_v_stream, __pyx_v_batch_size, __pyx_v_n_threads);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_8pipe(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, PyObject *__pyx_v_stream, int __pyx_v_batch_size, CYTHON_UNUSED int __pyx_v_n_threads) {
  struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pipe", 0);
  __pyx_cur_scope = (struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe *)__pyx_tp_new_5spacy_6syntax_6parser___pyx_scope_struct__pipe(__pyx_ptype_5spacy_6syntax_6parser___pyx_scope_struct__pipe, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_stream = __pyx_v_stream;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_stream);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_stream);
  __pyx_cur_scope->__pyx_v_batch_size = __pyx_v_batch_size;
  __pyx_cur_scope->__pyx_v_n_threads = __pyx_v_n_threads;
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5spacy_6syntax_6parser_6Parser_10generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_pipe, __pyx_n_s_Parser_pipe); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_5spacy_6syntax_6parser_6Parser_10generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe *__pyx_cur_scope = ((struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  void *__pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_t_5spacy_7structs_TokenC *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L26_resume_from_yield;
    case 2: goto __pyx_L44_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "spacy/syntax/parser.pyx":121
 * 
 *     def pipe(self, stream, int batch_size=1000, int n_threads=2):
 *         cdef Pool mem = Pool()             # <<<<<<<<<<<<<<
 *         cdef TokenC** doc_ptr = <TokenC**>mem.alloc(batch_size, sizeof(TokenC*))
 *         cdef int* lengths = <int*>mem.alloc(batch_size, sizeof(int))
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5cymem_5cymem_Pool), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_mem = ((struct __pyx_obj_5cymem_5cymem_Pool *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spacy/syntax/parser.pyx":122
 *     def pipe(self, stream, int batch_size=1000, int n_threads=2):
 *         cdef Pool mem = Pool()
 *         cdef TokenC** doc_ptr = <TokenC**>mem.alloc(batch_size, sizeof(TokenC*))             # <<<<<<<<<<<<<<
 *         cdef int* lengths = <int*>mem.alloc(batch_size, sizeof(int))
 *         cdef Doc doc
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_5cymem_5cymem_Pool *)__pyx_cur_scope->__pyx_v_mem->__pyx_vtab)->alloc(__pyx_cur_scope->__pyx_v_mem, __pyx_cur_scope->__pyx_v_batch_size, (sizeof(struct __pyx_t_5spacy_7structs_TokenC *))); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_cur_scope->__pyx_v_doc_ptr = ((struct __pyx_t_5spacy_7structs_TokenC **)__pyx_t_2);

  /* "spacy/syntax/parser.pyx":123
 *         cdef Pool mem = Pool()
 *         cdef TokenC** doc_ptr = <TokenC**>mem.alloc(batch_size, sizeof(TokenC*))
 *         cdef int* lengths = <int*>mem.alloc(batch_size, sizeof(int))             # <<<<<<<<<<<<<<
 *         cdef Doc doc
 *         cdef int i
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_5cymem_5cymem_Pool *)__pyx_cur_scope->__pyx_v_mem->__pyx_vtab)->alloc(__pyx_cur_scope->__pyx_v_mem, __pyx_cur_scope->__pyx_v_batch_size, (sizeof(int))); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_cur_scope->__pyx_v_lengths = ((int *)__pyx_t_2);

  /* "spacy/syntax/parser.pyx":126
 *         cdef Doc doc
 *         cdef int i
 *         cdef int nr_class = self.moves.n_moves             # <<<<<<<<<<<<<<
 *         cdef int nr_feat = self.model.nr_feat
 *         cdef int status
 */
  __pyx_t_3 = __pyx_cur_scope->__pyx_v_self->moves->n_moves;
  __pyx_cur_scope->__pyx_v_nr_class = __pyx_t_3;

  /* "spacy/syntax/parser.pyx":127
 *         cdef int i
 *         cdef int nr_class = self.moves.n_moves
 *         cdef int nr_feat = self.model.nr_feat             # <<<<<<<<<<<<<<
 *         cdef int status
 *         queue = []
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->model), __pyx_n_s_nr_feat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_cur_scope->__pyx_v_nr_feat = __pyx_t_3;

  /* "spacy/syntax/parser.pyx":129
 *         cdef int nr_feat = self.model.nr_feat
 *         cdef int status
 *         queue = []             # <<<<<<<<<<<<<<
 *         for doc in stream:
 *             doc_ptr[len(queue)] = doc.c
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_queue = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spacy/syntax/parser.pyx":130
 *         cdef int status
 *         queue = []
 *         for doc in stream:             # <<<<<<<<<<<<<<
 *             doc_ptr[len(queue)] = doc.c
 *             lengths[len(queue)] = doc.length
 */
  if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_stream)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_stream)) {
    __pyx_t_1 = __pyx_cur_scope->__pyx_v_stream; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_stream); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_5(__pyx_t_1);
      if (unlikely(!__pyx_t_6)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5spacy_6tokens_3doc_Doc))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_doc));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_doc, ((struct __pyx_obj_5spacy_6tokens_3doc_Doc *)__pyx_t_6));
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "spacy/syntax/parser.pyx":131
 *         queue = []
 *         for doc in stream:
 *             doc_ptr[len(queue)] = doc.c             # <<<<<<<<<<<<<<
 *             lengths[len(queue)] = doc.length
 *             queue.append(doc)
 */
    __pyx_t_7 = __pyx_cur_scope->__pyx_v_doc->c;
    __pyx_t_8 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_queue); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    (__pyx_cur_scope->__pyx_v_doc_ptr[__pyx_t_8]) = __pyx_t_7;

    /* "spacy/syntax/parser.pyx":132
 *         for doc in stream:
 *             doc_ptr[len(queue)] = doc.c
 *             lengths[len(queue)] = doc.length             # <<<<<<<<<<<<<<
 *             queue.append(doc)
 *             if len(queue) == batch_size:
 */
    __pyx_t_3 = __pyx_cur_scope->__pyx_v_doc->length;
    __pyx_t_8 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_queue); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    (__pyx_cur_scope->__pyx_v_lengths[__pyx_t_8]) = __pyx_t_3;

    /* "spacy/syntax/parser.pyx":133
 *             doc_ptr[len(queue)] = doc.c
 *             lengths[len(queue)] = doc.length
 *             queue.append(doc)             # <<<<<<<<<<<<<<
 *             if len(queue) == batch_size:
 *                 with nogil:
 */
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_queue, ((PyObject *)__pyx_cur_scope->__pyx_v_doc)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "spacy/syntax/parser.pyx":134
 *             lengths[len(queue)] = doc.length
 *             queue.append(doc)
 *             if len(queue) == batch_size:             # <<<<<<<<<<<<<<
 *                 with nogil:
 *                     for i in cython.parallel.prange(batch_size, num_threads=n_threads):
 */
    __pyx_t_8 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_queue); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_10 = ((__pyx_t_8 == __pyx_cur_scope->__pyx_v_batch_size) != 0);
    if (__pyx_t_10) {

      /* "spacy/syntax/parser.pyx":135
 *             queue.append(doc)
 *             if len(queue) == batch_size:
 *                 with nogil:             # <<<<<<<<<<<<<<
 *                     for i in cython.parallel.prange(batch_size, num_threads=n_threads):
 *                         status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)
 */
      {
          #ifdef WITH_THREAD
          PyThreadState *_save;
          Py_UNBLOCK_THREADS
          #endif
          /*try:*/ {

            /* "spacy/syntax/parser.pyx":136
 *             if len(queue) == batch_size:
 *                 with nogil:
 *                     for i in cython.parallel.prange(batch_size, num_threads=n_threads):             # <<<<<<<<<<<<<<
 *                         status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)
 *                         if status != 0:
 */
            __pyx_t_3 = __pyx_cur_scope->__pyx_v_status;
            __pyx_t_11 = __pyx_cur_scope->__pyx_v_i;
            __pyx_t_12 = __pyx_cur_scope->__pyx_v_batch_size;
            if (1 == 0) abort();
            {
                int __pyx_parallel_temp0 = 0xbad0bad0;
                int __pyx_parallel_temp1 = 0xbad0bad0;
                const char *__pyx_parallel_filename = NULL; int __pyx_parallel_lineno = 0, __pyx_parallel_clineno = 0;
                PyObject *__pyx_parallel_exc_type = NULL, *__pyx_parallel_exc_value = NULL, *__pyx_parallel_exc_tb = NULL;
                int __pyx_parallel_why;
                __pyx_parallel_why = 0;
                #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
                    #undef likely
                    #undef unlikely
                    #define likely(x)   (x)
                    #define unlikely(x) (x)
                #endif
                __pyx_t_14 = (__pyx_t_12 - 0 + 1 - 1/abs(1)) / 1;
                if (__pyx_t_14 > 0)
                {
                    #ifdef _OPENMP
                    #pragma omp parallel num_threads(__pyx_cur_scope->__pyx_v_n_threads) private(__pyx_t_10) firstprivate(__pyx_t_6, __pyx_t_15, __pyx_t_17, __pyx_t_16, __pyx_t_18) private(__pyx_filename, __pyx_lineno, __pyx_clineno) shared(__pyx_parallel_why, __pyx_parallel_exc_type, __pyx_parallel_exc_value, __pyx_parallel_exc_tb)
                    #endif /* _OPENMP */
                    {
                        #ifdef _OPENMP
                        #ifdef WITH_THREAD
                        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
                        #endif
                        Py_BEGIN_ALLOW_THREADS
                        #endif /* _OPENMP */
                        #ifdef _OPENMP
                        #pragma omp for lastprivate(__pyx_t_3) firstprivate(__pyx_t_11) lastprivate(__pyx_t_11)
                        #endif /* _OPENMP */
                        for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13++){
                            if (__pyx_parallel_why < 2)
                            {
                                __pyx_t_11 = 0 + 1 * __pyx_t_13;
                                /* Initialize private variables to invalid values */
                                __pyx_t_3 = ((int)0xbad0bad0);

                                /* "spacy/syntax/parser.pyx":137
 *                 with nogil:
 *                     for i in cython.parallel.prange(batch_size, num_threads=n_threads):
 *                         status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)             # <<<<<<<<<<<<<<
 *                         if status != 0:
 *                             with gil:
 */
                                __pyx_t_3 = ((struct __pyx_vtabstruct_5spacy_6syntax_6parser_Parser *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->parseC(__pyx_cur_scope->__pyx_v_self, (__pyx_cur_scope->__pyx_v_doc_ptr[__pyx_t_11]), (__pyx_cur_scope->__pyx_v_lengths[__pyx_t_11]), __pyx_cur_scope->__pyx_v_nr_feat, __pyx_cur_scope->__pyx_v_nr_class);

                                /* "spacy/syntax/parser.pyx":138
 *                     for i in cython.parallel.prange(batch_size, num_threads=n_threads):
 *                         status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)
 *                         if status != 0:             # <<<<<<<<<<<<<<
 *                             with gil:
 *                                 raise ParserStateError(queue[i])
 */
                                __pyx_t_10 = ((__pyx_t_3 != 0) != 0);
                                if (__pyx_t_10) {

                                  /* "spacy/syntax/parser.pyx":139
 *                         status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)
 *                         if status != 0:
 *                             with gil:             # <<<<<<<<<<<<<<
 *                                 raise ParserStateError(queue[i])
 *                 PyErr_CheckSignals()
 */
                                  {
                                      #ifdef WITH_THREAD
                                      PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
                                      #endif
                                      /*try:*/ {

                                        /* "spacy/syntax/parser.pyx":140
 *                         if status != 0:
 *                             with gil:
 *                                 raise ParserStateError(queue[i])             # <<<<<<<<<<<<<<
 *                 PyErr_CheckSignals()
 *                 for doc in queue:
 */
                                        __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_ParserStateError); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
                                        __Pyx_GOTREF(__pyx_t_15);
                                        __pyx_t_16 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_queue, __pyx_t_11, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_16 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L20_error;};
                                        __Pyx_GOTREF(__pyx_t_16);
                                        __pyx_t_17 = NULL;
                                        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_15))) {
                                          __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_15);
                                          if (likely(__pyx_t_17)) {
                                            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
                                            __Pyx_INCREF(__pyx_t_17);
                                            __Pyx_INCREF(function);
                                            __Pyx_DECREF_SET(__pyx_t_15, function);
                                          }
                                        }
                                        if (!__pyx_t_17) {
                                          __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
                                          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                                          __Pyx_GOTREF(__pyx_t_6);
                                        } else {
                                          __pyx_t_18 = PyTuple_New(1+1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
                                          __Pyx_GOTREF(__pyx_t_18);
                                          __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_17); __pyx_t_17 = NULL;
                                          __Pyx_GIVEREF(__pyx_t_16);
                                          PyTuple_SET_ITEM(__pyx_t_18, 0+1, __pyx_t_16);
                                          __pyx_t_16 = 0;
                                          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_18, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
                                          __Pyx_GOTREF(__pyx_t_6);
                                          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                                        }
                                        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                                        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
                                        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                                        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
                                      }

                                      /* "spacy/syntax/parser.pyx":139
 *                         status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)
 *                         if status != 0:
 *                             with gil:             # <<<<<<<<<<<<<<
 *                                 raise ParserStateError(queue[i])
 *                 PyErr_CheckSignals()
 */
                                      /*finally:*/ {
                                        __pyx_L20_error: {
                                          #ifdef WITH_THREAD
                                          PyGILState_Release(__pyx_gilstate_save);
                                          #endif
                                          goto __pyx_L14_error;
                                        }
                                      }
                                  }

                                  /* "spacy/syntax/parser.pyx":138
 *                     for i in cython.parallel.prange(batch_size, num_threads=n_threads):
 *                         status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)
 *                         if status != 0:             # <<<<<<<<<<<<<<
 *                             with gil:
 *                                 raise ParserStateError(queue[i])
 */
                                }
                                goto __pyx_L23;
                                __pyx_L14_error:;
                                {
                                    #ifdef WITH_THREAD
                                    PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
                                    #endif
                                    #ifdef _OPENMP
                                    #pragma omp flush(__pyx_parallel_exc_type)
                                    #endif /* _OPENMP */
                                    if (!__pyx_parallel_exc_type) {
                                      __Pyx_ErrFetch(&__pyx_parallel_exc_type, &__pyx_parallel_exc_value, &__pyx_parallel_exc_tb);
                                      __pyx_parallel_filename = __pyx_filename; __pyx_parallel_lineno = __pyx_lineno; __pyx_parallel_clineno = __pyx_clineno;
                                      __Pyx_GOTREF(__pyx_parallel_exc_type);
                                    }
                                    #ifdef WITH_THREAD
                                    PyGILState_Release(__pyx_gilstate_save);
                                    #endif
                                }
                                __pyx_parallel_why = 4;
                                goto __pyx_L22;
                                __pyx_L22:;
                                #ifdef _OPENMP
                                #pragma omp critical(__pyx_parallel_lastprivates0)
                                #endif /* _OPENMP */
                                {
                                    __pyx_parallel_temp0 = __pyx_t_3;
                                    __pyx_parallel_temp1 = __pyx_t_11;
                                }
                                __pyx_L23:;
                                #ifdef _OPENMP
                                #pragma omp flush(__pyx_parallel_why)
                                #endif /* _OPENMP */
                            }
                        }
                        #ifdef _OPENMP
                        Py_END_ALLOW_THREADS
                        #else
{
#ifdef WITH_THREAD
                        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
                        #endif
                        #endif /* _OPENMP */
                        /* Clean up any temporaries */
                        __Pyx_XDECREF(__pyx_t_6);
                        __pyx_t_6 = NULL;
                        __Pyx_XDECREF(__pyx_t_15);
                        __pyx_t_15 = NULL;
                        __Pyx_XDECREF(__pyx_t_17);
                        __pyx_t_17 = NULL;
                        __Pyx_XDECREF(__pyx_t_16);
                        __pyx_t_16 = NULL;
                        __Pyx_XDECREF(__pyx_t_18);
                        __pyx_t_18 = NULL;
                        #ifdef WITH_THREAD
                        PyGILState_Release(__pyx_gilstate_save);
                        #endif
                        #ifndef _OPENMP
}
#endif /* _OPENMP */
                    }
                }
                if (__pyx_parallel_exc_type) {
                  /* This may have been overridden by a continue, break or return in another thread. Prefer the error. */
                  __pyx_parallel_why = 4;
                }
                if (__pyx_parallel_why) {
                  __pyx_t_3 = __pyx_parallel_temp0;
                  __pyx_t_11 = __pyx_parallel_temp1;
                  switch (__pyx_parallel_why) {
                        case 3: goto __pyx_L9_return;
                        case 4:
                    {
                        #ifdef WITH_THREAD
                        PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
                        #endif
                        __Pyx_GIVEREF(__pyx_parallel_exc_type);
                        __Pyx_ErrRestore(__pyx_parallel_exc_type, __pyx_parallel_exc_value, __pyx_parallel_exc_tb);
                        __pyx_filename = __pyx_parallel_filename; __pyx_lineno = __pyx_parallel_lineno; __pyx_clineno = __pyx_parallel_clineno;
                        #ifdef WITH_THREAD
                        PyGILState_Release(__pyx_gilstate_save);
                        #endif
                    }
                    goto __pyx_L10_error;
                  }
                }
            }
            #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
                #undef likely
                #undef unlikely
                #define likely(x)   __builtin_expect(!!(x), 1)
                #define unlikely(x) __builtin_expect(!!(x), 0)
            #endif
            __pyx_cur_scope->__pyx_v_status = __pyx_t_3;
            __pyx_cur_scope->__pyx_v_i = __pyx_t_11;
          }

          /* "spacy/syntax/parser.pyx":135
 *             queue.append(doc)
 *             if len(queue) == batch_size:
 *                 with nogil:             # <<<<<<<<<<<<<<
 *                     for i in cython.parallel.prange(batch_size, num_threads=n_threads):
 *                         status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)
 */
          /*finally:*/ {
            /*normal exit:*/{
              #ifdef WITH_THREAD
              Py_BLOCK_THREADS
              #endif
              goto __pyx_L11;
            }
            __pyx_L9_return: {
              #ifdef WITH_THREAD
              Py_BLOCK_THREADS
              #endif
              goto __pyx_L0;
            }
            __pyx_L10_error: {
              #ifdef WITH_THREAD
              Py_BLOCK_THREADS
              #endif
              goto __pyx_L1_error;
            }
            __pyx_L11:;
          }
      }

      /* "spacy/syntax/parser.pyx":141
 *                             with gil:
 *                                 raise ParserStateError(queue[i])
 *                 PyErr_CheckSignals()             # <<<<<<<<<<<<<<
 *                 for doc in queue:
 *                     self.moves.finalize_doc(doc)
 */
      __pyx_t_11 = PyErr_CheckSignals(); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "spacy/syntax/parser.pyx":142
 *                                 raise ParserStateError(queue[i])
 *                 PyErr_CheckSignals()
 *                 for doc in queue:             # <<<<<<<<<<<<<<
 *                     self.moves.finalize_doc(doc)
 *                     yield doc
 */
      __pyx_t_6 = __pyx_cur_scope->__pyx_v_queue; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0;
      for (;;) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_15 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_15); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_15 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_15);
        #endif
        if (!(likely(((__pyx_t_15) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_15, __pyx_ptype_5spacy_6tokens_3doc_Doc))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_doc));
        __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_doc, ((struct __pyx_obj_5spacy_6tokens_3doc_Doc *)__pyx_t_15));
        __Pyx_GIVEREF(__pyx_t_15);
        __pyx_t_15 = 0;

        /* "spacy/syntax/parser.pyx":143
 *                 PyErr_CheckSignals()
 *                 for doc in queue:
 *                     self.moves.finalize_doc(doc)             # <<<<<<<<<<<<<<
 *                     yield doc
 *                 queue = []
 */
        __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->moves), __pyx_n_s_finalize_doc); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_16 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_18))) {
          __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_18);
          if (likely(__pyx_t_16)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
            __Pyx_INCREF(__pyx_t_16);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_18, function);
          }
        }
        if (!__pyx_t_16) {
          __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_18, ((PyObject *)__pyx_cur_scope->__pyx_v_doc)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_15);
        } else {
          __pyx_t_17 = PyTuple_New(1+1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_17);
          __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
          __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_doc));
          __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_doc));
          PyTuple_SET_ITEM(__pyx_t_17, 0+1, ((PyObject *)__pyx_cur_scope->__pyx_v_doc));
          __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_17, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        }
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

        /* "spacy/syntax/parser.pyx":144
 *                 for doc in queue:
 *                     self.moves.finalize_doc(doc)
 *                     yield doc             # <<<<<<<<<<<<<<
 *                 queue = []
 *         batch_size = len(queue)
 */
        __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_doc));
        __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_doc);
        __Pyx_XGIVEREF(__pyx_t_1);
        __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
        __pyx_cur_scope->__pyx_t_1 = __pyx_t_4;
        __pyx_cur_scope->__pyx_t_2 = __pyx_t_5;
        __Pyx_XGIVEREF(__pyx_t_6);
        __pyx_cur_scope->__pyx_t_3 = __pyx_t_6;
        __pyx_cur_scope->__pyx_t_4 = __pyx_t_8;
        __Pyx_XGIVEREF(__pyx_r);
        __Pyx_RefNannyFinishContext();
        /* return from generator, yielding value */
        __pyx_generator->resume_label = 1;
        return __pyx_r;
        __pyx_L26_resume_from_yield:;
        __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
        __pyx_cur_scope->__pyx_t_0 = 0;
        __Pyx_XGOTREF(__pyx_t_1);
        __pyx_t_4 = __pyx_cur_scope->__pyx_t_1;
        __pyx_t_5 = __pyx_cur_scope->__pyx_t_2;
        __pyx_t_6 = __pyx_cur_scope->__pyx_t_3;
        __pyx_cur_scope->__pyx_t_3 = 0;
        __Pyx_XGOTREF(__pyx_t_6);
        __pyx_t_8 = __pyx_cur_scope->__pyx_t_4;
        if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "spacy/syntax/parser.pyx":142
 *                                 raise ParserStateError(queue[i])
 *                 PyErr_CheckSignals()
 *                 for doc in queue:             # <<<<<<<<<<<<<<
 *                     self.moves.finalize_doc(doc)
 *                     yield doc
 */
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "spacy/syntax/parser.pyx":145
 *                     self.moves.finalize_doc(doc)
 *                     yield doc
 *                 queue = []             # <<<<<<<<<<<<<<
 *         batch_size = len(queue)
 *         with nogil:
 */
      __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_queue);
      __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_queue, ((PyObject*)__pyx_t_6));
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_6 = 0;

      /* "spacy/syntax/parser.pyx":134
 *             lengths[len(queue)] = doc.length
 *             queue.append(doc)
 *             if len(queue) == batch_size:             # <<<<<<<<<<<<<<
 *                 with nogil:
 *                     for i in cython.parallel.prange(batch_size, num_threads=n_threads):
 */
    }

    /* "spacy/syntax/parser.pyx":130
 *         cdef int status
 *         queue = []
 *         for doc in stream:             # <<<<<<<<<<<<<<
 *             doc_ptr[len(queue)] = doc.c
 *             lengths[len(queue)] = doc.length
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spacy/syntax/parser.pyx":146
 *                     yield doc
 *                 queue = []
 *         batch_size = len(queue)             # <<<<<<<<<<<<<<
 *         with nogil:
 *             for i in cython.parallel.prange(batch_size, num_threads=n_threads):
 */
  __pyx_t_4 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_queue); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_cur_scope->__pyx_v_batch_size = __pyx_t_4;

  /* "spacy/syntax/parser.pyx":147
 *                 queue = []
 *         batch_size = len(queue)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             for i in cython.parallel.prange(batch_size, num_threads=n_threads):
 *                 status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      #endif
      /*try:*/ {

        /* "spacy/syntax/parser.pyx":148
 *         batch_size = len(queue)
 *         with nogil:
 *             for i in cython.parallel.prange(batch_size, num_threads=n_threads):             # <<<<<<<<<<<<<<
 *                 status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)
 *                 if status != 0:
 */
        __pyx_t_11 = __pyx_cur_scope->__pyx_v_status;
        __pyx_t_3 = __pyx_cur_scope->__pyx_v_i;
        __pyx_t_14 = __pyx_cur_scope->__pyx_v_batch_size;
        if (1 == 0) abort();
        {
            int __pyx_parallel_temp0 = 0xbad0bad0;
            int __pyx_parallel_temp1 = 0xbad0bad0;
            const char *__pyx_parallel_filename = NULL; int __pyx_parallel_lineno = 0, __pyx_parallel_clineno = 0;
            PyObject *__pyx_parallel_exc_type = NULL, *__pyx_parallel_exc_value = NULL, *__pyx_parallel_exc_tb = NULL;
            int __pyx_parallel_why;
            __pyx_parallel_why = 0;
            #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
                #undef likely
                #undef unlikely
                #define likely(x)   (x)
                #define unlikely(x) (x)
            #endif
            __pyx_t_12 = (__pyx_t_14 - 0 + 1 - 1/abs(1)) / 1;
            if (__pyx_t_12 > 0)
            {
                #ifdef _OPENMP
                #pragma omp parallel num_threads(__pyx_cur_scope->__pyx_v_n_threads) private(__pyx_t_10) firstprivate(__pyx_t_1, __pyx_t_6, __pyx_t_15, __pyx_t_17, __pyx_t_18) private(__pyx_filename, __pyx_lineno, __pyx_clineno) shared(__pyx_parallel_why, __pyx_parallel_exc_type, __pyx_parallel_exc_value, __pyx_parallel_exc_tb)
                #endif /* _OPENMP */
                {
                    #ifdef _OPENMP
                    #ifdef WITH_THREAD
                    PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
                    #endif
                    Py_BEGIN_ALLOW_THREADS
                    #endif /* _OPENMP */
                    #ifdef _OPENMP
                    #pragma omp for lastprivate(__pyx_t_11) firstprivate(__pyx_t_3) lastprivate(__pyx_t_3)
                    #endif /* _OPENMP */
                    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13++){
                        if (__pyx_parallel_why < 2)
                        {
                            __pyx_t_3 = 0 + 1 * __pyx_t_13;
                            /* Initialize private variables to invalid values */
                            __pyx_t_11 = ((int)0xbad0bad0);

                            /* "spacy/syntax/parser.pyx":149
 *         with nogil:
 *             for i in cython.parallel.prange(batch_size, num_threads=n_threads):
 *                 status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)             # <<<<<<<<<<<<<<
 *                 if status != 0:
 *                     with gil:
 */
                            __pyx_t_11 = ((struct __pyx_vtabstruct_5spacy_6syntax_6parser_Parser *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->parseC(__pyx_cur_scope->__pyx_v_self, (__pyx_cur_scope->__pyx_v_doc_ptr[__pyx_t_3]), (__pyx_cur_scope->__pyx_v_lengths[__pyx_t_3]), __pyx_cur_scope->__pyx_v_nr_feat, __pyx_cur_scope->__pyx_v_nr_class);

                            /* "spacy/syntax/parser.pyx":150
 *             for i in cython.parallel.prange(batch_size, num_threads=n_threads):
 *                 status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)
 *                 if status != 0:             # <<<<<<<<<<<<<<
 *                     with gil:
 *                         raise ParserStateError(queue[i])
 */
                            __pyx_t_10 = ((__pyx_t_11 != 0) != 0);
                            if (__pyx_t_10) {

                              /* "spacy/syntax/parser.pyx":151
 *                 status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)
 *                 if status != 0:
 *                     with gil:             # <<<<<<<<<<<<<<
 *                         raise ParserStateError(queue[i])
 *         PyErr_CheckSignals()
 */
                              {
                                  #ifdef WITH_THREAD
                                  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
                                  #endif
                                  /*try:*/ {

                                    /* "spacy/syntax/parser.pyx":152
 *                 if status != 0:
 *                     with gil:
 *                         raise ParserStateError(queue[i])             # <<<<<<<<<<<<<<
 *         PyErr_CheckSignals()
 *         for doc in queue:
 */
                                    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_ParserStateError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L38_error;}
                                    __Pyx_GOTREF(__pyx_t_6);
                                    __pyx_t_15 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_queue, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_15 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L38_error;};
                                    __Pyx_GOTREF(__pyx_t_15);
                                    __pyx_t_18 = NULL;
                                    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
                                      __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_6);
                                      if (likely(__pyx_t_18)) {
                                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                                        __Pyx_INCREF(__pyx_t_18);
                                        __Pyx_INCREF(function);
                                        __Pyx_DECREF_SET(__pyx_t_6, function);
                                      }
                                    }
                                    if (!__pyx_t_18) {
                                      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L38_error;}
                                      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                                      __Pyx_GOTREF(__pyx_t_1);
                                    } else {
                                      __pyx_t_17 = PyTuple_New(1+1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L38_error;}
                                      __Pyx_GOTREF(__pyx_t_17);
                                      __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_18); __pyx_t_18 = NULL;
                                      __Pyx_GIVEREF(__pyx_t_15);
                                      PyTuple_SET_ITEM(__pyx_t_17, 0+1, __pyx_t_15);
                                      __pyx_t_15 = 0;
                                      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L38_error;}
                                      __Pyx_GOTREF(__pyx_t_1);
                                      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
                                    }
                                    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                                    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
                                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                                    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L38_error;}
                                  }

                                  /* "spacy/syntax/parser.pyx":151
 *                 status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)
 *                 if status != 0:
 *                     with gil:             # <<<<<<<<<<<<<<
 *                         raise ParserStateError(queue[i])
 *         PyErr_CheckSignals()
 */
                                  /*finally:*/ {
                                    __pyx_L38_error: {
                                      #ifdef WITH_THREAD
                                      PyGILState_Release(__pyx_gilstate_save);
                                      #endif
                                      goto __pyx_L32_error;
                                    }
                                  }
                              }

                              /* "spacy/syntax/parser.pyx":150
 *             for i in cython.parallel.prange(batch_size, num_threads=n_threads):
 *                 status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)
 *                 if status != 0:             # <<<<<<<<<<<<<<
 *                     with gil:
 *                         raise ParserStateError(queue[i])
 */
                            }
                            goto __pyx_L41;
                            __pyx_L32_error:;
                            {
                                #ifdef WITH_THREAD
                                PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
                                #endif
                                #ifdef _OPENMP
                                #pragma omp flush(__pyx_parallel_exc_type)
                                #endif /* _OPENMP */
                                if (!__pyx_parallel_exc_type) {
                                  __Pyx_ErrFetch(&__pyx_parallel_exc_type, &__pyx_parallel_exc_value, &__pyx_parallel_exc_tb);
                                  __pyx_parallel_filename = __pyx_filename; __pyx_parallel_lineno = __pyx_lineno; __pyx_parallel_clineno = __pyx_clineno;
                                  __Pyx_GOTREF(__pyx_parallel_exc_type);
                                }
                                #ifdef WITH_THREAD
                                PyGILState_Release(__pyx_gilstate_save);
                                #endif
                            }
                            __pyx_parallel_why = 4;
                            goto __pyx_L40;
                            __pyx_L40:;
                            #ifdef _OPENMP
                            #pragma omp critical(__pyx_parallel_lastprivates1)
                            #endif /* _OPENMP */
                            {
                                __pyx_parallel_temp0 = __pyx_t_11;
                                __pyx_parallel_temp1 = __pyx_t_3;
                            }
                            __pyx_L41:;
                            #ifdef _OPENMP
                            #pragma omp flush(__pyx_parallel_why)
                            #endif /* _OPENMP */
                        }
                    }
                    #ifdef _OPENMP
                    Py_END_ALLOW_THREADS
                    #else
{
#ifdef WITH_THREAD
                    PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
                    #endif
                    #endif /* _OPENMP */
                    /* Clean up any temporaries */
                    __Pyx_XDECREF(__pyx_t_1);
                    __pyx_t_1 = NULL;
                    __Pyx_XDECREF(__pyx_t_6);
                    __pyx_t_6 = NULL;
                    __Pyx_XDECREF(__pyx_t_15);
                    __pyx_t_15 = NULL;
                    __Pyx_XDECREF(__pyx_t_17);
                    __pyx_t_17 = NULL;
                    __Pyx_XDECREF(__pyx_t_18);
                    __pyx_t_18 = NULL;
                    #ifdef WITH_THREAD
                    PyGILState_Release(__pyx_gilstate_save);
                    #endif
                    #ifndef _OPENMP
}
#endif /* _OPENMP */
                }
            }
            if (__pyx_parallel_exc_type) {
              /* This may have been overridden by a continue, break or return in another thread. Prefer the error. */
              __pyx_parallel_why = 4;
            }
            if (__pyx_parallel_why) {
              __pyx_t_11 = __pyx_parallel_temp0;
              __pyx_t_3 = __pyx_parallel_temp1;
              switch (__pyx_parallel_why) {
                    case 3: goto __pyx_L27_return;
                    case 4:
                {
                    #ifdef WITH_THREAD
                    PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
                    #endif
                    __Pyx_GIVEREF(__pyx_parallel_exc_type);
                    __Pyx_ErrRestore(__pyx_parallel_exc_type, __pyx_parallel_exc_value, __pyx_parallel_exc_tb);
                    __pyx_filename = __pyx_parallel_filename; __pyx_lineno = __pyx_parallel_lineno; __pyx_clineno = __pyx_parallel_clineno;
                    #ifdef WITH_THREAD
                    PyGILState_Release(__pyx_gilstate_save);
                    #endif
                }
                goto __pyx_L28_error;
              }
            }
        }
        #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
            #undef likely
            #undef unlikely
            #define likely(x)   __builtin_expect(!!(x), 1)
            #define unlikely(x) __builtin_expect(!!(x), 0)
        #endif
        __pyx_cur_scope->__pyx_v_status = __pyx_t_11;
        __pyx_cur_scope->__pyx_v_i = __pyx_t_3;
      }

      /* "spacy/syntax/parser.pyx":147
 *                 queue = []
 *         batch_size = len(queue)
 *         with nogil:             # <<<<<<<<<<<<<<
 *             for i in cython.parallel.prange(batch_size, num_threads=n_threads):
 *                 status = self.parseC(doc_ptr[i], lengths[i], nr_feat, nr_class)
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L29;
        }
        __pyx_L27_return: {
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L0;
        }
        __pyx_L28_error: {
          #ifdef WITH_THREAD
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L1_error;
        }
        __pyx_L29:;
      }
  }

  /* "spacy/syntax/parser.pyx":153
 *                     with gil:
 *                         raise ParserStateError(queue[i])
 *         PyErr_CheckSignals()             # <<<<<<<<<<<<<<
 *         for doc in queue:
 *             self.moves.finalize_doc(doc)
 */
  __pyx_t_3 = PyErr_CheckSignals(); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "spacy/syntax/parser.pyx":154
 *                         raise ParserStateError(queue[i])
 *         PyErr_CheckSignals()
 *         for doc in queue:             # <<<<<<<<<<<<<<
 *             self.moves.finalize_doc(doc)
 *             yield doc
 */
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_queue; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5spacy_6tokens_3doc_Doc))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_doc));
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_doc, ((struct __pyx_obj_5spacy_6tokens_3doc_Doc *)__pyx_t_6));
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;

    /* "spacy/syntax/parser.pyx":155
 *         PyErr_CheckSignals()
 *         for doc in queue:
 *             self.moves.finalize_doc(doc)             # <<<<<<<<<<<<<<
 *             yield doc
 * 
 */
    __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->moves), __pyx_n_s_finalize_doc); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __pyx_t_15 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_17))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_17);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_17, function);
      }
    }
    if (!__pyx_t_15) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_17, ((PyObject *)__pyx_cur_scope->__pyx_v_doc)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      __pyx_t_18 = PyTuple_New(1+1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_15); __pyx_t_15 = NULL;
      __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_doc));
      __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_doc));
      PyTuple_SET_ITEM(__pyx_t_18, 0+1, ((PyObject *)__pyx_cur_scope->__pyx_v_doc));
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_18, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    }
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "spacy/syntax/parser.pyx":156
 *         for doc in queue:
 *             self.moves.finalize_doc(doc)
 *             yield doc             # <<<<<<<<<<<<<<
 * 
 *     cdef int parseC(self, TokenC* tokens, int length, int nr_feat, int nr_class) nogil:
 */
    __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_doc));
    __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_doc);
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_4;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 2;
    return __pyx_r;
    __pyx_L44_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_1;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "spacy/syntax/parser.pyx":154
 *                         raise ParserStateError(queue[i])
 *         PyErr_CheckSignals()
 *         for doc in queue:             # <<<<<<<<<<<<<<
 *             self.moves.finalize_doc(doc)
 *             yield doc
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spacy/syntax/parser.pyx":120
 *         self.moves.finalize_doc(tokens)
 * 
 *     def pipe(self, stream, int batch_size=1000, int n_threads=2):             # <<<<<<<<<<<<<<
 *         cdef Pool mem = Pool()
 *         cdef TokenC** doc_ptr = <TokenC**>mem.alloc(batch_size, sizeof(TokenC*))
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("pipe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":158
 *             yield doc
 * 
 *     cdef int parseC(self, TokenC* tokens, int length, int nr_feat, int nr_class) nogil:             # <<<<<<<<<<<<<<
 *         cdef ExampleC eg
 *         eg.nr_feat = nr_feat
 */

static int __pyx_f_5spacy_6syntax_6parser_6Parser_parseC(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, struct __pyx_t_5spacy_7structs_TokenC *__pyx_v_tokens, int __pyx_v_length, int __pyx_v_nr_feat, int __pyx_v_nr_class) {
  struct __pyx_t_5thinc_7structs_ExampleC __pyx_v_eg;
  __pyx_t_5spacy_6syntax_6_state_StateC *__pyx_v_state;
  int __pyx_v_i;
  int __pyx_v_guess;
  struct __pyx_t_5spacy_6syntax_17transition_system_Transition __pyx_v_action;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "spacy/syntax/parser.pyx":160
 *     cdef int parseC(self, TokenC* tokens, int length, int nr_feat, int nr_class) nogil:
 *         cdef ExampleC eg
 *         eg.nr_feat = nr_feat             # <<<<<<<<<<<<<<
 *         eg.nr_atom = CONTEXT_SIZE
 *         eg.nr_class = nr_class
 */
  __pyx_v_eg.nr_feat = __pyx_v_nr_feat;

  /* "spacy/syntax/parser.pyx":161
 *         cdef ExampleC eg
 *         eg.nr_feat = nr_feat
 *         eg.nr_atom = CONTEXT_SIZE             # <<<<<<<<<<<<<<
 *         eg.nr_class = nr_class
 *         eg.features = <FeatureC*>calloc(sizeof(FeatureC), nr_feat)
 */
  __pyx_v_eg.nr_atom = __pyx_e_5spacy_6syntax_15_parse_features_CONTEXT_SIZE;

  /* "spacy/syntax/parser.pyx":162
 *         eg.nr_feat = nr_feat
 *         eg.nr_atom = CONTEXT_SIZE
 *         eg.nr_class = nr_class             # <<<<<<<<<<<<<<
 *         eg.features = <FeatureC*>calloc(sizeof(FeatureC), nr_feat)
 *         eg.atoms = <atom_t*>calloc(sizeof(atom_t), CONTEXT_SIZE)
 */
  __pyx_v_eg.nr_class = __pyx_v_nr_class;

  /* "spacy/syntax/parser.pyx":163
 *         eg.nr_atom = CONTEXT_SIZE
 *         eg.nr_class = nr_class
 *         eg.features = <FeatureC*>calloc(sizeof(FeatureC), nr_feat)             # <<<<<<<<<<<<<<
 *         eg.atoms = <atom_t*>calloc(sizeof(atom_t), CONTEXT_SIZE)
 *         eg.scores = <weight_t*>calloc(sizeof(weight_t), nr_class)
 */
  __pyx_v_eg.features = ((struct __pyx_t_5thinc_7structs_FeatureC *)calloc((sizeof(struct __pyx_t_5thinc_7structs_FeatureC)), __pyx_v_nr_feat));

  /* "spacy/syntax/parser.pyx":164
 *         eg.nr_class = nr_class
 *         eg.features = <FeatureC*>calloc(sizeof(FeatureC), nr_feat)
 *         eg.atoms = <atom_t*>calloc(sizeof(atom_t), CONTEXT_SIZE)             # <<<<<<<<<<<<<<
 *         eg.scores = <weight_t*>calloc(sizeof(weight_t), nr_class)
 *         eg.is_valid = <int*>calloc(sizeof(int), nr_class)
 */
  __pyx_v_eg.atoms = ((__pyx_t_5thinc_8typedefs_atom_t *)calloc((sizeof(__pyx_t_5thinc_8typedefs_atom_t)), __pyx_e_5spacy_6syntax_15_parse_features_CONTEXT_SIZE));

  /* "spacy/syntax/parser.pyx":165
 *         eg.features = <FeatureC*>calloc(sizeof(FeatureC), nr_feat)
 *         eg.atoms = <atom_t*>calloc(sizeof(atom_t), CONTEXT_SIZE)
 *         eg.scores = <weight_t*>calloc(sizeof(weight_t), nr_class)             # <<<<<<<<<<<<<<
 *         eg.is_valid = <int*>calloc(sizeof(int), nr_class)
 *         state = new StateC(tokens, length)
 */
  __pyx_v_eg.scores = ((__pyx_t_5thinc_8typedefs_weight_t *)calloc((sizeof(__pyx_t_5thinc_8typedefs_weight_t)), __pyx_v_nr_class));

  /* "spacy/syntax/parser.pyx":166
 *         eg.atoms = <atom_t*>calloc(sizeof(atom_t), CONTEXT_SIZE)
 *         eg.scores = <weight_t*>calloc(sizeof(weight_t), nr_class)
 *         eg.is_valid = <int*>calloc(sizeof(int), nr_class)             # <<<<<<<<<<<<<<
 *         state = new StateC(tokens, length)
 *         self.moves.initialize_state(state)
 */
  __pyx_v_eg.is_valid = ((int *)calloc((sizeof(int)), __pyx_v_nr_class));

  /* "spacy/syntax/parser.pyx":167
 *         eg.scores = <weight_t*>calloc(sizeof(weight_t), nr_class)
 *         eg.is_valid = <int*>calloc(sizeof(int), nr_class)
 *         state = new StateC(tokens, length)             # <<<<<<<<<<<<<<
 *         self.moves.initialize_state(state)
 *         cdef int i
 */
  __pyx_v_state = new __pyx_t_5spacy_6syntax_6_state_StateC(__pyx_v_tokens, __pyx_v_length);

  /* "spacy/syntax/parser.pyx":168
 *         eg.is_valid = <int*>calloc(sizeof(int), nr_class)
 *         state = new StateC(tokens, length)
 *         self.moves.initialize_state(state)             # <<<<<<<<<<<<<<
 *         cdef int i
 *         while not state.is_final():
 */
  ((struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->initialize_state(__pyx_v_self->moves, __pyx_v_state);

  /* "spacy/syntax/parser.pyx":170
 *         self.moves.initialize_state(state)
 *         cdef int i
 *         while not state.is_final():             # <<<<<<<<<<<<<<
 *             self.model.set_featuresC(&eg, state)
 *             self.moves.set_valid(eg.is_valid, state)
 */
  while (1) {
    __pyx_t_1 = ((!(__pyx_v_state->is_final() != 0)) != 0);
    if (!__pyx_t_1) break;

    /* "spacy/syntax/parser.pyx":171
 *         cdef int i
 *         while not state.is_final():
 *             self.model.set_featuresC(&eg, state)             # <<<<<<<<<<<<<<
 *             self.moves.set_valid(eg.is_valid, state)
 *             self.model.set_scoresC(eg.scores, eg.features, eg.nr_feat)
 */
    ((struct __pyx_vtabstruct_5spacy_6syntax_6parser_ParserModel *)__pyx_v_self->model->__pyx_base.__pyx_vtab)->set_featuresC(__pyx_v_self->model, (&__pyx_v_eg), __pyx_v_state);

    /* "spacy/syntax/parser.pyx":172
 *         while not state.is_final():
 *             self.model.set_featuresC(&eg, state)
 *             self.moves.set_valid(eg.is_valid, state)             # <<<<<<<<<<<<<<
 *             self.model.set_scoresC(eg.scores, eg.features, eg.nr_feat)
 * 
 */
    ((struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->set_valid(__pyx_v_self->moves, __pyx_v_eg.is_valid, __pyx_v_state);

    /* "spacy/syntax/parser.pyx":173
 *             self.model.set_featuresC(&eg, state)
 *             self.moves.set_valid(eg.is_valid, state)
 *             self.model.set_scoresC(eg.scores, eg.features, eg.nr_feat)             # <<<<<<<<<<<<<<
 * 
 *             guess = VecVec.arg_max_if_true(eg.scores, eg.is_valid, eg.nr_class)
 */
    ((struct __pyx_vtabstruct_5spacy_6syntax_6parser_ParserModel *)__pyx_v_self->model->__pyx_base.__pyx_vtab)->__pyx_base.set_scoresC(((struct __pyx_obj_5thinc_6linear_7avgtron_AveragedPerceptron *)__pyx_v_self->model), __pyx_v_eg.scores, __pyx_v_eg.features, __pyx_v_eg.nr_feat);

    /* "spacy/syntax/parser.pyx":175
 *             self.model.set_scoresC(eg.scores, eg.features, eg.nr_feat)
 * 
 *             guess = VecVec.arg_max_if_true(eg.scores, eg.is_valid, eg.nr_class)             # <<<<<<<<<<<<<<
 * 
 *             action = self.moves.c[guess]
 */
    __pyx_v_guess = __pyx_f_5thinc_6linalg_6VecVec_arg_max_if_true(__pyx_v_eg.scores, __pyx_v_eg.is_valid, __pyx_v_eg.nr_class);

    /* "spacy/syntax/parser.pyx":177
 *             guess = VecVec.arg_max_if_true(eg.scores, eg.is_valid, eg.nr_class)
 * 
 *             action = self.moves.c[guess]             # <<<<<<<<<<<<<<
 *             if not eg.is_valid[guess]:
 *                 return 1
 */
    __pyx_v_action = (__pyx_v_self->moves->c[__pyx_v_guess]);

    /* "spacy/syntax/parser.pyx":178
 * 
 *             action = self.moves.c[guess]
 *             if not eg.is_valid[guess]:             # <<<<<<<<<<<<<<
 *                 return 1
 * 
 */
    __pyx_t_1 = ((!((__pyx_v_eg.is_valid[__pyx_v_guess]) != 0)) != 0);
    if (__pyx_t_1) {

      /* "spacy/syntax/parser.pyx":179
 *             action = self.moves.c[guess]
 *             if not eg.is_valid[guess]:
 *                 return 1             # <<<<<<<<<<<<<<
 * 
 *             action.do(state, action.label)
 */
      __pyx_r = 1;
      goto __pyx_L0;

      /* "spacy/syntax/parser.pyx":178
 * 
 *             action = self.moves.c[guess]
 *             if not eg.is_valid[guess]:             # <<<<<<<<<<<<<<
 *                 return 1
 * 
 */
    }

    /* "spacy/syntax/parser.pyx":181
 *                 return 1
 * 
 *             action.do(state, action.label)             # <<<<<<<<<<<<<<
 *             memset(eg.scores, 0, sizeof(eg.scores[0]) * eg.nr_class)
 *             for i in range(eg.nr_class):
 */
    __pyx_v_action.__pyx_do(__pyx_v_state, __pyx_v_action.label);

    /* "spacy/syntax/parser.pyx":182
 * 
 *             action.do(state, action.label)
 *             memset(eg.scores, 0, sizeof(eg.scores[0]) * eg.nr_class)             # <<<<<<<<<<<<<<
 *             for i in range(eg.nr_class):
 *                 eg.is_valid[i] = 1
 */
    memset(__pyx_v_eg.scores, 0, ((sizeof((__pyx_v_eg.scores[0]))) * __pyx_v_eg.nr_class));

    /* "spacy/syntax/parser.pyx":183
 *             action.do(state, action.label)
 *             memset(eg.scores, 0, sizeof(eg.scores[0]) * eg.nr_class)
 *             for i in range(eg.nr_class):             # <<<<<<<<<<<<<<
 *                 eg.is_valid[i] = 1
 *         self.moves.finalize_state(state)
 */
    __pyx_t_2 = __pyx_v_eg.nr_class;
    for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
      __pyx_v_i = __pyx_t_3;

      /* "spacy/syntax/parser.pyx":184
 *             memset(eg.scores, 0, sizeof(eg.scores[0]) * eg.nr_class)
 *             for i in range(eg.nr_class):
 *                 eg.is_valid[i] = 1             # <<<<<<<<<<<<<<
 *         self.moves.finalize_state(state)
 *         for i in range(length):
 */
      (__pyx_v_eg.is_valid[__pyx_v_i]) = 1;
    }
  }

  /* "spacy/syntax/parser.pyx":185
 *             for i in range(eg.nr_class):
 *                 eg.is_valid[i] = 1
 *         self.moves.finalize_state(state)             # <<<<<<<<<<<<<<
 *         for i in range(length):
 *             tokens[i] = state._sent[i]
 */
  ((struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->finalize_state(__pyx_v_self->moves, __pyx_v_state);

  /* "spacy/syntax/parser.pyx":186
 *                 eg.is_valid[i] = 1
 *         self.moves.finalize_state(state)
 *         for i in range(length):             # <<<<<<<<<<<<<<
 *             tokens[i] = state._sent[i]
 *         del state
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "spacy/syntax/parser.pyx":187
 *         self.moves.finalize_state(state)
 *         for i in range(length):
 *             tokens[i] = state._sent[i]             # <<<<<<<<<<<<<<
 *         del state
 *         free(eg.features)
 */
    (__pyx_v_tokens[__pyx_v_i]) = (__pyx_v_state->_sent[__pyx_v_i]);
  }

  /* "spacy/syntax/parser.pyx":188
 *         for i in range(length):
 *             tokens[i] = state._sent[i]
 *         del state             # <<<<<<<<<<<<<<
 *         free(eg.features)
 *         free(eg.atoms)
 */
  delete __pyx_v_state;

  /* "spacy/syntax/parser.pyx":189
 *             tokens[i] = state._sent[i]
 *         del state
 *         free(eg.features)             # <<<<<<<<<<<<<<
 *         free(eg.atoms)
 *         free(eg.scores)
 */
  free(__pyx_v_eg.features);

  /* "spacy/syntax/parser.pyx":190
 *         del state
 *         free(eg.features)
 *         free(eg.atoms)             # <<<<<<<<<<<<<<
 *         free(eg.scores)
 *         free(eg.is_valid)
 */
  free(__pyx_v_eg.atoms);

  /* "spacy/syntax/parser.pyx":191
 *         free(eg.features)
 *         free(eg.atoms)
 *         free(eg.scores)             # <<<<<<<<<<<<<<
 *         free(eg.is_valid)
 *         return 0
 */
  free(__pyx_v_eg.scores);

  /* "spacy/syntax/parser.pyx":192
 *         free(eg.atoms)
 *         free(eg.scores)
 *         free(eg.is_valid)             # <<<<<<<<<<<<<<
 *         return 0
 * 
 */
  free(__pyx_v_eg.is_valid);

  /* "spacy/syntax/parser.pyx":193
 *         free(eg.scores)
 *         free(eg.is_valid)
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     def update(self, Doc tokens, GoldParse gold):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "spacy/syntax/parser.pyx":158
 *             yield doc
 * 
 *     cdef int parseC(self, TokenC* tokens, int length, int nr_feat, int nr_class) nogil:             # <<<<<<<<<<<<<<
 *         cdef ExampleC eg
 *         eg.nr_feat = nr_feat
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":195
 *         return 0
 * 
 *     def update(self, Doc tokens, GoldParse gold):             # <<<<<<<<<<<<<<
 *         self.moves.preprocess_gold(gold)
 *         cdef StateClass stcls = StateClass.init(tokens.c, tokens.length)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_12update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_12update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_tokens = 0;
  struct __pyx_obj_5spacy_4gold_GoldParse *__pyx_v_gold = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tokens,&__pyx_n_s_gold,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tokens)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_gold)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("update", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_tokens = ((struct __pyx_obj_5spacy_6tokens_3doc_Doc *)values[0]);
    __pyx_v_gold = ((struct __pyx_obj_5spacy_4gold_GoldParse *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tokens), __pyx_ptype_5spacy_6tokens_3doc_Doc, 1, "tokens", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gold), __pyx_ptype_5spacy_4gold_GoldParse, 1, "gold", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_6Parser_11update(((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)__pyx_v_self), __pyx_v_tokens, __pyx_v_gold);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_11update(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_tokens, struct __pyx_obj_5spacy_4gold_GoldParse *__pyx_v_gold) {
  struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_stcls = 0;
  CYTHON_UNUSED struct __pyx_obj_5cymem_5cymem_Pool *__pyx_v_mem = 0;
  struct __pyx_obj_5thinc_5extra_2eg_Example *__pyx_v_eg = 0;
  __pyx_t_5thinc_8typedefs_weight_t __pyx_v_loss;
  struct __pyx_t_5spacy_6syntax_17transition_system_Transition __pyx_v_action;
  CYTHON_UNUSED int __pyx_v_guess;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __pyx_t_5thinc_8typedefs_weight_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update", 0);

  /* "spacy/syntax/parser.pyx":196
 * 
 *     def update(self, Doc tokens, GoldParse gold):
 *         self.moves.preprocess_gold(gold)             # <<<<<<<<<<<<<<
 *         cdef StateClass stcls = StateClass.init(tokens.c, tokens.length)
 *         self.moves.initialize_state(stcls.c)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->preprocess_gold(__pyx_v_self->moves, __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "spacy/syntax/parser.pyx":197
 *     def update(self, Doc tokens, GoldParse gold):
 *         self.moves.preprocess_gold(gold)
 *         cdef StateClass stcls = StateClass.init(tokens.c, tokens.length)             # <<<<<<<<<<<<<<
 *         self.moves.initialize_state(stcls.c)
 *         cdef Pool mem = Pool()
 */
  __pyx_t_2 = ((PyObject *)__pyx_f_5spacy_6syntax_10stateclass_10StateClass_init(__pyx_v_tokens->c, __pyx_v_tokens->length)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_stcls = ((struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "spacy/syntax/parser.pyx":198
 *         self.moves.preprocess_gold(gold)
 *         cdef StateClass stcls = StateClass.init(tokens.c, tokens.length)
 *         self.moves.initialize_state(stcls.c)             # <<<<<<<<<<<<<<
 *         cdef Pool mem = Pool()
 *         cdef Example eg = Example(
 */
  ((struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->initialize_state(__pyx_v_self->moves, __pyx_v_stcls->c);

  /* "spacy/syntax/parser.pyx":199
 *         cdef StateClass stcls = StateClass.init(tokens.c, tokens.length)
 *         self.moves.initialize_state(stcls.c)
 *         cdef Pool mem = Pool()             # <<<<<<<<<<<<<<
 *         cdef Example eg = Example(
 *                 nr_class=self.moves.n_moves,
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5cymem_5cymem_Pool), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_mem = ((struct __pyx_obj_5cymem_5cymem_Pool *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "spacy/syntax/parser.pyx":201
 *         cdef Pool mem = Pool()
 *         cdef Example eg = Example(
 *                 nr_class=self.moves.n_moves,             # <<<<<<<<<<<<<<
 *                 nr_atom=CONTEXT_SIZE,
 *                 nr_feat=self.model.nr_feat)
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->moves->n_moves); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nr_class, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "spacy/syntax/parser.pyx":202
 *         cdef Example eg = Example(
 *                 nr_class=self.moves.n_moves,
 *                 nr_atom=CONTEXT_SIZE,             # <<<<<<<<<<<<<<
 *                 nr_feat=self.model.nr_feat)
 *         cdef weight_t loss = 0
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_CONTEXT_SIZE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nr_atom, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "spacy/syntax/parser.pyx":203
 *                 nr_class=self.moves.n_moves,
 *                 nr_atom=CONTEXT_SIZE,
 *                 nr_feat=self.model.nr_feat)             # <<<<<<<<<<<<<<
 *         cdef weight_t loss = 0
 *         cdef Transition action
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->model), __pyx_n_s_nr_feat); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nr_feat, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "spacy/syntax/parser.pyx":200
 *         self.moves.initialize_state(stcls.c)
 *         cdef Pool mem = Pool()
 *         cdef Example eg = Example(             # <<<<<<<<<<<<<<
 *                 nr_class=self.moves.n_moves,
 *                 nr_atom=CONTEXT_SIZE,
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5thinc_5extra_2eg_Example), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_eg = ((struct __pyx_obj_5thinc_5extra_2eg_Example *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "spacy/syntax/parser.pyx":204
 *                 nr_atom=CONTEXT_SIZE,
 *                 nr_feat=self.model.nr_feat)
 *         cdef weight_t loss = 0             # <<<<<<<<<<<<<<
 *         cdef Transition action
 *         while not stcls.is_final():
 */
  __pyx_v_loss = 0.0;

  /* "spacy/syntax/parser.pyx":206
 *         cdef weight_t loss = 0
 *         cdef Transition action
 *         while not stcls.is_final():             # <<<<<<<<<<<<<<
 *             self.model.set_featuresC(&eg.c, stcls.c)
 *             self.moves.set_costs(eg.c.is_valid, eg.c.costs, stcls, gold)
 */
  while (1) {
    __pyx_t_4 = ((!(__pyx_f_5spacy_6syntax_10stateclass_10StateClass_is_final(__pyx_v_stcls) != 0)) != 0);
    if (!__pyx_t_4) break;

    /* "spacy/syntax/parser.pyx":207
 *         cdef Transition action
 *         while not stcls.is_final():
 *             self.model.set_featuresC(&eg.c, stcls.c)             # <<<<<<<<<<<<<<
 *             self.moves.set_costs(eg.c.is_valid, eg.c.costs, stcls, gold)
 *             self.model.set_scoresC(eg.c.scores, eg.c.features, eg.c.nr_feat)
 */
    ((struct __pyx_vtabstruct_5spacy_6syntax_6parser_ParserModel *)__pyx_v_self->model->__pyx_base.__pyx_vtab)->set_featuresC(__pyx_v_self->model, (&__pyx_v_eg->c), __pyx_v_stcls->c);

    /* "spacy/syntax/parser.pyx":208
 *         while not stcls.is_final():
 *             self.model.set_featuresC(&eg.c, stcls.c)
 *             self.moves.set_costs(eg.c.is_valid, eg.c.costs, stcls, gold)             # <<<<<<<<<<<<<<
 *             self.model.set_scoresC(eg.c.scores, eg.c.features, eg.c.nr_feat)
 *             self.model.updateC(&eg.c)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->set_costs(__pyx_v_self->moves, __pyx_v_eg->c.is_valid, __pyx_v_eg->c.costs, __pyx_v_stcls, __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "spacy/syntax/parser.pyx":209
 *             self.model.set_featuresC(&eg.c, stcls.c)
 *             self.moves.set_costs(eg.c.is_valid, eg.c.costs, stcls, gold)
 *             self.model.set_scoresC(eg.c.scores, eg.c.features, eg.c.nr_feat)             # <<<<<<<<<<<<<<
 *             self.model.updateC(&eg.c)
 *             guess = VecVec.arg_max_if_true(eg.c.scores, eg.c.is_valid, eg.c.nr_class)
 */
    ((struct __pyx_vtabstruct_5spacy_6syntax_6parser_ParserModel *)__pyx_v_self->model->__pyx_base.__pyx_vtab)->__pyx_base.set_scoresC(((struct __pyx_obj_5thinc_6linear_7avgtron_AveragedPerceptron *)__pyx_v_self->model), __pyx_v_eg->c.scores, __pyx_v_eg->c.features, __pyx_v_eg->c.nr_feat);

    /* "spacy/syntax/parser.pyx":210
 *             self.moves.set_costs(eg.c.is_valid, eg.c.costs, stcls, gold)
 *             self.model.set_scoresC(eg.c.scores, eg.c.features, eg.c.nr_feat)
 *             self.model.updateC(&eg.c)             # <<<<<<<<<<<<<<
 *             guess = VecVec.arg_max_if_true(eg.c.scores, eg.c.is_valid, eg.c.nr_class)
 * 
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5spacy_6syntax_6parser_ParserModel *)__pyx_v_self->model->__pyx_base.__pyx_vtab)->__pyx_base.updateC(((struct __pyx_obj_5thinc_6linear_7avgtron_AveragedPerceptron *)__pyx_v_self->model), (&__pyx_v_eg->c)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "spacy/syntax/parser.pyx":211
 *             self.model.set_scoresC(eg.c.scores, eg.c.features, eg.c.nr_feat)
 *             self.model.updateC(&eg.c)
 *             guess = VecVec.arg_max_if_true(eg.c.scores, eg.c.is_valid, eg.c.nr_class)             # <<<<<<<<<<<<<<
 * 
 *             action = self.moves.c[eg.guess]
 */
    __pyx_v_guess = __pyx_f_5thinc_6linalg_6VecVec_arg_max_if_true(__pyx_v_eg->c.scores, __pyx_v_eg->c.is_valid, __pyx_v_eg->c.nr_class);

    /* "spacy/syntax/parser.pyx":213
 *             guess = VecVec.arg_max_if_true(eg.c.scores, eg.c.is_valid, eg.c.nr_class)
 * 
 *             action = self.moves.c[eg.guess]             # <<<<<<<<<<<<<<
 *             action.do(stcls.c, action.label)
 *             loss += eg.costs[eg.guess]
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_eg), __pyx_n_s_guess); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_action = (__pyx_v_self->moves->c[__pyx_t_5]);

    /* "spacy/syntax/parser.pyx":214
 * 
 *             action = self.moves.c[eg.guess]
 *             action.do(stcls.c, action.label)             # <<<<<<<<<<<<<<
 *             loss += eg.costs[eg.guess]
 *             eg.fill_scores(0, eg.nr_class)
 */
    __pyx_v_action.__pyx_do(__pyx_v_stcls->c, __pyx_v_action.label);

    /* "spacy/syntax/parser.pyx":215
 *             action = self.moves.c[eg.guess]
 *             action.do(stcls.c, action.label)
 *             loss += eg.costs[eg.guess]             # <<<<<<<<<<<<<<
 *             eg.fill_scores(0, eg.nr_class)
 *             eg.fill_costs(0, eg.nr_class)
 */
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_loss); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_eg), __pyx_n_s_costs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_eg), __pyx_n_s_guess); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyObject_GetItem(__pyx_t_2, __pyx_t_6); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_8 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_loss = __pyx_t_8;

    /* "spacy/syntax/parser.pyx":216
 *             action.do(stcls.c, action.label)
 *             loss += eg.costs[eg.guess]
 *             eg.fill_scores(0, eg.nr_class)             # <<<<<<<<<<<<<<
 *             eg.fill_costs(0, eg.nr_class)
 *             eg.fill_is_valid(0, eg.nr_class)
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_eg), __pyx_n_s_nr_class); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = ((struct __pyx_vtabstruct_5thinc_5extra_2eg_Example *)__pyx_v_eg->__pyx_vtab)->fill_scores(__pyx_v_eg, 0.0, __pyx_t_1, 0); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "spacy/syntax/parser.pyx":217
 *             loss += eg.costs[eg.guess]
 *             eg.fill_scores(0, eg.nr_class)
 *             eg.fill_costs(0, eg.nr_class)             # <<<<<<<<<<<<<<
 *             eg.fill_is_valid(0, eg.nr_class)
 *         return loss
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_eg), __pyx_n_s_nr_class); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = ((struct __pyx_vtabstruct_5thinc_5extra_2eg_Example *)__pyx_v_eg->__pyx_vtab)->fill_costs(__pyx_v_eg, 0.0, __pyx_t_9, 0); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "spacy/syntax/parser.pyx":218
 *             eg.fill_scores(0, eg.nr_class)
 *             eg.fill_costs(0, eg.nr_class)
 *             eg.fill_is_valid(0, eg.nr_class)             # <<<<<<<<<<<<<<
 *         return loss
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_eg), __pyx_n_s_nr_class); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = ((struct __pyx_vtabstruct_5thinc_5extra_2eg_Example *)__pyx_v_eg->__pyx_vtab)->fill_is_valid(__pyx_v_eg, 0, __pyx_t_1, 0); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "spacy/syntax/parser.pyx":219
 *             eg.fill_costs(0, eg.nr_class)
 *             eg.fill_is_valid(0, eg.nr_class)
 *         return loss             # <<<<<<<<<<<<<<
 * 
 *     def step_through(self, Doc doc):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_loss); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "spacy/syntax/parser.pyx":195
 *         return 0
 * 
 *     def update(self, Doc tokens, GoldParse gold):             # <<<<<<<<<<<<<<
 *         self.moves.preprocess_gold(gold)
 *         cdef StateClass stcls = StateClass.init(tokens.c, tokens.length)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_stcls);
  __Pyx_XDECREF((PyObject *)__pyx_v_mem);
  __Pyx_XDECREF((PyObject *)__pyx_v_eg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":221
 *         return loss
 * 
 *     def step_through(self, Doc doc):             # <<<<<<<<<<<<<<
 *         return StepwiseState(self, doc)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_14step_through(PyObject *__pyx_v_self, PyObject *__pyx_v_doc); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_14step_through(PyObject *__pyx_v_self, PyObject *__pyx_v_doc) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("step_through (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_doc), __pyx_ptype_5spacy_6tokens_3doc_Doc, 1, "doc", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_6Parser_13step_through(((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)__pyx_v_self), ((struct __pyx_obj_5spacy_6tokens_3doc_Doc *)__pyx_v_doc));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_13step_through(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_doc) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("step_through", 0);

  /* "spacy/syntax/parser.pyx":222
 * 
 *     def step_through(self, Doc doc):
 *         return StepwiseState(self, doc)             # <<<<<<<<<<<<<<
 * 
 *     def from_transition_sequence(self, Doc doc, sequence):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_INCREF(((PyObject *)__pyx_v_doc));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_doc));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_doc));
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_StepwiseState), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "spacy/syntax/parser.pyx":221
 *         return loss
 * 
 *     def step_through(self, Doc doc):             # <<<<<<<<<<<<<<
 *         return StepwiseState(self, doc)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.step_through", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":224
 *         return StepwiseState(self, doc)
 * 
 *     def from_transition_sequence(self, Doc doc, sequence):             # <<<<<<<<<<<<<<
 *         with self.step_through(doc) as stepwise:
 *             for transition in sequence:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_16from_transition_sequence(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_16from_transition_sequence(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_doc = 0;
  PyObject *__pyx_v_sequence = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_transition_sequence (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_doc,&__pyx_n_s_sequence,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_doc)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sequence)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_transition_sequence", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_transition_sequence") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_doc = ((struct __pyx_obj_5spacy_6tokens_3doc_Doc *)values[0]);
    __pyx_v_sequence = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_transition_sequence", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.from_transition_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_doc), __pyx_ptype_5spacy_6tokens_3doc_Doc, 1, "doc", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_6Parser_15from_transition_sequence(((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)__pyx_v_self), __pyx_v_doc, __pyx_v_sequence);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_15from_transition_sequence(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_doc, PyObject *__pyx_v_sequence) {
  PyObject *__pyx_v_stepwise = NULL;
  PyObject *__pyx_v_transition = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("from_transition_sequence", 0);

  /* "spacy/syntax/parser.pyx":225
 * 
 *     def from_transition_sequence(self, Doc doc, sequence):
 *         with self.step_through(doc) as stepwise:             # <<<<<<<<<<<<<<
 *             for transition in sequence:
 *                 stepwise.transition(transition)
 */
  /*with:*/ {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_step_through); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_doc)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(((PyObject *)__pyx_v_doc));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_doc));
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_doc));
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    /*try:*/ {
      {
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {
          __pyx_v_stepwise = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "spacy/syntax/parser.pyx":226
 *     def from_transition_sequence(self, Doc doc, sequence):
 *         with self.step_through(doc) as stepwise:
 *             for transition in sequence:             # <<<<<<<<<<<<<<
 *                 stepwise.transition(transition)
 * 
 */
          if (likely(PyList_CheckExact(__pyx_v_sequence)) || PyTuple_CheckExact(__pyx_v_sequence)) {
            __pyx_t_4 = __pyx_v_sequence; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
            __pyx_t_10 = NULL;
          } else {
            __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_sequence); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          }
          for (;;) {
            if (likely(!__pyx_t_10)) {
              if (likely(PyList_CheckExact(__pyx_t_4))) {
                if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
                #if CYTHON_COMPILING_IN_CPYTHON
                __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
                #else
                __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
                __Pyx_GOTREF(__pyx_t_1);
                #endif
              } else {
                if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
                #if CYTHON_COMPILING_IN_CPYTHON
                __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
                #else
                __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
                __Pyx_GOTREF(__pyx_t_1);
                #endif
              }
            } else {
              __pyx_t_1 = __pyx_t_10(__pyx_t_4);
              if (unlikely(!__pyx_t_1)) {
                PyObject* exc_type = PyErr_Occurred();
                if (exc_type) {
                  if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                  else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_1);
            }
            __Pyx_XDECREF_SET(__pyx_v_transition, __pyx_t_1);
            __pyx_t_1 = 0;

            /* "spacy/syntax/parser.pyx":227
 *         with self.step_through(doc) as stepwise:
 *             for transition in sequence:
 *                 stepwise.transition(transition)             # <<<<<<<<<<<<<<
 * 
 *     def add_label(self, label):
 */
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stepwise, __pyx_n_s_transition); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = NULL;
            if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
              if (likely(__pyx_t_3)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                __Pyx_INCREF(__pyx_t_3);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_2, function);
              }
            }
            if (!__pyx_t_3) {
              __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_transition); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
              __Pyx_GOTREF(__pyx_t_1);
            } else {
              __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL;
              __Pyx_INCREF(__pyx_v_transition);
              __Pyx_GIVEREF(__pyx_v_transition);
              PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_transition);
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "spacy/syntax/parser.pyx":226
 *     def from_transition_sequence(self, Doc doc, sequence):
 *         with self.step_through(doc) as stepwise:
 *             for transition in sequence:             # <<<<<<<<<<<<<<
 *                 stepwise.transition(transition)
 * 
 */
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "spacy/syntax/parser.pyx":225
 * 
 *     def from_transition_sequence(self, Doc doc, sequence):
 *         with self.step_through(doc) as stepwise:             # <<<<<<<<<<<<<<
 *             for transition in sequence:
 *                 stepwise.transition(transition)
 */
        }
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L14_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("spacy.syntax.parser.Parser.from_transition_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_1, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_11 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (__pyx_t_13 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __pyx_t_14 = ((!(__pyx_t_13 != 0)) != 0);
          if (__pyx_t_14) {
            __Pyx_GIVEREF(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_XGIVEREF(__pyx_t_2);
            __Pyx_ErrRestore(__pyx_t_4, __pyx_t_1, __pyx_t_2);
            __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_t_2 = 0; 
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_L14_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_5) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__4, NULL);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L20;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L1_error;
    __pyx_L20:;
  }

  /* "spacy/syntax/parser.pyx":224
 *         return StepwiseState(self, doc)
 * 
 *     def from_transition_sequence(self, Doc doc, sequence):             # <<<<<<<<<<<<<<
 *         with self.step_through(doc) as stepwise:
 *             for transition in sequence:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.from_transition_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stepwise);
  __Pyx_XDECREF(__pyx_v_transition);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":229
 *                 stepwise.transition(transition)
 * 
 *     def add_label(self, label):             # <<<<<<<<<<<<<<
 *         # Doesn't set label into serializer -- subclasses override it to do that.
 *         for action in self.moves.action_types:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_18add_label(PyObject *__pyx_v_self, PyObject *__pyx_v_label); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_18add_label(PyObject *__pyx_v_self, PyObject *__pyx_v_label) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_label (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_6Parser_17add_label(((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)__pyx_v_self), ((PyObject *)__pyx_v_label));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_17add_label(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self, PyObject *__pyx_v_label) {
  PyObject *__pyx_v_action = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_label", 0);

  /* "spacy/syntax/parser.pyx":231
 *     def add_label(self, label):
 *         # Doesn't set label into serializer -- subclasses override it to do that.
 *         for action in self.moves.action_types:             # <<<<<<<<<<<<<<
 *             self.moves.add_action(action, label)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->moves), __pyx_n_s_action_types); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_action, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "spacy/syntax/parser.pyx":232
 *         # Doesn't set label into serializer -- subclasses override it to do that.
 *         for action in self.moves.action_types:
 *             self.moves.add_action(action, label)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->moves), __pyx_n_s_add_action); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_action);
    __Pyx_GIVEREF(__pyx_v_action);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_action);
    __Pyx_INCREF(__pyx_v_label);
    __Pyx_GIVEREF(__pyx_v_label);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_label);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "spacy/syntax/parser.pyx":231
 *     def add_label(self, label):
 *         # Doesn't set label into serializer -- subclasses override it to do that.
 *         for action in self.moves.action_types:             # <<<<<<<<<<<<<<
 *             self.moves.add_action(action, label)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spacy/syntax/parser.pyx":229
 *                 stepwise.transition(transition)
 * 
 *     def add_label(self, label):             # <<<<<<<<<<<<<<
 *         # Doesn't set label into serializer -- subclasses override it to do that.
 *         for action in self.moves.action_types:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("spacy.syntax.parser.Parser.add_label", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_action);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pxd":18
 * 
 * cdef class Parser:
 *     cdef readonly Vocab vocab             # <<<<<<<<<<<<<<
 *     cdef readonly ParserModel model
 *     cdef readonly TransitionSystem moves
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_5vocab_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_5vocab_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_6Parser_5vocab___get__(((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_5vocab___get__(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->vocab));
  __pyx_r = ((PyObject *)__pyx_v_self->vocab);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pxd":19
 * cdef class Parser:
 *     cdef readonly Vocab vocab
 *     cdef readonly ParserModel model             # <<<<<<<<<<<<<<
 *     cdef readonly TransitionSystem moves
 *     cdef readonly object cfg
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_5model_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_5model_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_6Parser_5model___get__(((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_5model___get__(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->model));
  __pyx_r = ((PyObject *)__pyx_v_self->model);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pxd":20
 *     cdef readonly Vocab vocab
 *     cdef readonly ParserModel model
 *     cdef readonly TransitionSystem moves             # <<<<<<<<<<<<<<
 *     cdef readonly object cfg
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_5moves_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_5moves_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_6Parser_5moves___get__(((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_5moves___get__(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->moves));
  __pyx_r = ((PyObject *)__pyx_v_self->moves);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pxd":21
 *     cdef readonly ParserModel model
 *     cdef readonly TransitionSystem moves
 *     cdef readonly object cfg             # <<<<<<<<<<<<<<
 * 
 *     cdef int parseC(self, TokenC* tokens, int length, int nr_feat, int nr_class) nogil
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_3cfg_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_6Parser_3cfg_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_6Parser_3cfg___get__(((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_6Parser_3cfg___get__(struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->cfg);
  __pyx_r = __pyx_v_self->cfg;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":242
 *     cdef readonly Parser parser
 * 
 *     def __init__(self, Parser parser, Doc doc):             # <<<<<<<<<<<<<<
 *         self.parser = parser
 *         self.doc = doc
 */

/* Python wrapper */
static int __pyx_pw_5spacy_6syntax_6parser_13StepwiseState_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5spacy_6syntax_6parser_13StepwiseState_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_parser = 0;
  struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_doc = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parser,&__pyx_n_s_doc,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parser)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_doc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_parser = ((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)values[0]);
    __pyx_v_doc = ((struct __pyx_obj_5spacy_6tokens_3doc_Doc *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("spacy.syntax.parser.StepwiseState.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_5spacy_6syntax_6parser_Parser, 1, "parser", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_doc), __pyx_ptype_5spacy_6tokens_3doc_Doc, 1, "doc", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState___init__(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self), __pyx_v_parser, __pyx_v_doc);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5spacy_6syntax_6parser_13StepwiseState___init__(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self, struct __pyx_obj_5spacy_6syntax_6parser_Parser *__pyx_v_parser, struct __pyx_obj_5spacy_6tokens_3doc_Doc *__pyx_v_doc) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "spacy/syntax/parser.pyx":243
 * 
 *     def __init__(self, Parser parser, Doc doc):
 *         self.parser = parser             # <<<<<<<<<<<<<<
 *         self.doc = doc
 *         self.stcls = StateClass.init(doc.c, doc.length)
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_parser));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_parser));
  __Pyx_GOTREF(__pyx_v_self->parser);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->parser));
  __pyx_v_self->parser = __pyx_v_parser;

  /* "spacy/syntax/parser.pyx":244
 *     def __init__(self, Parser parser, Doc doc):
 *         self.parser = parser
 *         self.doc = doc             # <<<<<<<<<<<<<<
 *         self.stcls = StateClass.init(doc.c, doc.length)
 *         self.parser.moves.initialize_state(self.stcls.c)
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_doc));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_doc));
  __Pyx_GOTREF(__pyx_v_self->doc);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->doc));
  __pyx_v_self->doc = __pyx_v_doc;

  /* "spacy/syntax/parser.pyx":245
 *         self.parser = parser
 *         self.doc = doc
 *         self.stcls = StateClass.init(doc.c, doc.length)             # <<<<<<<<<<<<<<
 *         self.parser.moves.initialize_state(self.stcls.c)
 *         self.eg = Example(
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_5spacy_6syntax_10stateclass_10StateClass_init(__pyx_v_doc->c, __pyx_v_doc->length)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->stcls);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->stcls));
  __pyx_v_self->stcls = ((struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "spacy/syntax/parser.pyx":246
 *         self.doc = doc
 *         self.stcls = StateClass.init(doc.c, doc.length)
 *         self.parser.moves.initialize_state(self.stcls.c)             # <<<<<<<<<<<<<<
 *         self.eg = Example(
 *             nr_class=self.parser.moves.n_moves,
 */
  ((struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem *)__pyx_v_self->parser->moves->__pyx_vtab)->initialize_state(__pyx_v_self->parser->moves, __pyx_v_self->stcls->c);

  /* "spacy/syntax/parser.pyx":248
 *         self.parser.moves.initialize_state(self.stcls.c)
 *         self.eg = Example(
 *             nr_class=self.parser.moves.n_moves,             # <<<<<<<<<<<<<<
 *             nr_atom=CONTEXT_SIZE,
 *             nr_feat=self.parser.model.nr_feat)
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->parser->moves->n_moves); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nr_class, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spacy/syntax/parser.pyx":249
 *         self.eg = Example(
 *             nr_class=self.parser.moves.n_moves,
 *             nr_atom=CONTEXT_SIZE,             # <<<<<<<<<<<<<<
 *             nr_feat=self.parser.model.nr_feat)
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_CONTEXT_SIZE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nr_atom, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spacy/syntax/parser.pyx":250
 *             nr_class=self.parser.moves.n_moves,
 *             nr_atom=CONTEXT_SIZE,
 *             nr_feat=self.parser.model.nr_feat)             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->parser->model), __pyx_n_s_nr_feat); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nr_feat, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spacy/syntax/parser.pyx":247
 *         self.stcls = StateClass.init(doc.c, doc.length)
 *         self.parser.moves.initialize_state(self.stcls.c)
 *         self.eg = Example(             # <<<<<<<<<<<<<<
 *             nr_class=self.parser.moves.n_moves,
 *             nr_atom=CONTEXT_SIZE,
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5thinc_5extra_2eg_Example), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->eg);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->eg));
  __pyx_v_self->eg = ((struct __pyx_obj_5thinc_5extra_2eg_Example *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "spacy/syntax/parser.pyx":242
 *     cdef readonly Parser parser
 * 
 *     def __init__(self, Parser parser, Doc doc):             # <<<<<<<<<<<<<<
 *         self.parser = parser
 *         self.doc = doc
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spacy.syntax.parser.StepwiseState.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":252
 *             nr_feat=self.parser.model.nr_feat)
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState_2__enter__(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_2__enter__(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__", 0);

  /* "spacy/syntax/parser.pyx":253
 * 
 *     def __enter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self, type, value, traceback):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "spacy/syntax/parser.pyx":252
 *             nr_feat=self.parser.model.nr_feat)
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":255
 *         return self
 * 
 *     def __exit__(self, type, value, traceback):             # <<<<<<<<<<<<<<
 *         self.finish()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_type = 0;
  CYTHON_UNUSED PyObject *__pyx_v_value = 0;
  CYTHON_UNUSED PyObject *__pyx_v_traceback = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_traceback,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_traceback)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_type = values[0];
    __pyx_v_value = values[1];
    __pyx_v_traceback = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("spacy.syntax.parser.StepwiseState.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState_4__exit__(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self), __pyx_v_type, __pyx_v_value, __pyx_v_traceback);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_4__exit__(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_type, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__exit__", 0);

  /* "spacy/syntax/parser.pyx":256
 * 
 *     def __exit__(self, type, value, traceback):
 *         self.finish()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_finish); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spacy/syntax/parser.pyx":255
 *         return self
 * 
 *     def __exit__(self, type, value, traceback):             # <<<<<<<<<<<<<<
 *         self.finish()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("spacy.syntax.parser.StepwiseState.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":259
 * 
 *     @property
 *     def is_final(self):             # <<<<<<<<<<<<<<
 *         return self.stcls.is_final()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_7is_final(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_7is_final(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_final (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState_6is_final(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_6is_final(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_final", 0);

  /* "spacy/syntax/parser.pyx":260
 *     @property
 *     def is_final(self):
 *         return self.stcls.is_final()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_5spacy_6syntax_10stateclass_10StateClass_is_final(__pyx_v_self->stcls)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spacy/syntax/parser.pyx":259
 * 
 *     @property
 *     def is_final(self):             # <<<<<<<<<<<<<<
 *         return self.stcls.is_final()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spacy.syntax.parser.StepwiseState.is_final", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":263
 * 
 *     @property
 *     def stack(self):             # <<<<<<<<<<<<<<
 *         return self.stcls.stack
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_9stack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_9stack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stack (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState_8stack(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_8stack(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("stack", 0);

  /* "spacy/syntax/parser.pyx":264
 *     @property
 *     def stack(self):
 *         return self.stcls.stack             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->stcls), __pyx_n_s_stack); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spacy/syntax/parser.pyx":263
 * 
 *     @property
 *     def stack(self):             # <<<<<<<<<<<<<<
 *         return self.stcls.stack
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spacy.syntax.parser.StepwiseState.stack", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":267
 * 
 *     @property
 *     def queue(self):             # <<<<<<<<<<<<<<
 *         return self.stcls.queue
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_11queue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_11queue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("queue (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState_10queue(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_10queue(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("queue", 0);

  /* "spacy/syntax/parser.pyx":268
 *     @property
 *     def queue(self):
 *         return self.stcls.queue             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->stcls), __pyx_n_s_queue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spacy/syntax/parser.pyx":267
 * 
 *     @property
 *     def queue(self):             # <<<<<<<<<<<<<<
 *         return self.stcls.queue
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("spacy.syntax.parser.StepwiseState.queue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":271
 * 
 *     @property
 *     def heads(self):             # <<<<<<<<<<<<<<
 *         return [self.stcls.H(i) for i in range(self.stcls.c.length)]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_13heads(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_13heads(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("heads (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState_12heads(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_12heads(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self) {
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("heads", 0);

  /* "spacy/syntax/parser.pyx":272
 *     @property
 *     def heads(self):
 *         return [self.stcls.H(i) for i in range(self.stcls.c.length)]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_self->stcls->c->length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_f_5spacy_6syntax_10stateclass_10StateClass_H(__pyx_v_self->stcls, __pyx_v_i)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spacy/syntax/parser.pyx":271
 * 
 *     @property
 *     def heads(self):             # <<<<<<<<<<<<<<
 *         return [self.stcls.H(i) for i in range(self.stcls.c.length)]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("spacy.syntax.parser.StepwiseState.heads", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":275
 * 
 *     @property
 *     def deps(self):             # <<<<<<<<<<<<<<
 *         return [self.doc.vocab.strings[self.stcls.c._sent[i].dep]
 *                 for i in range(self.stcls.c.length)]
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_15deps(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_15deps(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deps (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState_14deps(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_14deps(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self) {
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("deps", 0);

  /* "spacy/syntax/parser.pyx":276
 *     @property
 *     def deps(self):
 *         return [self.doc.vocab.strings[self.stcls.c._sent[i].dep]             # <<<<<<<<<<<<<<
 *                 for i in range(self.stcls.c.length)]
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "spacy/syntax/parser.pyx":277
 *     def deps(self):
 *         return [self.doc.vocab.strings[self.stcls.c._sent[i].dep]
 *                 for i in range(self.stcls.c.length)]             # <<<<<<<<<<<<<<
 * 
 *     def predict(self):
 */
  __pyx_t_2 = __pyx_v_self->stcls->c->length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "spacy/syntax/parser.pyx":276
 *     @property
 *     def deps(self):
 *         return [self.doc.vocab.strings[self.stcls.c._sent[i].dep]             # <<<<<<<<<<<<<<
 *                 for i in range(self.stcls.c.length)]
 * 
 */
    __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->doc->vocab->strings), (__pyx_v_self->stcls->c->_sent[__pyx_v_i]).dep, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spacy/syntax/parser.pyx":275
 * 
 *     @property
 *     def deps(self):             # <<<<<<<<<<<<<<
 *         return [self.doc.vocab.strings[self.stcls.c._sent[i].dep]
 *                 for i in range(self.stcls.c.length)]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("spacy.syntax.parser.StepwiseState.deps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":279
 *                 for i in range(self.stcls.c.length)]
 * 
 *     def predict(self):             # <<<<<<<<<<<<<<
 *         self.eg.reset()
 *         self.parser.model.set_featuresC(&self.eg.c, self.stcls.c)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_17predict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_17predict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("predict (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState_16predict(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_16predict(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self) {
  struct __pyx_t_5spacy_6syntax_17transition_system_Transition __pyx_v_action;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("predict", 0);

  /* "spacy/syntax/parser.pyx":280
 * 
 *     def predict(self):
 *         self.eg.reset()             # <<<<<<<<<<<<<<
 *         self.parser.model.set_featuresC(&self.eg.c, self.stcls.c)
 *         self.parser.moves.set_valid(self.eg.c.is_valid, self.stcls.c)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->eg), __pyx_n_s_reset); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spacy/syntax/parser.pyx":281
 *     def predict(self):
 *         self.eg.reset()
 *         self.parser.model.set_featuresC(&self.eg.c, self.stcls.c)             # <<<<<<<<<<<<<<
 *         self.parser.moves.set_valid(self.eg.c.is_valid, self.stcls.c)
 *         self.parser.model.set_scoresC(self.eg.c.scores,
 */
  ((struct __pyx_vtabstruct_5spacy_6syntax_6parser_ParserModel *)__pyx_v_self->parser->model->__pyx_base.__pyx_vtab)->set_featuresC(__pyx_v_self->parser->model, (&__pyx_v_self->eg->c), __pyx_v_self->stcls->c);

  /* "spacy/syntax/parser.pyx":282
 *         self.eg.reset()
 *         self.parser.model.set_featuresC(&self.eg.c, self.stcls.c)
 *         self.parser.moves.set_valid(self.eg.c.is_valid, self.stcls.c)             # <<<<<<<<<<<<<<
 *         self.parser.model.set_scoresC(self.eg.c.scores,
 *             self.eg.c.features, self.eg.c.nr_feat)
 */
  ((struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem *)__pyx_v_self->parser->moves->__pyx_vtab)->set_valid(__pyx_v_self->parser->moves, __pyx_v_self->eg->c.is_valid, __pyx_v_self->stcls->c);

  /* "spacy/syntax/parser.pyx":283
 *         self.parser.model.set_featuresC(&self.eg.c, self.stcls.c)
 *         self.parser.moves.set_valid(self.eg.c.is_valid, self.stcls.c)
 *         self.parser.model.set_scoresC(self.eg.c.scores,             # <<<<<<<<<<<<<<
 *             self.eg.c.features, self.eg.c.nr_feat)
 * 
 */
  ((struct __pyx_vtabstruct_5spacy_6syntax_6parser_ParserModel *)__pyx_v_self->parser->model->__pyx_base.__pyx_vtab)->__pyx_base.set_scoresC(((struct __pyx_obj_5thinc_6linear_7avgtron_AveragedPerceptron *)__pyx_v_self->parser->model), __pyx_v_self->eg->c.scores, __pyx_v_self->eg->c.features, __pyx_v_self->eg->c.nr_feat);

  /* "spacy/syntax/parser.pyx":286
 *             self.eg.c.features, self.eg.c.nr_feat)
 * 
 *         cdef Transition action = self.parser.moves.c[self.eg.guess]             # <<<<<<<<<<<<<<
 *         return self.parser.moves.move_name(action.move, action.label)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->eg), __pyx_n_s_guess); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_action = (__pyx_v_self->parser->moves->c[__pyx_t_4]);

  /* "spacy/syntax/parser.pyx":287
 * 
 *         cdef Transition action = self.parser.moves.c[self.eg.guess]
 *         return self.parser.moves.move_name(action.move, action.label)             # <<<<<<<<<<<<<<
 * 
 *     def transition(self, action_name=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->parser->moves), __pyx_n_s_move_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_action.move); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_action.label); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_6) {
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_4, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_4, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "spacy/syntax/parser.pyx":279
 *                 for i in range(self.stcls.c.length)]
 * 
 *     def predict(self):             # <<<<<<<<<<<<<<
 *         self.eg.reset()
 *         self.parser.model.set_featuresC(&self.eg.c, self.stcls.c)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("spacy.syntax.parser.StepwiseState.predict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":289
 *         return self.parser.moves.move_name(action.move, action.label)
 * 
 *     def transition(self, action_name=None):             # <<<<<<<<<<<<<<
 *         if action_name is None:
 *             action_name = self.predict()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_19transition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_19transition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_action_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transition (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_action_name,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_action_name);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "transition") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_action_name = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("transition", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("spacy.syntax.parser.StepwiseState.transition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState_18transition(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self), __pyx_v_action_name);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_18transition(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self, PyObject *__pyx_v_action_name) {
  PyObject *__pyx_v_moves = NULL;
  struct __pyx_t_5spacy_6syntax_17transition_system_Transition __pyx_v_action;
  PyObject *__pyx_v_move = NULL;
  int __pyx_v_clas;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_t_5spacy_6syntax_17transition_system_Transition __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("transition", 0);
  __Pyx_INCREF(__pyx_v_action_name);

  /* "spacy/syntax/parser.pyx":290
 * 
 *     def transition(self, action_name=None):
 *         if action_name is None:             # <<<<<<<<<<<<<<
 *             action_name = self.predict()
 *         moves = {'S': 0, 'D': 1, 'L': 2, 'R': 3}
 */
  __pyx_t_1 = (__pyx_v_action_name == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "spacy/syntax/parser.pyx":291
 *     def transition(self, action_name=None):
 *         if action_name is None:
 *             action_name = self.predict()             # <<<<<<<<<<<<<<
 *         moves = {'S': 0, 'D': 1, 'L': 2, 'R': 3}
 *         if action_name == '_':
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_predict); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_action_name, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "spacy/syntax/parser.pyx":290
 * 
 *     def transition(self, action_name=None):
 *         if action_name is None:             # <<<<<<<<<<<<<<
 *             action_name = self.predict()
 *         moves = {'S': 0, 'D': 1, 'L': 2, 'R': 3}
 */
  }

  /* "spacy/syntax/parser.pyx":292
 *         if action_name is None:
 *             action_name = self.predict()
 *         moves = {'S': 0, 'D': 1, 'L': 2, 'R': 3}             # <<<<<<<<<<<<<<
 *         if action_name == '_':
 *             action_name = self.predict()
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_S, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_D, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_L, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_R, __pyx_int_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_moves = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "spacy/syntax/parser.pyx":293
 *             action_name = self.predict()
 *         moves = {'S': 0, 'D': 1, 'L': 2, 'R': 3}
 *         if action_name == '_':             # <<<<<<<<<<<<<<
 *             action_name = self.predict()
 *             action = self.parser.moves.lookup_transition(action_name)
 */
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_action_name, __pyx_n_u__5, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "spacy/syntax/parser.pyx":294
 *         moves = {'S': 0, 'D': 1, 'L': 2, 'R': 3}
 *         if action_name == '_':
 *             action_name = self.predict()             # <<<<<<<<<<<<<<
 *             action = self.parser.moves.lookup_transition(action_name)
 *         elif action_name == 'L' or action_name == 'R':
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_predict); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_action_name, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "spacy/syntax/parser.pyx":295
 *         if action_name == '_':
 *             action_name = self.predict()
 *             action = self.parser.moves.lookup_transition(action_name)             # <<<<<<<<<<<<<<
 *         elif action_name == 'L' or action_name == 'R':
 *             self.predict()
 */
    __pyx_t_6 = ((struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem *)__pyx_v_self->parser->moves->__pyx_vtab)->lookup_transition(__pyx_v_self->parser->moves, __pyx_v_action_name); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_action = __pyx_t_6;

    /* "spacy/syntax/parser.pyx":293
 *             action_name = self.predict()
 *         moves = {'S': 0, 'D': 1, 'L': 2, 'R': 3}
 *         if action_name == '_':             # <<<<<<<<<<<<<<
 *             action_name = self.predict()
 *             action = self.parser.moves.lookup_transition(action_name)
 */
    goto __pyx_L4;
  }

  /* "spacy/syntax/parser.pyx":296
 *             action_name = self.predict()
 *             action = self.parser.moves.lookup_transition(action_name)
 *         elif action_name == 'L' or action_name == 'R':             # <<<<<<<<<<<<<<
 *             self.predict()
 *             move = moves[action_name]
 */
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_action_name, __pyx_n_u_L, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_1) {
  } else {
    __pyx_t_2 = __pyx_t_1;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_action_name, __pyx_n_u_R, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __pyx_t_1;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_2) {

    /* "spacy/syntax/parser.pyx":297
 *             action = self.parser.moves.lookup_transition(action_name)
 *         elif action_name == 'L' or action_name == 'R':
 *             self.predict()             # <<<<<<<<<<<<<<
 *             move = moves[action_name]
 *             clas = _arg_max_clas(self.eg.c.scores, move, self.parser.moves.c,
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_predict); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "spacy/syntax/parser.pyx":298
 *         elif action_name == 'L' or action_name == 'R':
 *             self.predict()
 *             move = moves[action_name]             # <<<<<<<<<<<<<<
 *             clas = _arg_max_clas(self.eg.c.scores, move, self.parser.moves.c,
 *                                  self.eg.c.nr_class)
 */
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_moves, __pyx_v_action_name); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_move = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "spacy/syntax/parser.pyx":299
 *             self.predict()
 *             move = moves[action_name]
 *             clas = _arg_max_clas(self.eg.c.scores, move, self.parser.moves.c,             # <<<<<<<<<<<<<<
 *                                  self.eg.c.nr_class)
 *             action = self.parser.moves.c[clas]
 */
    __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_move); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "spacy/syntax/parser.pyx":300
 *             move = moves[action_name]
 *             clas = _arg_max_clas(self.eg.c.scores, move, self.parser.moves.c,
 *                                  self.eg.c.nr_class)             # <<<<<<<<<<<<<<
 *             action = self.parser.moves.c[clas]
 *         else:
 */
    __pyx_t_8 = __pyx_f_5spacy_6syntax_6parser__arg_max_clas(__pyx_v_self->eg->c.scores, __pyx_t_7, __pyx_v_self->parser->moves->c, __pyx_v_self->eg->c.nr_class); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_clas = __pyx_t_8;

    /* "spacy/syntax/parser.pyx":301
 *             clas = _arg_max_clas(self.eg.c.scores, move, self.parser.moves.c,
 *                                  self.eg.c.nr_class)
 *             action = self.parser.moves.c[clas]             # <<<<<<<<<<<<<<
 *         else:
 *             action = self.parser.moves.lookup_transition(action_name)
 */
    __pyx_v_action = (__pyx_v_self->parser->moves->c[__pyx_v_clas]);

    /* "spacy/syntax/parser.pyx":296
 *             action_name = self.predict()
 *             action = self.parser.moves.lookup_transition(action_name)
 *         elif action_name == 'L' or action_name == 'R':             # <<<<<<<<<<<<<<
 *             self.predict()
 *             move = moves[action_name]
 */
    goto __pyx_L4;
  }

  /* "spacy/syntax/parser.pyx":303
 *             action = self.parser.moves.c[clas]
 *         else:
 *             action = self.parser.moves.lookup_transition(action_name)             # <<<<<<<<<<<<<<
 *         action.do(self.stcls.c, action.label)
 * 
 */
  /*else*/ {
    __pyx_t_6 = ((struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem *)__pyx_v_self->parser->moves->__pyx_vtab)->lookup_transition(__pyx_v_self->parser->moves, __pyx_v_action_name); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_action = __pyx_t_6;
  }
  __pyx_L4:;

  /* "spacy/syntax/parser.pyx":304
 *         else:
 *             action = self.parser.moves.lookup_transition(action_name)
 *         action.do(self.stcls.c, action.label)             # <<<<<<<<<<<<<<
 * 
 *     def finish(self):
 */
  __pyx_v_action.__pyx_do(__pyx_v_self->stcls->c, __pyx_v_action.label);

  /* "spacy/syntax/parser.pyx":289
 *         return self.parser.moves.move_name(action.move, action.label)
 * 
 *     def transition(self, action_name=None):             # <<<<<<<<<<<<<<
 *         if action_name is None:
 *             action_name = self.predict()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("spacy.syntax.parser.StepwiseState.transition", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_moves);
  __Pyx_XDECREF(__pyx_v_move);
  __Pyx_XDECREF(__pyx_v_action_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":306
 *         action.do(self.stcls.c, action.label)
 * 
 *     def finish(self):             # <<<<<<<<<<<<<<
 *         if self.stcls.is_final():
 *             self.parser.moves.finalize_state(self.stcls.c)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_21finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_21finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("finish (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState_20finish(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_20finish(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("finish", 0);

  /* "spacy/syntax/parser.pyx":307
 * 
 *     def finish(self):
 *         if self.stcls.is_final():             # <<<<<<<<<<<<<<
 *             self.parser.moves.finalize_state(self.stcls.c)
 *         self.doc.set_parse(self.stcls.c._sent)
 */
  __pyx_t_1 = (__pyx_f_5spacy_6syntax_10stateclass_10StateClass_is_final(__pyx_v_self->stcls) != 0);
  if (__pyx_t_1) {

    /* "spacy/syntax/parser.pyx":308
 *     def finish(self):
 *         if self.stcls.is_final():
 *             self.parser.moves.finalize_state(self.stcls.c)             # <<<<<<<<<<<<<<
 *         self.doc.set_parse(self.stcls.c._sent)
 *         self.parser.moves.finalize_doc(self.doc)
 */
    ((struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem *)__pyx_v_self->parser->moves->__pyx_vtab)->finalize_state(__pyx_v_self->parser->moves, __pyx_v_self->stcls->c);

    /* "spacy/syntax/parser.pyx":307
 * 
 *     def finish(self):
 *         if self.stcls.is_final():             # <<<<<<<<<<<<<<
 *             self.parser.moves.finalize_state(self.stcls.c)
 *         self.doc.set_parse(self.stcls.c._sent)
 */
  }

  /* "spacy/syntax/parser.pyx":309
 *         if self.stcls.is_final():
 *             self.parser.moves.finalize_state(self.stcls.c)
 *         self.doc.set_parse(self.stcls.c._sent)             # <<<<<<<<<<<<<<
 *         self.parser.moves.finalize_doc(self.doc)
 * 
 */
  ((struct __pyx_vtabstruct_5spacy_6tokens_3doc_Doc *)__pyx_v_self->doc->__pyx_vtab)->set_parse(__pyx_v_self->doc, __pyx_v_self->stcls->c->_sent);

  /* "spacy/syntax/parser.pyx":310
 *             self.parser.moves.finalize_state(self.stcls.c)
 *         self.doc.set_parse(self.stcls.c._sent)
 *         self.parser.moves.finalize_doc(self.doc)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->parser->moves), __pyx_n_s_finalize_doc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self->doc)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
    __Pyx_INCREF(((PyObject *)__pyx_v_self->doc));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->doc));
    PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_self->doc));
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "spacy/syntax/parser.pyx":306
 *         action.do(self.stcls.c, action.label)
 * 
 *     def finish(self):             # <<<<<<<<<<<<<<
 *         if self.stcls.is_final():
 *             self.parser.moves.finalize_state(self.stcls.c)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("spacy.syntax.parser.StepwiseState.finish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":237
 * 
 * cdef class StepwiseState:
 *     cdef readonly StateClass stcls             # <<<<<<<<<<<<<<
 *     cdef readonly Example eg
 *     cdef readonly Doc doc
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_5stcls_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_5stcls_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState_5stcls___get__(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_5stcls___get__(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->stcls));
  __pyx_r = ((PyObject *)__pyx_v_self->stcls);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":238
 * cdef class StepwiseState:
 *     cdef readonly StateClass stcls
 *     cdef readonly Example eg             # <<<<<<<<<<<<<<
 *     cdef readonly Doc doc
 *     cdef readonly Parser parser
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_2eg_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_2eg_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState_2eg___get__(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_2eg___get__(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->eg));
  __pyx_r = ((PyObject *)__pyx_v_self->eg);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":239
 *     cdef readonly StateClass stcls
 *     cdef readonly Example eg
 *     cdef readonly Doc doc             # <<<<<<<<<<<<<<
 *     cdef readonly Parser parser
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_3doc_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_3doc_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState_3doc___get__(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_3doc___get__(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->doc));
  __pyx_r = ((PyObject *)__pyx_v_self->doc);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":240
 *     cdef readonly Example eg
 *     cdef readonly Doc doc
 *     cdef readonly Parser parser             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, Parser parser, Doc doc):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_6parser_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_6parser_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_13StepwiseState_6parser___get__(((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_13StepwiseState_6parser___get__(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->parser));
  __pyx_r = ((PyObject *)__pyx_v_self->parser);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":314
 * 
 * class ParserStateError(ValueError):
 *     def __init__(self, doc):             # <<<<<<<<<<<<<<
 *         ValueError.__init__(self,
 *             "Error analysing doc -- no valid actions available. This should "
 */

/* Python wrapper */
static PyObject *__pyx_pw_5spacy_6syntax_6parser_16ParserStateError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5spacy_6syntax_6parser_16ParserStateError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_16ParserStateError_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_5spacy_6syntax_6parser_16ParserStateError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_doc = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_doc,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_doc)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_doc = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("spacy.syntax.parser.ParserStateError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5spacy_6syntax_6parser_16ParserStateError___init__(__pyx_self, __pyx_v_self, __pyx_v_doc);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5spacy_6syntax_6parser_16ParserStateError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_doc) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "spacy/syntax/parser.pyx":315
 * class ParserStateError(ValueError):
 *     def __init__(self, doc):
 *         ValueError.__init__(self,             # <<<<<<<<<<<<<<
 *             "Error analysing doc -- no valid actions available. This should "
 *             "never happen, so please report the error on the issue tracker. "
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_ValueError, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "spacy/syntax/parser.pyx":321
 *             "https://github.com/spacy-io/spaCy/issues/429\n"
 *             "Please include the text that the parser failed on, which is:\n"
 *             "%s" % repr(doc.text))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_doc, __pyx_n_s_text); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_Repr(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_Error_analysing_doc_no_valid_act, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (__pyx_t_4) {
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
  }
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "spacy/syntax/parser.pyx":314
 * 
 * class ParserStateError(ValueError):
 *     def __init__(self, doc):             # <<<<<<<<<<<<<<
 *         ValueError.__init__(self,
 *             "Error analysing doc -- no valid actions available. This should "
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("spacy.syntax.parser.ParserStateError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "spacy/syntax/parser.pyx":324
 * 
 * 
 * cdef int _arg_max_clas(const weight_t* scores, int move, const Transition* actions,             # <<<<<<<<<<<<<<
 *                        int nr_class) except -1:
 *     cdef weight_t score = 0
 */

static int __pyx_f_5spacy_6syntax_6parser__arg_max_clas(__pyx_t_5thinc_8typedefs_weight_t const *__pyx_v_scores, int __pyx_v_move, struct __pyx_t_5spacy_6syntax_17transition_system_Transition const *__pyx_v_actions, int __pyx_v_nr_class) {
  __pyx_t_5thinc_8typedefs_weight_t __pyx_v_score;
  int __pyx_v_mode;
  int __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("_arg_max_clas", 0);

  /* "spacy/syntax/parser.pyx":326
 * cdef int _arg_max_clas(const weight_t* scores, int move, const Transition* actions,
 *                        int nr_class) except -1:
 *     cdef weight_t score = 0             # <<<<<<<<<<<<<<
 *     cdef int mode = -1
 *     cdef int i
 */
  __pyx_v_score = 0.0;

  /* "spacy/syntax/parser.pyx":327
 *                        int nr_class) except -1:
 *     cdef weight_t score = 0
 *     cdef int mode = -1             # <<<<<<<<<<<<<<
 *     cdef int i
 *     for i in range(nr_class):
 */
  __pyx_v_mode = -1;

  /* "spacy/syntax/parser.pyx":329
 *     cdef int mode = -1
 *     cdef int i
 *     for i in range(nr_class):             # <<<<<<<<<<<<<<
 *         if actions[i].move == move and (mode == -1 or scores[i] >= score):
 *             mode = i
 */
  __pyx_t_1 = __pyx_v_nr_class;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "spacy/syntax/parser.pyx":330
 *     cdef int i
 *     for i in range(nr_class):
 *         if actions[i].move == move and (mode == -1 or scores[i] >= score):             # <<<<<<<<<<<<<<
 *             mode = i
 *             score = scores[i]
 */
    __pyx_t_4 = (((__pyx_v_actions[__pyx_v_i]).move == __pyx_v_move) != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_3 = __pyx_t_4;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_4 = ((__pyx_v_mode == -1L) != 0);
    if (!__pyx_t_4) {
    } else {
      __pyx_t_3 = __pyx_t_4;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_4 = (((__pyx_v_scores[__pyx_v_i]) >= __pyx_v_score) != 0);
    __pyx_t_3 = __pyx_t_4;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_3) {

      /* "spacy/syntax/parser.pyx":331
 *     for i in range(nr_class):
 *         if actions[i].move == move and (mode == -1 or scores[i] >= score):
 *             mode = i             # <<<<<<<<<<<<<<
 *             score = scores[i]
 *     return mode
 */
      __pyx_v_mode = __pyx_v_i;

      /* "spacy/syntax/parser.pyx":332
 *         if actions[i].move == move and (mode == -1 or scores[i] >= score):
 *             mode = i
 *             score = scores[i]             # <<<<<<<<<<<<<<
 *     return mode
 */
      __pyx_v_score = (__pyx_v_scores[__pyx_v_i]);

      /* "spacy/syntax/parser.pyx":330
 *     cdef int i
 *     for i in range(nr_class):
 *         if actions[i].move == move and (mode == -1 or scores[i] >= score):             # <<<<<<<<<<<<<<
 *             mode = i
 *             score = scores[i]
 */
    }
  }

  /* "spacy/syntax/parser.pyx":333
 *             mode = i
 *             score = scores[i]
 *     return mode             # <<<<<<<<<<<<<<
 */
  __pyx_r = __pyx_v_mode;
  goto __pyx_L0;

  /* "spacy/syntax/parser.pyx":324
 * 
 * 
 * cdef int _arg_max_clas(const weight_t* scores, int move, const Transition* actions,             # <<<<<<<<<<<<<<
 *                        int nr_class) except -1:
 *     cdef weight_t score = 0
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "_state.pxd":11
 * 
 * 
 * cdef inline bint is_space_token(const TokenC* token) nogil:             # <<<<<<<<<<<<<<
 *     return Lexeme.c_check_flag(token.lex, IS_SPACE)
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_space_token(struct __pyx_t_5spacy_7structs_TokenC const *__pyx_v_token) {
  int __pyx_r;

  /* "_state.pxd":12
 * 
 * cdef inline bint is_space_token(const TokenC* token) nogil:
 *     return Lexeme.c_check_flag(token.lex, IS_SPACE)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_f_5spacy_6lexeme_6Lexeme_c_check_flag(__pyx_v_token->lex, __pyx_e_5spacy_5attrs_IS_SPACE);
  goto __pyx_L0;

  /* "_state.pxd":11
 * 
 * 
 * cdef inline bint is_space_token(const TokenC* token) nogil:             # <<<<<<<<<<<<<<
 *     return Lexeme.c_check_flag(token.lex, IS_SPACE)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":28
 *     int _break
 * 
 *     __init__(const TokenC* sent, int length) nogil:             # <<<<<<<<<<<<<<
 *         cdef int PADDING = 5
 *         this._buffer = <int*>calloc(length + (PADDING * 2), sizeof(int))
 */

 __pyx_t_5spacy_6syntax_6_state_StateC::__pyx_t_5spacy_6syntax_6_state_StateC(struct __pyx_t_5spacy_7structs_TokenC const *__pyx_v_sent, int __pyx_v_length) {
  int __pyx_v_PADDING;
  int __pyx_v_i;
  long __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "_state.pxd":29
 * 
 *     __init__(const TokenC* sent, int length) nogil:
 *         cdef int PADDING = 5             # <<<<<<<<<<<<<<
 *         this._buffer = <int*>calloc(length + (PADDING * 2), sizeof(int))
 *         this._stack = <int*>calloc(length + (PADDING * 2), sizeof(int))
 */
  __pyx_v_PADDING = 5;

  /* "_state.pxd":30
 *     __init__(const TokenC* sent, int length) nogil:
 *         cdef int PADDING = 5
 *         this._buffer = <int*>calloc(length + (PADDING * 2), sizeof(int))             # <<<<<<<<<<<<<<
 *         this._stack = <int*>calloc(length + (PADDING * 2), sizeof(int))
 *         this.shifted = <bint*>calloc(length + (PADDING * 2), sizeof(bint))
 */
  this->_buffer = ((int *)calloc((__pyx_v_length + (__pyx_v_PADDING * 2)), (sizeof(int))));

  /* "_state.pxd":31
 *         cdef int PADDING = 5
 *         this._buffer = <int*>calloc(length + (PADDING * 2), sizeof(int))
 *         this._stack = <int*>calloc(length + (PADDING * 2), sizeof(int))             # <<<<<<<<<<<<<<
 *         this.shifted = <bint*>calloc(length + (PADDING * 2), sizeof(bint))
 *         this._sent = <TokenC*>calloc(length + (PADDING * 2), sizeof(TokenC))
 */
  this->_stack = ((int *)calloc((__pyx_v_length + (__pyx_v_PADDING * 2)), (sizeof(int))));

  /* "_state.pxd":32
 *         this._buffer = <int*>calloc(length + (PADDING * 2), sizeof(int))
 *         this._stack = <int*>calloc(length + (PADDING * 2), sizeof(int))
 *         this.shifted = <bint*>calloc(length + (PADDING * 2), sizeof(bint))             # <<<<<<<<<<<<<<
 *         this._sent = <TokenC*>calloc(length + (PADDING * 2), sizeof(TokenC))
 *         this._ents = <Entity*>calloc(length + (PADDING * 2), sizeof(Entity))
 */
  this->shifted = ((int *)calloc((__pyx_v_length + (__pyx_v_PADDING * 2)), (sizeof(int))));

  /* "_state.pxd":33
 *         this._stack = <int*>calloc(length + (PADDING * 2), sizeof(int))
 *         this.shifted = <bint*>calloc(length + (PADDING * 2), sizeof(bint))
 *         this._sent = <TokenC*>calloc(length + (PADDING * 2), sizeof(TokenC))             # <<<<<<<<<<<<<<
 *         this._ents = <Entity*>calloc(length + (PADDING * 2), sizeof(Entity))
 *         cdef int i
 */
  this->_sent = ((struct __pyx_t_5spacy_7structs_TokenC *)calloc((__pyx_v_length + (__pyx_v_PADDING * 2)), (sizeof(struct __pyx_t_5spacy_7structs_TokenC))));

  /* "_state.pxd":34
 *         this.shifted = <bint*>calloc(length + (PADDING * 2), sizeof(bint))
 *         this._sent = <TokenC*>calloc(length + (PADDING * 2), sizeof(TokenC))
 *         this._ents = <Entity*>calloc(length + (PADDING * 2), sizeof(Entity))             # <<<<<<<<<<<<<<
 *         cdef int i
 *         for i in range(length + (PADDING * 2)):
 */
  this->_ents = ((struct __pyx_t_5spacy_7structs_Entity *)calloc((__pyx_v_length + (__pyx_v_PADDING * 2)), (sizeof(struct __pyx_t_5spacy_7structs_Entity))));

  /* "_state.pxd":36
 *         this._ents = <Entity*>calloc(length + (PADDING * 2), sizeof(Entity))
 *         cdef int i
 *         for i in range(length + (PADDING * 2)):             # <<<<<<<<<<<<<<
 *             this._ents[i].end = -1
 *             this._sent[i].l_edge = i
 */
  __pyx_t_1 = (__pyx_v_length + (__pyx_v_PADDING * 2));
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "_state.pxd":37
 *         cdef int i
 *         for i in range(length + (PADDING * 2)):
 *             this._ents[i].end = -1             # <<<<<<<<<<<<<<
 *             this._sent[i].l_edge = i
 *             this._sent[i].r_edge = i
 */
    (this->_ents[__pyx_v_i]).end = -1;

    /* "_state.pxd":38
 *         for i in range(length + (PADDING * 2)):
 *             this._ents[i].end = -1
 *             this._sent[i].l_edge = i             # <<<<<<<<<<<<<<
 *             this._sent[i].r_edge = i
 *         for i in range(length, length + (PADDING * 2)):
 */
    (this->_sent[__pyx_v_i]).l_edge = __pyx_v_i;

    /* "_state.pxd":39
 *             this._ents[i].end = -1
 *             this._sent[i].l_edge = i
 *             this._sent[i].r_edge = i             # <<<<<<<<<<<<<<
 *         for i in range(length, length + (PADDING * 2)):
 *             this._sent[i].lex = &EMPTY_LEXEME
 */
    (this->_sent[__pyx_v_i]).r_edge = __pyx_v_i;
  }

  /* "_state.pxd":40
 *             this._sent[i].l_edge = i
 *             this._sent[i].r_edge = i
 *         for i in range(length, length + (PADDING * 2)):             # <<<<<<<<<<<<<<
 *             this._sent[i].lex = &EMPTY_LEXEME
 *         this._sent += PADDING
 */
  __pyx_t_1 = (__pyx_v_length + (__pyx_v_PADDING * 2));
  for (__pyx_t_2 = __pyx_v_length; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "_state.pxd":41
 *             this._sent[i].r_edge = i
 *         for i in range(length, length + (PADDING * 2)):
 *             this._sent[i].lex = &EMPTY_LEXEME             # <<<<<<<<<<<<<<
 *         this._sent += PADDING
 *         this._ents += PADDING
 */
    (this->_sent[__pyx_v_i]).lex = (&__pyx_v_5spacy_5vocab_EMPTY_LEXEME);
  }

  /* "_state.pxd":42
 *         for i in range(length, length + (PADDING * 2)):
 *             this._sent[i].lex = &EMPTY_LEXEME
 *         this._sent += PADDING             # <<<<<<<<<<<<<<
 *         this._ents += PADDING
 *         this._buffer += PADDING
 */
  this->_sent = (this->_sent + __pyx_v_PADDING);

  /* "_state.pxd":43
 *             this._sent[i].lex = &EMPTY_LEXEME
 *         this._sent += PADDING
 *         this._ents += PADDING             # <<<<<<<<<<<<<<
 *         this._buffer += PADDING
 *         this._stack += PADDING
 */
  this->_ents = (this->_ents + __pyx_v_PADDING);

  /* "_state.pxd":44
 *         this._sent += PADDING
 *         this._ents += PADDING
 *         this._buffer += PADDING             # <<<<<<<<<<<<<<
 *         this._stack += PADDING
 *         this.shifted += PADDING
 */
  this->_buffer = (this->_buffer + __pyx_v_PADDING);

  /* "_state.pxd":45
 *         this._ents += PADDING
 *         this._buffer += PADDING
 *         this._stack += PADDING             # <<<<<<<<<<<<<<
 *         this.shifted += PADDING
 *         this.length = length
 */
  this->_stack = (this->_stack + __pyx_v_PADDING);

  /* "_state.pxd":46
 *         this._buffer += PADDING
 *         this._stack += PADDING
 *         this.shifted += PADDING             # <<<<<<<<<<<<<<
 *         this.length = length
 *         this._break = -1
 */
  this->shifted = (this->shifted + __pyx_v_PADDING);

  /* "_state.pxd":47
 *         this._stack += PADDING
 *         this.shifted += PADDING
 *         this.length = length             # <<<<<<<<<<<<<<
 *         this._break = -1
 *         this._s_i = 0
 */
  this->length = __pyx_v_length;

  /* "_state.pxd":48
 *         this.shifted += PADDING
 *         this.length = length
 *         this._break = -1             # <<<<<<<<<<<<<<
 *         this._s_i = 0
 *         this._b_i = 0
 */
  this->_break = -1;

  /* "_state.pxd":49
 *         this.length = length
 *         this._break = -1
 *         this._s_i = 0             # <<<<<<<<<<<<<<
 *         this._b_i = 0
 *         this._e_i = 0
 */
  this->_s_i = 0;

  /* "_state.pxd":50
 *         this._break = -1
 *         this._s_i = 0
 *         this._b_i = 0             # <<<<<<<<<<<<<<
 *         this._e_i = 0
 *         for i in range(length):
 */
  this->_b_i = 0;

  /* "_state.pxd":51
 *         this._s_i = 0
 *         this._b_i = 0
 *         this._e_i = 0             # <<<<<<<<<<<<<<
 *         for i in range(length):
 *             this._buffer[i] = i
 */
  this->_e_i = 0;

  /* "_state.pxd":52
 *         this._b_i = 0
 *         this._e_i = 0
 *         for i in range(length):             # <<<<<<<<<<<<<<
 *             this._buffer[i] = i
 *         memset(&this._empty_token, 0, sizeof(TokenC))
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "_state.pxd":53
 *         this._e_i = 0
 *         for i in range(length):
 *             this._buffer[i] = i             # <<<<<<<<<<<<<<
 *         memset(&this._empty_token, 0, sizeof(TokenC))
 *         this._empty_token.lex = &EMPTY_LEXEME
 */
    (this->_buffer[__pyx_v_i]) = __pyx_v_i;
  }

  /* "_state.pxd":54
 *         for i in range(length):
 *             this._buffer[i] = i
 *         memset(&this._empty_token, 0, sizeof(TokenC))             # <<<<<<<<<<<<<<
 *         this._empty_token.lex = &EMPTY_LEXEME
 *         for i in range(length):
 */
  memset((&this->_empty_token), 0, (sizeof(struct __pyx_t_5spacy_7structs_TokenC)));

  /* "_state.pxd":55
 *             this._buffer[i] = i
 *         memset(&this._empty_token, 0, sizeof(TokenC))
 *         this._empty_token.lex = &EMPTY_LEXEME             # <<<<<<<<<<<<<<
 *         for i in range(length):
 *             this._sent[i] = sent[i]
 */
  this->_empty_token.lex = (&__pyx_v_5spacy_5vocab_EMPTY_LEXEME);

  /* "_state.pxd":56
 *         memset(&this._empty_token, 0, sizeof(TokenC))
 *         this._empty_token.lex = &EMPTY_LEXEME
 *         for i in range(length):             # <<<<<<<<<<<<<<
 *             this._sent[i] = sent[i]
 *             this._buffer[i] = i
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "_state.pxd":57
 *         this._empty_token.lex = &EMPTY_LEXEME
 *         for i in range(length):
 *             this._sent[i] = sent[i]             # <<<<<<<<<<<<<<
 *             this._buffer[i] = i
 *         for i in range(length, length + 5):
 */
    (this->_sent[__pyx_v_i]) = (__pyx_v_sent[__pyx_v_i]);

    /* "_state.pxd":58
 *         for i in range(length):
 *             this._sent[i] = sent[i]
 *             this._buffer[i] = i             # <<<<<<<<<<<<<<
 *         for i in range(length, length + 5):
 *             this._sent[i].lex = &EMPTY_LEXEME
 */
    (this->_buffer[__pyx_v_i]) = __pyx_v_i;
  }

  /* "_state.pxd":59
 *             this._sent[i] = sent[i]
 *             this._buffer[i] = i
 *         for i in range(length, length + 5):             # <<<<<<<<<<<<<<
 *             this._sent[i].lex = &EMPTY_LEXEME
 * 
 */
  __pyx_t_1 = (__pyx_v_length + 5);
  for (__pyx_t_2 = __pyx_v_length; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "_state.pxd":60
 *             this._buffer[i] = i
 *         for i in range(length, length + 5):
 *             this._sent[i].lex = &EMPTY_LEXEME             # <<<<<<<<<<<<<<
 * 
 *     __dealloc__():
 */
    (this->_sent[__pyx_v_i]).lex = (&__pyx_v_5spacy_5vocab_EMPTY_LEXEME);
  }

  /* "_state.pxd":28
 *     int _break
 * 
 *     __init__(const TokenC* sent, int length) nogil:             # <<<<<<<<<<<<<<
 *         cdef int PADDING = 5
 *         this._buffer = <int*>calloc(length + (PADDING * 2), sizeof(int))
 */

  /* function exit code */
}

/* "_state.pxd":62
 *             this._sent[i].lex = &EMPTY_LEXEME
 * 
 *     __dealloc__():             # <<<<<<<<<<<<<<
 *         cdef int PADDING = 5
 *         free(this._sent - PADDING)
 */

 __pyx_t_5spacy_6syntax_6_state_StateC::~__pyx_t_5spacy_6syntax_6_state_StateC(void) {
  int __pyx_v_PADDING;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("<del>", 0);

  /* "_state.pxd":63
 * 
 *     __dealloc__():
 *         cdef int PADDING = 5             # <<<<<<<<<<<<<<
 *         free(this._sent - PADDING)
 *         free(this._ents - PADDING)
 */
  __pyx_v_PADDING = 5;

  /* "_state.pxd":64
 *     __dealloc__():
 *         cdef int PADDING = 5
 *         free(this._sent - PADDING)             # <<<<<<<<<<<<<<
 *         free(this._ents - PADDING)
 *         free(this._buffer - PADDING)
 */
  free((this->_sent - __pyx_v_PADDING));

  /* "_state.pxd":65
 *         cdef int PADDING = 5
 *         free(this._sent - PADDING)
 *         free(this._ents - PADDING)             # <<<<<<<<<<<<<<
 *         free(this._buffer - PADDING)
 *         free(this._stack - PADDING)
 */
  free((this->_ents - __pyx_v_PADDING));

  /* "_state.pxd":66
 *         free(this._sent - PADDING)
 *         free(this._ents - PADDING)
 *         free(this._buffer - PADDING)             # <<<<<<<<<<<<<<
 *         free(this._stack - PADDING)
 *         free(this.shifted - PADDING)
 */
  free((this->_buffer - __pyx_v_PADDING));

  /* "_state.pxd":67
 *         free(this._ents - PADDING)
 *         free(this._buffer - PADDING)
 *         free(this._stack - PADDING)             # <<<<<<<<<<<<<<
 *         free(this.shifted - PADDING)
 * 
 */
  free((this->_stack - __pyx_v_PADDING));

  /* "_state.pxd":68
 *         free(this._buffer - PADDING)
 *         free(this._stack - PADDING)
 *         free(this.shifted - PADDING)             # <<<<<<<<<<<<<<
 * 
 *     int S(int i) nogil const:
 */
  free((this->shifted - __pyx_v_PADDING));

  /* "_state.pxd":62
 *             this._sent[i].lex = &EMPTY_LEXEME
 * 
 *     __dealloc__():             # <<<<<<<<<<<<<<
 *         cdef int PADDING = 5
 *         free(this._sent - PADDING)
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "_state.pxd":70
 *         free(this.shifted - PADDING)
 * 
 *     int S(int i) nogil const:             # <<<<<<<<<<<<<<
 *         if i >= this._s_i:
 *             return -1
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::S(int __pyx_v_i) const {
  int __pyx_r;
  int __pyx_t_1;

  /* "_state.pxd":71
 * 
 *     int S(int i) nogil const:
 *         if i >= this._s_i:             # <<<<<<<<<<<<<<
 *             return -1
 *         return this._stack[this._s_i - (i+1)]
 */
  __pyx_t_1 = ((__pyx_v_i >= this->_s_i) != 0);
  if (__pyx_t_1) {

    /* "_state.pxd":72
 *     int S(int i) nogil const:
 *         if i >= this._s_i:
 *             return -1             # <<<<<<<<<<<<<<
 *         return this._stack[this._s_i - (i+1)]
 * 
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "_state.pxd":71
 * 
 *     int S(int i) nogil const:
 *         if i >= this._s_i:             # <<<<<<<<<<<<<<
 *             return -1
 *         return this._stack[this._s_i - (i+1)]
 */
  }

  /* "_state.pxd":73
 *         if i >= this._s_i:
 *             return -1
 *         return this._stack[this._s_i - (i+1)]             # <<<<<<<<<<<<<<
 * 
 *     int B(int i) nogil const:
 */
  __pyx_r = (this->_stack[(this->_s_i - (__pyx_v_i + 1))]);
  goto __pyx_L0;

  /* "_state.pxd":70
 *         free(this.shifted - PADDING)
 * 
 *     int S(int i) nogil const:             # <<<<<<<<<<<<<<
 *         if i >= this._s_i:
 *             return -1
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":75
 *         return this._stack[this._s_i - (i+1)]
 * 
 *     int B(int i) nogil const:             # <<<<<<<<<<<<<<
 *         if (i + this._b_i) >= this.length:
 *             return -1
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::B(int __pyx_v_i) const {
  int __pyx_r;
  int __pyx_t_1;

  /* "_state.pxd":76
 * 
 *     int B(int i) nogil const:
 *         if (i + this._b_i) >= this.length:             # <<<<<<<<<<<<<<
 *             return -1
 *         return this._buffer[this._b_i + i]
 */
  __pyx_t_1 = (((__pyx_v_i + this->_b_i) >= this->length) != 0);
  if (__pyx_t_1) {

    /* "_state.pxd":77
 *     int B(int i) nogil const:
 *         if (i + this._b_i) >= this.length:
 *             return -1             # <<<<<<<<<<<<<<
 *         return this._buffer[this._b_i + i]
 * 
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "_state.pxd":76
 * 
 *     int B(int i) nogil const:
 *         if (i + this._b_i) >= this.length:             # <<<<<<<<<<<<<<
 *             return -1
 *         return this._buffer[this._b_i + i]
 */
  }

  /* "_state.pxd":78
 *         if (i + this._b_i) >= this.length:
 *             return -1
 *         return this._buffer[this._b_i + i]             # <<<<<<<<<<<<<<
 * 
 *     const TokenC* S_(int i) nogil const:
 */
  __pyx_r = (this->_buffer[(this->_b_i + __pyx_v_i)]);
  goto __pyx_L0;

  /* "_state.pxd":75
 *         return this._stack[this._s_i - (i+1)]
 * 
 *     int B(int i) nogil const:             # <<<<<<<<<<<<<<
 *         if (i + this._b_i) >= this.length:
 *             return -1
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":80
 *         return this._buffer[this._b_i + i]
 * 
 *     const TokenC* S_(int i) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(this.S(i))
 * 
 */

struct __pyx_t_5spacy_7structs_TokenC const *__pyx_t_5spacy_6syntax_6_state_StateC::S_(int __pyx_v_i) const {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_r;

  /* "_state.pxd":81
 * 
 *     const TokenC* S_(int i) nogil const:
 *         return this.safe_get(this.S(i))             # <<<<<<<<<<<<<<
 * 
 *     const TokenC* B_(int i) nogil const:
 */
  __pyx_r = this->safe_get(this->S(__pyx_v_i));
  goto __pyx_L0;

  /* "_state.pxd":80
 *         return this._buffer[this._b_i + i]
 * 
 *     const TokenC* S_(int i) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(this.S(i))
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":83
 *         return this.safe_get(this.S(i))
 * 
 *     const TokenC* B_(int i) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(this.B(i))
 * 
 */

struct __pyx_t_5spacy_7structs_TokenC const *__pyx_t_5spacy_6syntax_6_state_StateC::B_(int __pyx_v_i) const {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_r;

  /* "_state.pxd":84
 * 
 *     const TokenC* B_(int i) nogil const:
 *         return this.safe_get(this.B(i))             # <<<<<<<<<<<<<<
 * 
 *     const TokenC* H_(int i) nogil const:
 */
  __pyx_r = this->safe_get(this->B(__pyx_v_i));
  goto __pyx_L0;

  /* "_state.pxd":83
 *         return this.safe_get(this.S(i))
 * 
 *     const TokenC* B_(int i) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(this.B(i))
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":86
 *         return this.safe_get(this.B(i))
 * 
 *     const TokenC* H_(int i) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(this.H(i))
 * 
 */

struct __pyx_t_5spacy_7structs_TokenC const *__pyx_t_5spacy_6syntax_6_state_StateC::H_(int __pyx_v_i) const {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_r;

  /* "_state.pxd":87
 * 
 *     const TokenC* H_(int i) nogil const:
 *         return this.safe_get(this.H(i))             # <<<<<<<<<<<<<<
 * 
 *     const TokenC* E_(int i) nogil const:
 */
  __pyx_r = this->safe_get(this->H(__pyx_v_i));
  goto __pyx_L0;

  /* "_state.pxd":86
 *         return this.safe_get(this.B(i))
 * 
 *     const TokenC* H_(int i) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(this.H(i))
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":89
 *         return this.safe_get(this.H(i))
 * 
 *     const TokenC* E_(int i) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(this.E(i))
 * 
 */

struct __pyx_t_5spacy_7structs_TokenC const *__pyx_t_5spacy_6syntax_6_state_StateC::E_(int __pyx_v_i) const {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_r;

  /* "_state.pxd":90
 * 
 *     const TokenC* E_(int i) nogil const:
 *         return this.safe_get(this.E(i))             # <<<<<<<<<<<<<<
 * 
 *     const TokenC* L_(int i, int idx) nogil const:
 */
  __pyx_r = this->safe_get(this->E(__pyx_v_i));
  goto __pyx_L0;

  /* "_state.pxd":89
 *         return this.safe_get(this.H(i))
 * 
 *     const TokenC* E_(int i) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(this.E(i))
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":92
 *         return this.safe_get(this.E(i))
 * 
 *     const TokenC* L_(int i, int idx) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(this.L(i, idx))
 * 
 */

struct __pyx_t_5spacy_7structs_TokenC const *__pyx_t_5spacy_6syntax_6_state_StateC::L_(int __pyx_v_i, int __pyx_v_idx) const {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_r;

  /* "_state.pxd":93
 * 
 *     const TokenC* L_(int i, int idx) nogil const:
 *         return this.safe_get(this.L(i, idx))             # <<<<<<<<<<<<<<
 * 
 *     const TokenC* R_(int i, int idx) nogil const:
 */
  __pyx_r = this->safe_get(this->L(__pyx_v_i, __pyx_v_idx));
  goto __pyx_L0;

  /* "_state.pxd":92
 *         return this.safe_get(this.E(i))
 * 
 *     const TokenC* L_(int i, int idx) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(this.L(i, idx))
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":95
 *         return this.safe_get(this.L(i, idx))
 * 
 *     const TokenC* R_(int i, int idx) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(this.R(i, idx))
 * 
 */

struct __pyx_t_5spacy_7structs_TokenC const *__pyx_t_5spacy_6syntax_6_state_StateC::R_(int __pyx_v_i, int __pyx_v_idx) const {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_r;

  /* "_state.pxd":96
 * 
 *     const TokenC* R_(int i, int idx) nogil const:
 *         return this.safe_get(this.R(i, idx))             # <<<<<<<<<<<<<<
 * 
 *     const TokenC* safe_get(int i) nogil const:
 */
  __pyx_r = this->safe_get(this->R(__pyx_v_i, __pyx_v_idx));
  goto __pyx_L0;

  /* "_state.pxd":95
 *         return this.safe_get(this.L(i, idx))
 * 
 *     const TokenC* R_(int i, int idx) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(this.R(i, idx))
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":98
 *         return this.safe_get(this.R(i, idx))
 * 
 *     const TokenC* safe_get(int i) nogil const:             # <<<<<<<<<<<<<<
 *         if i < 0 or i >= this.length:
 *             return &this._empty_token
 */

struct __pyx_t_5spacy_7structs_TokenC const *__pyx_t_5spacy_6syntax_6_state_StateC::safe_get(int __pyx_v_i) const {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "_state.pxd":99
 * 
 *     const TokenC* safe_get(int i) nogil const:
 *         if i < 0 or i >= this.length:             # <<<<<<<<<<<<<<
 *             return &this._empty_token
 *         else:
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_i >= this->length) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "_state.pxd":100
 *     const TokenC* safe_get(int i) nogil const:
 *         if i < 0 or i >= this.length:
 *             return &this._empty_token             # <<<<<<<<<<<<<<
 *         else:
 *             return &this._sent[i]
 */
    __pyx_r = (&this->_empty_token);
    goto __pyx_L0;

    /* "_state.pxd":99
 * 
 *     const TokenC* safe_get(int i) nogil const:
 *         if i < 0 or i >= this.length:             # <<<<<<<<<<<<<<
 *             return &this._empty_token
 *         else:
 */
  }

  /* "_state.pxd":102
 *             return &this._empty_token
 *         else:
 *             return &this._sent[i]             # <<<<<<<<<<<<<<
 * 
 *     int H(int i) nogil const:
 */
  /*else*/ {
    __pyx_r = (&(this->_sent[__pyx_v_i]));
    goto __pyx_L0;
  }

  /* "_state.pxd":98
 *         return this.safe_get(this.R(i, idx))
 * 
 *     const TokenC* safe_get(int i) nogil const:             # <<<<<<<<<<<<<<
 *         if i < 0 or i >= this.length:
 *             return &this._empty_token
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":104
 *             return &this._sent[i]
 * 
 *     int H(int i) nogil const:             # <<<<<<<<<<<<<<
 *         if i < 0 or i >= this.length:
 *             return -1
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::H(int __pyx_v_i) const {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "_state.pxd":105
 * 
 *     int H(int i) nogil const:
 *         if i < 0 or i >= this.length:             # <<<<<<<<<<<<<<
 *             return -1
 *         return this._sent[i].head + i
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_i >= this->length) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "_state.pxd":106
 *     int H(int i) nogil const:
 *         if i < 0 or i >= this.length:
 *             return -1             # <<<<<<<<<<<<<<
 *         return this._sent[i].head + i
 * 
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "_state.pxd":105
 * 
 *     int H(int i) nogil const:
 *         if i < 0 or i >= this.length:             # <<<<<<<<<<<<<<
 *             return -1
 *         return this._sent[i].head + i
 */
  }

  /* "_state.pxd":107
 *         if i < 0 or i >= this.length:
 *             return -1
 *         return this._sent[i].head + i             # <<<<<<<<<<<<<<
 * 
 *     int E(int i) nogil const:
 */
  __pyx_r = ((this->_sent[__pyx_v_i]).head + __pyx_v_i);
  goto __pyx_L0;

  /* "_state.pxd":104
 *             return &this._sent[i]
 * 
 *     int H(int i) nogil const:             # <<<<<<<<<<<<<<
 *         if i < 0 or i >= this.length:
 *             return -1
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":109
 *         return this._sent[i].head + i
 * 
 *     int E(int i) nogil const:             # <<<<<<<<<<<<<<
 *         if this._e_i <= 0 or this._e_i >= this.length:
 *             return 0
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::E(int __pyx_v_i) const {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "_state.pxd":110
 * 
 *     int E(int i) nogil const:
 *         if this._e_i <= 0 or this._e_i >= this.length:             # <<<<<<<<<<<<<<
 *             return 0
 *         if i < 0 or i >= this._e_i:
 */
  __pyx_t_2 = ((this->_e_i <= 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((this->_e_i >= this->length) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "_state.pxd":111
 *     int E(int i) nogil const:
 *         if this._e_i <= 0 or this._e_i >= this.length:
 *             return 0             # <<<<<<<<<<<<<<
 *         if i < 0 or i >= this._e_i:
 *             return 0
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "_state.pxd":110
 * 
 *     int E(int i) nogil const:
 *         if this._e_i <= 0 or this._e_i >= this.length:             # <<<<<<<<<<<<<<
 *             return 0
 *         if i < 0 or i >= this._e_i:
 */
  }

  /* "_state.pxd":112
 *         if this._e_i <= 0 or this._e_i >= this.length:
 *             return 0
 *         if i < 0 or i >= this._e_i:             # <<<<<<<<<<<<<<
 *             return 0
 *         return this._ents[this._e_i - (i+1)].start
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_i >= this->_e_i) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;
  if (__pyx_t_1) {

    /* "_state.pxd":113
 *             return 0
 *         if i < 0 or i >= this._e_i:
 *             return 0             # <<<<<<<<<<<<<<
 *         return this._ents[this._e_i - (i+1)].start
 * 
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "_state.pxd":112
 *         if this._e_i <= 0 or this._e_i >= this.length:
 *             return 0
 *         if i < 0 or i >= this._e_i:             # <<<<<<<<<<<<<<
 *             return 0
 *         return this._ents[this._e_i - (i+1)].start
 */
  }

  /* "_state.pxd":114
 *         if i < 0 or i >= this._e_i:
 *             return 0
 *         return this._ents[this._e_i - (i+1)].start             # <<<<<<<<<<<<<<
 * 
 *     int L(int i, int idx) nogil const:
 */
  __pyx_r = (this->_ents[(this->_e_i - (__pyx_v_i + 1))]).start;
  goto __pyx_L0;

  /* "_state.pxd":109
 *         return this._sent[i].head + i
 * 
 *     int E(int i) nogil const:             # <<<<<<<<<<<<<<
 *         if this._e_i <= 0 or this._e_i >= this.length:
 *             return 0
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":116
 *         return this._ents[this._e_i - (i+1)].start
 * 
 *     int L(int i, int idx) nogil const:             # <<<<<<<<<<<<<<
 *         if idx < 1:
 *             return -1
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::L(int __pyx_v_i, int __pyx_v_idx) const {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_v_target;
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_v_ptr;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "_state.pxd":117
 * 
 *     int L(int i, int idx) nogil const:
 *         if idx < 1:             # <<<<<<<<<<<<<<
 *             return -1
 *         if i < 0 or i >= this.length:
 */
  __pyx_t_1 = ((__pyx_v_idx < 1) != 0);
  if (__pyx_t_1) {

    /* "_state.pxd":118
 *     int L(int i, int idx) nogil const:
 *         if idx < 1:
 *             return -1             # <<<<<<<<<<<<<<
 *         if i < 0 or i >= this.length:
 *             return -1
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "_state.pxd":117
 * 
 *     int L(int i, int idx) nogil const:
 *         if idx < 1:             # <<<<<<<<<<<<<<
 *             return -1
 *         if i < 0 or i >= this.length:
 */
  }

  /* "_state.pxd":119
 *         if idx < 1:
 *             return -1
 *         if i < 0 or i >= this.length:             # <<<<<<<<<<<<<<
 *             return -1
 *         cdef const TokenC* target = &this._sent[i]
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_i >= this->length) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "_state.pxd":120
 *             return -1
 *         if i < 0 or i >= this.length:
 *             return -1             # <<<<<<<<<<<<<<
 *         cdef const TokenC* target = &this._sent[i]
 *         if target.l_kids < <uint32_t>idx:
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "_state.pxd":119
 *         if idx < 1:
 *             return -1
 *         if i < 0 or i >= this.length:             # <<<<<<<<<<<<<<
 *             return -1
 *         cdef const TokenC* target = &this._sent[i]
 */
  }

  /* "_state.pxd":121
 *         if i < 0 or i >= this.length:
 *             return -1
 *         cdef const TokenC* target = &this._sent[i]             # <<<<<<<<<<<<<<
 *         if target.l_kids < <uint32_t>idx:
 *             return -1
 */
  __pyx_v_target = (&(this->_sent[__pyx_v_i]));

  /* "_state.pxd":122
 *             return -1
 *         cdef const TokenC* target = &this._sent[i]
 *         if target.l_kids < <uint32_t>idx:             # <<<<<<<<<<<<<<
 *             return -1
 *         cdef const TokenC* ptr = &this._sent[target.l_edge]
 */
  __pyx_t_1 = ((__pyx_v_target->l_kids < ((uint32_t)__pyx_v_idx)) != 0);
  if (__pyx_t_1) {

    /* "_state.pxd":123
 *         cdef const TokenC* target = &this._sent[i]
 *         if target.l_kids < <uint32_t>idx:
 *             return -1             # <<<<<<<<<<<<<<
 *         cdef const TokenC* ptr = &this._sent[target.l_edge]
 * 
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "_state.pxd":122
 *             return -1
 *         cdef const TokenC* target = &this._sent[i]
 *         if target.l_kids < <uint32_t>idx:             # <<<<<<<<<<<<<<
 *             return -1
 *         cdef const TokenC* ptr = &this._sent[target.l_edge]
 */
  }

  /* "_state.pxd":124
 *         if target.l_kids < <uint32_t>idx:
 *             return -1
 *         cdef const TokenC* ptr = &this._sent[target.l_edge]             # <<<<<<<<<<<<<<
 * 
 *         while ptr < target:
 */
  __pyx_v_ptr = (&(this->_sent[__pyx_v_target->l_edge]));

  /* "_state.pxd":126
 *         cdef const TokenC* ptr = &this._sent[target.l_edge]
 * 
 *         while ptr < target:             # <<<<<<<<<<<<<<
 *             # If this head is still to the right of us, we can skip to it
 *             # No token that's between this token and this head could be our
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_ptr < __pyx_v_target) != 0);
    if (!__pyx_t_1) break;

    /* "_state.pxd":130
 *             # No token that's between this token and this head could be our
 *             # child.
 *             if (ptr.head >= 1) and (ptr + ptr.head) < target:             # <<<<<<<<<<<<<<
 *                 ptr += ptr.head
 * 
 */
    __pyx_t_2 = ((__pyx_v_ptr->head >= 1) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_2 = (((__pyx_v_ptr + __pyx_v_ptr->head) < __pyx_v_target) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L11_bool_binop_done:;
    if (__pyx_t_1) {

      /* "_state.pxd":131
 *             # child.
 *             if (ptr.head >= 1) and (ptr + ptr.head) < target:
 *                 ptr += ptr.head             # <<<<<<<<<<<<<<
 * 
 *             elif ptr + ptr.head == target:
 */
      __pyx_v_ptr = (__pyx_v_ptr + __pyx_v_ptr->head);

      /* "_state.pxd":130
 *             # No token that's between this token and this head could be our
 *             # child.
 *             if (ptr.head >= 1) and (ptr + ptr.head) < target:             # <<<<<<<<<<<<<<
 *                 ptr += ptr.head
 * 
 */
      goto __pyx_L10;
    }

    /* "_state.pxd":133
 *                 ptr += ptr.head
 * 
 *             elif ptr + ptr.head == target:             # <<<<<<<<<<<<<<
 *                 idx -= 1
 *                 if idx == 0:
 */
    __pyx_t_1 = (((__pyx_v_ptr + __pyx_v_ptr->head) == __pyx_v_target) != 0);
    if (__pyx_t_1) {

      /* "_state.pxd":134
 * 
 *             elif ptr + ptr.head == target:
 *                 idx -= 1             # <<<<<<<<<<<<<<
 *                 if idx == 0:
 *                     return ptr - this._sent
 */
      __pyx_v_idx = (__pyx_v_idx - 1);

      /* "_state.pxd":135
 *             elif ptr + ptr.head == target:
 *                 idx -= 1
 *                 if idx == 0:             # <<<<<<<<<<<<<<
 *                     return ptr - this._sent
 *                 ptr += 1
 */
      __pyx_t_1 = ((__pyx_v_idx == 0) != 0);
      if (__pyx_t_1) {

        /* "_state.pxd":136
 *                 idx -= 1
 *                 if idx == 0:
 *                     return ptr - this._sent             # <<<<<<<<<<<<<<
 *                 ptr += 1
 *             else:
 */
        __pyx_r = (__pyx_v_ptr - this->_sent);
        goto __pyx_L0;

        /* "_state.pxd":135
 *             elif ptr + ptr.head == target:
 *                 idx -= 1
 *                 if idx == 0:             # <<<<<<<<<<<<<<
 *                     return ptr - this._sent
 *                 ptr += 1
 */
      }

      /* "_state.pxd":137
 *                 if idx == 0:
 *                     return ptr - this._sent
 *                 ptr += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 ptr += 1
 */
      __pyx_v_ptr = (__pyx_v_ptr + 1);

      /* "_state.pxd":133
 *                 ptr += ptr.head
 * 
 *             elif ptr + ptr.head == target:             # <<<<<<<<<<<<<<
 *                 idx -= 1
 *                 if idx == 0:
 */
      goto __pyx_L10;
    }

    /* "_state.pxd":139
 *                 ptr += 1
 *             else:
 *                 ptr += 1             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */
    /*else*/ {
      __pyx_v_ptr = (__pyx_v_ptr + 1);
    }
    __pyx_L10:;
  }

  /* "_state.pxd":140
 *             else:
 *                 ptr += 1
 *         return -1             # <<<<<<<<<<<<<<
 * 
 *     int R(int i, int idx) nogil const:
 */
  __pyx_r = -1;
  goto __pyx_L0;

  /* "_state.pxd":116
 *         return this._ents[this._e_i - (i+1)].start
 * 
 *     int L(int i, int idx) nogil const:             # <<<<<<<<<<<<<<
 *         if idx < 1:
 *             return -1
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":142
 *         return -1
 * 
 *     int R(int i, int idx) nogil const:             # <<<<<<<<<<<<<<
 *         if idx < 1:
 *             return -1
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::R(int __pyx_v_i, int __pyx_v_idx) const {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_v_target;
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_v_ptr;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "_state.pxd":143
 * 
 *     int R(int i, int idx) nogil const:
 *         if idx < 1:             # <<<<<<<<<<<<<<
 *             return -1
 *         if i < 0 or i >= this.length:
 */
  __pyx_t_1 = ((__pyx_v_idx < 1) != 0);
  if (__pyx_t_1) {

    /* "_state.pxd":144
 *     int R(int i, int idx) nogil const:
 *         if idx < 1:
 *             return -1             # <<<<<<<<<<<<<<
 *         if i < 0 or i >= this.length:
 *             return -1
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "_state.pxd":143
 * 
 *     int R(int i, int idx) nogil const:
 *         if idx < 1:             # <<<<<<<<<<<<<<
 *             return -1
 *         if i < 0 or i >= this.length:
 */
  }

  /* "_state.pxd":145
 *         if idx < 1:
 *             return -1
 *         if i < 0 or i >= this.length:             # <<<<<<<<<<<<<<
 *             return -1
 *         cdef const TokenC* target = &this._sent[i]
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_i >= this->length) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "_state.pxd":146
 *             return -1
 *         if i < 0 or i >= this.length:
 *             return -1             # <<<<<<<<<<<<<<
 *         cdef const TokenC* target = &this._sent[i]
 *         if target.r_kids < <uint32_t>idx:
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "_state.pxd":145
 *         if idx < 1:
 *             return -1
 *         if i < 0 or i >= this.length:             # <<<<<<<<<<<<<<
 *             return -1
 *         cdef const TokenC* target = &this._sent[i]
 */
  }

  /* "_state.pxd":147
 *         if i < 0 or i >= this.length:
 *             return -1
 *         cdef const TokenC* target = &this._sent[i]             # <<<<<<<<<<<<<<
 *         if target.r_kids < <uint32_t>idx:
 *             return -1
 */
  __pyx_v_target = (&(this->_sent[__pyx_v_i]));

  /* "_state.pxd":148
 *             return -1
 *         cdef const TokenC* target = &this._sent[i]
 *         if target.r_kids < <uint32_t>idx:             # <<<<<<<<<<<<<<
 *             return -1
 *         cdef const TokenC* ptr = &this._sent[target.r_edge]
 */
  __pyx_t_1 = ((__pyx_v_target->r_kids < ((uint32_t)__pyx_v_idx)) != 0);
  if (__pyx_t_1) {

    /* "_state.pxd":149
 *         cdef const TokenC* target = &this._sent[i]
 *         if target.r_kids < <uint32_t>idx:
 *             return -1             # <<<<<<<<<<<<<<
 *         cdef const TokenC* ptr = &this._sent[target.r_edge]
 *         while ptr > target:
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "_state.pxd":148
 *             return -1
 *         cdef const TokenC* target = &this._sent[i]
 *         if target.r_kids < <uint32_t>idx:             # <<<<<<<<<<<<<<
 *             return -1
 *         cdef const TokenC* ptr = &this._sent[target.r_edge]
 */
  }

  /* "_state.pxd":150
 *         if target.r_kids < <uint32_t>idx:
 *             return -1
 *         cdef const TokenC* ptr = &this._sent[target.r_edge]             # <<<<<<<<<<<<<<
 *         while ptr > target:
 *             # If this head is still to the right of us, we can skip to it
 */
  __pyx_v_ptr = (&(this->_sent[__pyx_v_target->r_edge]));

  /* "_state.pxd":151
 *             return -1
 *         cdef const TokenC* ptr = &this._sent[target.r_edge]
 *         while ptr > target:             # <<<<<<<<<<<<<<
 *             # If this head is still to the right of us, we can skip to it
 *             # No token that's between this token and this head could be our
 */
  while (1) {
    __pyx_t_1 = ((__pyx_v_ptr > __pyx_v_target) != 0);
    if (!__pyx_t_1) break;

    /* "_state.pxd":155
 *             # No token that's between this token and this head could be our
 *             # child.
 *             if (ptr.head < 0) and ((ptr + ptr.head) > target):             # <<<<<<<<<<<<<<
 *                 ptr += ptr.head
 *             elif ptr + ptr.head == target:
 */
    __pyx_t_2 = ((__pyx_v_ptr->head < 0) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L11_bool_binop_done;
    }
    __pyx_t_2 = (((__pyx_v_ptr + __pyx_v_ptr->head) > __pyx_v_target) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L11_bool_binop_done:;
    if (__pyx_t_1) {

      /* "_state.pxd":156
 *             # child.
 *             if (ptr.head < 0) and ((ptr + ptr.head) > target):
 *                 ptr += ptr.head             # <<<<<<<<<<<<<<
 *             elif ptr + ptr.head == target:
 *                 idx -= 1
 */
      __pyx_v_ptr = (__pyx_v_ptr + __pyx_v_ptr->head);

      /* "_state.pxd":155
 *             # No token that's between this token and this head could be our
 *             # child.
 *             if (ptr.head < 0) and ((ptr + ptr.head) > target):             # <<<<<<<<<<<<<<
 *                 ptr += ptr.head
 *             elif ptr + ptr.head == target:
 */
      goto __pyx_L10;
    }

    /* "_state.pxd":157
 *             if (ptr.head < 0) and ((ptr + ptr.head) > target):
 *                 ptr += ptr.head
 *             elif ptr + ptr.head == target:             # <<<<<<<<<<<<<<
 *                 idx -= 1
 *                 if idx == 0:
 */
    __pyx_t_1 = (((__pyx_v_ptr + __pyx_v_ptr->head) == __pyx_v_target) != 0);
    if (__pyx_t_1) {

      /* "_state.pxd":158
 *                 ptr += ptr.head
 *             elif ptr + ptr.head == target:
 *                 idx -= 1             # <<<<<<<<<<<<<<
 *                 if idx == 0:
 *                     return ptr - this._sent
 */
      __pyx_v_idx = (__pyx_v_idx - 1);

      /* "_state.pxd":159
 *             elif ptr + ptr.head == target:
 *                 idx -= 1
 *                 if idx == 0:             # <<<<<<<<<<<<<<
 *                     return ptr - this._sent
 *                 ptr -= 1
 */
      __pyx_t_1 = ((__pyx_v_idx == 0) != 0);
      if (__pyx_t_1) {

        /* "_state.pxd":160
 *                 idx -= 1
 *                 if idx == 0:
 *                     return ptr - this._sent             # <<<<<<<<<<<<<<
 *                 ptr -= 1
 *             else:
 */
        __pyx_r = (__pyx_v_ptr - this->_sent);
        goto __pyx_L0;

        /* "_state.pxd":159
 *             elif ptr + ptr.head == target:
 *                 idx -= 1
 *                 if idx == 0:             # <<<<<<<<<<<<<<
 *                     return ptr - this._sent
 *                 ptr -= 1
 */
      }

      /* "_state.pxd":161
 *                 if idx == 0:
 *                     return ptr - this._sent
 *                 ptr -= 1             # <<<<<<<<<<<<<<
 *             else:
 *                 ptr -= 1
 */
      __pyx_v_ptr = (__pyx_v_ptr - 1);

      /* "_state.pxd":157
 *             if (ptr.head < 0) and ((ptr + ptr.head) > target):
 *                 ptr += ptr.head
 *             elif ptr + ptr.head == target:             # <<<<<<<<<<<<<<
 *                 idx -= 1
 *                 if idx == 0:
 */
      goto __pyx_L10;
    }

    /* "_state.pxd":163
 *                 ptr -= 1
 *             else:
 *                 ptr -= 1             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */
    /*else*/ {
      __pyx_v_ptr = (__pyx_v_ptr - 1);
    }
    __pyx_L10:;
  }

  /* "_state.pxd":164
 *             else:
 *                 ptr -= 1
 *         return -1             # <<<<<<<<<<<<<<
 * 
 *     bint empty() nogil const:
 */
  __pyx_r = -1;
  goto __pyx_L0;

  /* "_state.pxd":142
 *         return -1
 * 
 *     int R(int i, int idx) nogil const:             # <<<<<<<<<<<<<<
 *         if idx < 1:
 *             return -1
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":166
 *         return -1
 * 
 *     bint empty() nogil const:             # <<<<<<<<<<<<<<
 *         return this._s_i <= 0
 * 
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::empty(void) const {
  int __pyx_r;

  /* "_state.pxd":167
 * 
 *     bint empty() nogil const:
 *         return this._s_i <= 0             # <<<<<<<<<<<<<<
 * 
 *     bint eol() nogil const:
 */
  __pyx_r = (this->_s_i <= 0);
  goto __pyx_L0;

  /* "_state.pxd":166
 *         return -1
 * 
 *     bint empty() nogil const:             # <<<<<<<<<<<<<<
 *         return this._s_i <= 0
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":169
 *         return this._s_i <= 0
 * 
 *     bint eol() nogil const:             # <<<<<<<<<<<<<<
 *         return this.buffer_length() == 0
 * 
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::eol(void) const {
  int __pyx_r;

  /* "_state.pxd":170
 * 
 *     bint eol() nogil const:
 *         return this.buffer_length() == 0             # <<<<<<<<<<<<<<
 * 
 *     bint at_break() nogil const:
 */
  __pyx_r = (this->buffer_length() == 0);
  goto __pyx_L0;

  /* "_state.pxd":169
 *         return this._s_i <= 0
 * 
 *     bint eol() nogil const:             # <<<<<<<<<<<<<<
 *         return this.buffer_length() == 0
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":172
 *         return this.buffer_length() == 0
 * 
 *     bint at_break() nogil const:             # <<<<<<<<<<<<<<
 *         return this._break != -1
 * 
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::at_break(void) const {
  int __pyx_r;

  /* "_state.pxd":173
 * 
 *     bint at_break() nogil const:
 *         return this._break != -1             # <<<<<<<<<<<<<<
 * 
 *     bint is_final() nogil const:
 */
  __pyx_r = (this->_break != -1L);
  goto __pyx_L0;

  /* "_state.pxd":172
 *         return this.buffer_length() == 0
 * 
 *     bint at_break() nogil const:             # <<<<<<<<<<<<<<
 *         return this._break != -1
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":175
 *         return this._break != -1
 * 
 *     bint is_final() nogil const:             # <<<<<<<<<<<<<<
 *         return this.stack_depth() <= 0 and this._b_i >= this.length
 * 
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::is_final(void) const {
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;

  /* "_state.pxd":176
 * 
 *     bint is_final() nogil const:
 *         return this.stack_depth() <= 0 and this._b_i >= this.length             # <<<<<<<<<<<<<<
 * 
 *     bint has_head(int i) nogil const:
 */
  __pyx_t_2 = ((this->stack_depth() <= 0) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = ((this->_b_i >= this->length) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "_state.pxd":175
 *         return this._break != -1
 * 
 *     bint is_final() nogil const:             # <<<<<<<<<<<<<<
 *         return this.stack_depth() <= 0 and this._b_i >= this.length
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":178
 *         return this.stack_depth() <= 0 and this._b_i >= this.length
 * 
 *     bint has_head(int i) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(i).head != 0
 * 
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::has_head(int __pyx_v_i) const {
  int __pyx_r;

  /* "_state.pxd":179
 * 
 *     bint has_head(int i) nogil const:
 *         return this.safe_get(i).head != 0             # <<<<<<<<<<<<<<
 * 
 *     int n_L(int i) nogil const:
 */
  __pyx_r = (this->safe_get(__pyx_v_i)->head != 0);
  goto __pyx_L0;

  /* "_state.pxd":178
 *         return this.stack_depth() <= 0 and this._b_i >= this.length
 * 
 *     bint has_head(int i) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(i).head != 0
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":181
 *         return this.safe_get(i).head != 0
 * 
 *     int n_L(int i) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(i).l_kids
 * 
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::n_L(int __pyx_v_i) const {
  int __pyx_r;

  /* "_state.pxd":182
 * 
 *     int n_L(int i) nogil const:
 *         return this.safe_get(i).l_kids             # <<<<<<<<<<<<<<
 * 
 *     int n_R(int i) nogil const:
 */
  __pyx_r = this->safe_get(__pyx_v_i)->l_kids;
  goto __pyx_L0;

  /* "_state.pxd":181
 *         return this.safe_get(i).head != 0
 * 
 *     int n_L(int i) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(i).l_kids
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":184
 *         return this.safe_get(i).l_kids
 * 
 *     int n_R(int i) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(i).r_kids
 * 
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::n_R(int __pyx_v_i) const {
  int __pyx_r;

  /* "_state.pxd":185
 * 
 *     int n_R(int i) nogil const:
 *         return this.safe_get(i).r_kids             # <<<<<<<<<<<<<<
 * 
 *     bint stack_is_connected() nogil const:
 */
  __pyx_r = this->safe_get(__pyx_v_i)->r_kids;
  goto __pyx_L0;

  /* "_state.pxd":184
 *         return this.safe_get(i).l_kids
 * 
 *     int n_R(int i) nogil const:             # <<<<<<<<<<<<<<
 *         return this.safe_get(i).r_kids
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":187
 *         return this.safe_get(i).r_kids
 * 
 *     bint stack_is_connected() nogil const:             # <<<<<<<<<<<<<<
 *         return False
 * 
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::stack_is_connected(void) const {
  int __pyx_r;

  /* "_state.pxd":188
 * 
 *     bint stack_is_connected() nogil const:
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     bint entity_is_open() nogil const:
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "_state.pxd":187
 *         return this.safe_get(i).r_kids
 * 
 *     bint stack_is_connected() nogil const:             # <<<<<<<<<<<<<<
 *         return False
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":190
 *         return False
 * 
 *     bint entity_is_open() nogil const:             # <<<<<<<<<<<<<<
 *         if this._e_i < 1:
 *             return False
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::entity_is_open(void) const {
  int __pyx_r;
  int __pyx_t_1;

  /* "_state.pxd":191
 * 
 *     bint entity_is_open() nogil const:
 *         if this._e_i < 1:             # <<<<<<<<<<<<<<
 *             return False
 *         return this._ents[this._e_i-1].end == -1
 */
  __pyx_t_1 = ((this->_e_i < 1) != 0);
  if (__pyx_t_1) {

    /* "_state.pxd":192
 *     bint entity_is_open() nogil const:
 *         if this._e_i < 1:
 *             return False             # <<<<<<<<<<<<<<
 *         return this._ents[this._e_i-1].end == -1
 * 
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "_state.pxd":191
 * 
 *     bint entity_is_open() nogil const:
 *         if this._e_i < 1:             # <<<<<<<<<<<<<<
 *             return False
 *         return this._ents[this._e_i-1].end == -1
 */
  }

  /* "_state.pxd":193
 *         if this._e_i < 1:
 *             return False
 *         return this._ents[this._e_i-1].end == -1             # <<<<<<<<<<<<<<
 * 
 *     int stack_depth() nogil const:
 */
  __pyx_r = ((this->_ents[(this->_e_i - 1)]).end == -1L);
  goto __pyx_L0;

  /* "_state.pxd":190
 *         return False
 * 
 *     bint entity_is_open() nogil const:             # <<<<<<<<<<<<<<
 *         if this._e_i < 1:
 *             return False
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":195
 *         return this._ents[this._e_i-1].end == -1
 * 
 *     int stack_depth() nogil const:             # <<<<<<<<<<<<<<
 *         return this._s_i
 * 
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::stack_depth(void) const {
  int __pyx_r;

  /* "_state.pxd":196
 * 
 *     int stack_depth() nogil const:
 *         return this._s_i             # <<<<<<<<<<<<<<
 * 
 *     int buffer_length() nogil const:
 */
  __pyx_r = this->_s_i;
  goto __pyx_L0;

  /* "_state.pxd":195
 *         return this._ents[this._e_i-1].end == -1
 * 
 *     int stack_depth() nogil const:             # <<<<<<<<<<<<<<
 *         return this._s_i
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":198
 *         return this._s_i
 * 
 *     int buffer_length() nogil const:             # <<<<<<<<<<<<<<
 *         if this._break != -1:
 *             return this._break - this._b_i
 */

int __pyx_t_5spacy_6syntax_6_state_StateC::buffer_length(void) const {
  int __pyx_r;
  int __pyx_t_1;

  /* "_state.pxd":199
 * 
 *     int buffer_length() nogil const:
 *         if this._break != -1:             # <<<<<<<<<<<<<<
 *             return this._break - this._b_i
 *         else:
 */
  __pyx_t_1 = ((this->_break != -1L) != 0);
  if (__pyx_t_1) {

    /* "_state.pxd":200
 *     int buffer_length() nogil const:
 *         if this._break != -1:
 *             return this._break - this._b_i             # <<<<<<<<<<<<<<
 *         else:
 *             return this.length - this._b_i
 */
    __pyx_r = (this->_break - this->_b_i);
    goto __pyx_L0;

    /* "_state.pxd":199
 * 
 *     int buffer_length() nogil const:
 *         if this._break != -1:             # <<<<<<<<<<<<<<
 *             return this._break - this._b_i
 *         else:
 */
  }

  /* "_state.pxd":202
 *             return this._break - this._b_i
 *         else:
 *             return this.length - this._b_i             # <<<<<<<<<<<<<<
 * 
 *     void push() nogil:
 */
  /*else*/ {
    __pyx_r = (this->length - this->_b_i);
    goto __pyx_L0;
  }

  /* "_state.pxd":198
 *         return this._s_i
 * 
 *     int buffer_length() nogil const:             # <<<<<<<<<<<<<<
 *         if this._break != -1:
 *             return this._break - this._b_i
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "_state.pxd":204
 *             return this.length - this._b_i
 * 
 *     void push() nogil:             # <<<<<<<<<<<<<<
 *         if this.B(0) != -1:
 *             this._stack[this._s_i] = this.B(0)
 */

void __pyx_t_5spacy_6syntax_6_state_StateC::push(void) {
  int __pyx_t_1;

  /* "_state.pxd":205
 * 
 *     void push() nogil:
 *         if this.B(0) != -1:             # <<<<<<<<<<<<<<
 *             this._stack[this._s_i] = this.B(0)
 *         this._s_i += 1
 */
  __pyx_t_1 = ((this->B(0) != -1L) != 0);
  if (__pyx_t_1) {

    /* "_state.pxd":206
 *     void push() nogil:
 *         if this.B(0) != -1:
 *             this._stack[this._s_i] = this.B(0)             # <<<<<<<<<<<<<<
 *         this._s_i += 1
 *         this._b_i += 1
 */
    (this->_stack[this->_s_i]) = this->B(0);

    /* "_state.pxd":205
 * 
 *     void push() nogil:
 *         if this.B(0) != -1:             # <<<<<<<<<<<<<<
 *             this._stack[this._s_i] = this.B(0)
 *         this._s_i += 1
 */
  }

  /* "_state.pxd":207
 *         if this.B(0) != -1:
 *             this._stack[this._s_i] = this.B(0)
 *         this._s_i += 1             # <<<<<<<<<<<<<<
 *         this._b_i += 1
 *         if this._b_i > this._break:
 */
  this->_s_i = (this->_s_i + 1);

  /* "_state.pxd":208
 *             this._stack[this._s_i] = this.B(0)
 *         this._s_i += 1
 *         this._b_i += 1             # <<<<<<<<<<<<<<
 *         if this._b_i > this._break:
 *             this._break = -1
 */
  this->_b_i = (this->_b_i + 1);

  /* "_state.pxd":209
 *         this._s_i += 1
 *         this._b_i += 1
 *         if this._b_i > this._break:             # <<<<<<<<<<<<<<
 *             this._break = -1
 * 
 */
  __pyx_t_1 = ((this->_b_i > this->_break) != 0);
  if (__pyx_t_1) {

    /* "_state.pxd":210
 *         this._b_i += 1
 *         if this._b_i > this._break:
 *             this._break = -1             # <<<<<<<<<<<<<<
 * 
 *     void pop() nogil:
 */
    this->_break = -1;

    /* "_state.pxd":209
 *         this._s_i += 1
 *         this._b_i += 1
 *         if this._b_i > this._break:             # <<<<<<<<<<<<<<
 *             this._break = -1
 * 
 */
  }

  /* "_state.pxd":204
 *             return this.length - this._b_i
 * 
 *     void push() nogil:             # <<<<<<<<<<<<<<
 *         if this.B(0) != -1:
 *             this._stack[this._s_i] = this.B(0)
 */

  /* function exit code */
}

/* "_state.pxd":212
 *             this._break = -1
 * 
 *     void pop() nogil:             # <<<<<<<<<<<<<<
 *         if this._s_i >= 1:
 *             this._s_i -= 1
 */

void __pyx_t_5spacy_6syntax_6_state_StateC::pop(void) {
  int __pyx_t_1;

  /* "_state.pxd":213
 * 
 *     void pop() nogil:
 *         if this._s_i >= 1:             # <<<<<<<<<<<<<<
 *             this._s_i -= 1
 * 
 */
  __pyx_t_1 = ((this->_s_i >= 1) != 0);
  if (__pyx_t_1) {

    /* "_state.pxd":214
 *     void pop() nogil:
 *         if this._s_i >= 1:
 *             this._s_i -= 1             # <<<<<<<<<<<<<<
 * 
 *     void unshift() nogil:
 */
    this->_s_i = (this->_s_i - 1);

    /* "_state.pxd":213
 * 
 *     void pop() nogil:
 *         if this._s_i >= 1:             # <<<<<<<<<<<<<<
 *             this._s_i -= 1
 * 
 */
  }

  /* "_state.pxd":212
 *             this._break = -1
 * 
 *     void pop() nogil:             # <<<<<<<<<<<<<<
 *         if this._s_i >= 1:
 *             this._s_i -= 1
 */

  /* function exit code */
}

/* "_state.pxd":216
 *             this._s_i -= 1
 * 
 *     void unshift() nogil:             # <<<<<<<<<<<<<<
 *         this._b_i -= 1
 *         this._buffer[this._b_i] = this.S(0)
 */

void __pyx_t_5spacy_6syntax_6_state_StateC::unshift(void) {

  /* "_state.pxd":217
 * 
 *     void unshift() nogil:
 *         this._b_i -= 1             # <<<<<<<<<<<<<<
 *         this._buffer[this._b_i] = this.S(0)
 *         this._s_i -= 1
 */
  this->_b_i = (this->_b_i - 1);

  /* "_state.pxd":218
 *     void unshift() nogil:
 *         this._b_i -= 1
 *         this._buffer[this._b_i] = this.S(0)             # <<<<<<<<<<<<<<
 *         this._s_i -= 1
 *         this.shifted[this.B(0)] = True
 */
  (this->_buffer[this->_b_i]) = this->S(0);

  /* "_state.pxd":219
 *         this._b_i -= 1
 *         this._buffer[this._b_i] = this.S(0)
 *         this._s_i -= 1             # <<<<<<<<<<<<<<
 *         this.shifted[this.B(0)] = True
 * 
 */
  this->_s_i = (this->_s_i - 1);

  /* "_state.pxd":220
 *         this._buffer[this._b_i] = this.S(0)
 *         this._s_i -= 1
 *         this.shifted[this.B(0)] = True             # <<<<<<<<<<<<<<
 * 
 *     void add_arc(int head, int child, int label) nogil:
 */
  (this->shifted[this->B(0)]) = 1;

  /* "_state.pxd":216
 *             this._s_i -= 1
 * 
 *     void unshift() nogil:             # <<<<<<<<<<<<<<
 *         this._b_i -= 1
 *         this._buffer[this._b_i] = this.S(0)
 */

  /* function exit code */
}

/* "_state.pxd":222
 *         this.shifted[this.B(0)] = True
 * 
 *     void add_arc(int head, int child, int label) nogil:             # <<<<<<<<<<<<<<
 *         if this.has_head(child):
 *             this.del_arc(this.H(child), child)
 */

void __pyx_t_5spacy_6syntax_6_state_StateC::add_arc(int __pyx_v_head, int __pyx_v_child, int __pyx_v_label) {
  int __pyx_v_dist;
  int __pyx_v_i;
  int __pyx_t_1;
  int __pyx_t_2;
  uint32_t __pyx_t_3;
  int __pyx_t_4;

  /* "_state.pxd":223
 * 
 *     void add_arc(int head, int child, int label) nogil:
 *         if this.has_head(child):             # <<<<<<<<<<<<<<
 *             this.del_arc(this.H(child), child)
 * 
 */
  __pyx_t_1 = (this->has_head(__pyx_v_child) != 0);
  if (__pyx_t_1) {

    /* "_state.pxd":224
 *     void add_arc(int head, int child, int label) nogil:
 *         if this.has_head(child):
 *             this.del_arc(this.H(child), child)             # <<<<<<<<<<<<<<
 * 
 *         cdef int dist = head - child
 */
    this->del_arc(this->H(__pyx_v_child), __pyx_v_child);

    /* "_state.pxd":223
 * 
 *     void add_arc(int head, int child, int label) nogil:
 *         if this.has_head(child):             # <<<<<<<<<<<<<<
 *             this.del_arc(this.H(child), child)
 * 
 */
  }

  /* "_state.pxd":226
 *             this.del_arc(this.H(child), child)
 * 
 *         cdef int dist = head - child             # <<<<<<<<<<<<<<
 *         this._sent[child].head = dist
 *         this._sent[child].dep = label
 */
  __pyx_v_dist = (__pyx_v_head - __pyx_v_child);

  /* "_state.pxd":227
 * 
 *         cdef int dist = head - child
 *         this._sent[child].head = dist             # <<<<<<<<<<<<<<
 *         this._sent[child].dep = label
 *         cdef int i
 */
  (this->_sent[__pyx_v_child]).head = __pyx_v_dist;

  /* "_state.pxd":228
 *         cdef int dist = head - child
 *         this._sent[child].head = dist
 *         this._sent[child].dep = label             # <<<<<<<<<<<<<<
 *         cdef int i
 *         if child > head:
 */
  (this->_sent[__pyx_v_child]).dep = __pyx_v_label;

  /* "_state.pxd":230
 *         this._sent[child].dep = label
 *         cdef int i
 *         if child > head:             # <<<<<<<<<<<<<<
 *             this._sent[head].r_kids += 1
 *             # Some transition systems can have a word in the buffer have a
 */
  __pyx_t_1 = ((__pyx_v_child > __pyx_v_head) != 0);
  if (__pyx_t_1) {

    /* "_state.pxd":231
 *         cdef int i
 *         if child > head:
 *             this._sent[head].r_kids += 1             # <<<<<<<<<<<<<<
 *             # Some transition systems can have a word in the buffer have a
 *             # rightward child, e.g. from Unshift.
 */
    __pyx_t_2 = __pyx_v_head;
    (this->_sent[__pyx_t_2]).r_kids = ((this->_sent[__pyx_t_2]).r_kids + 1);

    /* "_state.pxd":234
 *             # Some transition systems can have a word in the buffer have a
 *             # rightward child, e.g. from Unshift.
 *             this._sent[head].r_edge = this._sent[child].r_edge             # <<<<<<<<<<<<<<
 *             i = 0
 *             while this.has_head(head) and i < this.length:
 */
    __pyx_t_3 = (this->_sent[__pyx_v_child]).r_edge;
    (this->_sent[__pyx_v_head]).r_edge = __pyx_t_3;

    /* "_state.pxd":235
 *             # rightward child, e.g. from Unshift.
 *             this._sent[head].r_edge = this._sent[child].r_edge
 *             i = 0             # <<<<<<<<<<<<<<
 *             while this.has_head(head) and i < this.length:
 *                 head = this.H(head)
 */
    __pyx_v_i = 0;

    /* "_state.pxd":236
 *             this._sent[head].r_edge = this._sent[child].r_edge
 *             i = 0
 *             while this.has_head(head) and i < this.length:             # <<<<<<<<<<<<<<
 *                 head = this.H(head)
 *                 this._sent[head].r_edge = this._sent[child].r_edge
 */
    while (1) {
      __pyx_t_4 = (this->has_head(__pyx_v_head) != 0);
      if (__pyx_t_4) {
      } else {
        __pyx_t_1 = __pyx_t_4;
        goto __pyx_L7_bool_binop_done;
      }
      __pyx_t_4 = ((__pyx_v_i < this->length) != 0);
      __pyx_t_1 = __pyx_t_4;
      __pyx_L7_bool_binop_done:;
      if (!__pyx_t_1) break;

      /* "_state.pxd":237
 *             i = 0
 *             while this.has_head(head) and i < this.length:
 *                 head = this.H(head)             # <<<<<<<<<<<<<<
 *                 this._sent[head].r_edge = this._sent[child].r_edge
 *                 i += 1 # Guard against infinite loops
 */
      __pyx_v_head = this->H(__pyx_v_head);

      /* "_state.pxd":238
 *             while this.has_head(head) and i < this.length:
 *                 head = this.H(head)
 *                 this._sent[head].r_edge = this._sent[child].r_edge             # <<<<<<<<<<<<<<
 *                 i += 1 # Guard against infinite loops
 *         else:
 */
      __pyx_t_3 = (this->_sent[__pyx_v_child]).r_edge;
      (this->_sent[__pyx_v_head]).r_edge = __pyx_t_3;

      /* "_state.pxd":239
 *                 head = this.H(head)
 *                 this._sent[head].r_edge = this._sent[child].r_edge
 *                 i += 1 # Guard against infinite loops             # <<<<<<<<<<<<<<
 *         else:
 *             this._sent[head].l_kids += 1
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }

    /* "_state.pxd":230
 *         this._sent[child].dep = label
 *         cdef int i
 *         if child > head:             # <<<<<<<<<<<<<<
 *             this._sent[head].r_kids += 1
 *             # Some transition systems can have a word in the buffer have a
 */
    goto __pyx_L4;
  }

  /* "_state.pxd":241
 *                 i += 1 # Guard against infinite loops
 *         else:
 *             this._sent[head].l_kids += 1             # <<<<<<<<<<<<<<
 *             this._sent[head].l_edge = this._sent[child].l_edge
 * 
 */
  /*else*/ {
    __pyx_t_2 = __pyx_v_head;
    (this->_sent[__pyx_t_2]).l_kids = ((this->_sent[__pyx_t_2]).l_kids + 1);

    /* "_state.pxd":242
 *         else:
 *             this._sent[head].l_kids += 1
 *             this._sent[head].l_edge = this._sent[child].l_edge             # <<<<<<<<<<<<<<
 * 
 *     void del_arc(int h_i, int c_i) nogil:
 */
    __pyx_t_3 = (this->_sent[__pyx_v_child]).l_edge;
    (this->_sent[__pyx_v_head]).l_edge = __pyx_t_3;
  }
  __pyx_L4:;

  /* "_state.pxd":222
 *         this.shifted[this.B(0)] = True
 * 
 *     void add_arc(int head, int child, int label) nogil:             # <<<<<<<<<<<<<<
 *         if this.has_head(child):
 *             this.del_arc(this.H(child), child)
 */

  /* function exit code */
}

/* "_state.pxd":244
 *             this._sent[head].l_edge = this._sent[child].l_edge
 * 
 *     void del_arc(int h_i, int c_i) nogil:             # <<<<<<<<<<<<<<
 *         cdef int dist = h_i - c_i
 *         cdef TokenC* h = &this._sent[h_i]
 */

void __pyx_t_5spacy_6syntax_6_state_StateC::del_arc(int __pyx_v_h_i, int __pyx_v_c_i) {
  CYTHON_UNUSED int __pyx_v_dist;
  struct __pyx_t_5spacy_7structs_TokenC *__pyx_v_h;
  int __pyx_v_i;
  uint32_t __pyx_v_new_edge;
  int __pyx_t_1;
  uint32_t __pyx_t_2;
  int __pyx_t_3;

  /* "_state.pxd":245
 * 
 *     void del_arc(int h_i, int c_i) nogil:
 *         cdef int dist = h_i - c_i             # <<<<<<<<<<<<<<
 *         cdef TokenC* h = &this._sent[h_i]
 *         cdef int i = 0
 */
  __pyx_v_dist = (__pyx_v_h_i - __pyx_v_c_i);

  /* "_state.pxd":246
 *     void del_arc(int h_i, int c_i) nogil:
 *         cdef int dist = h_i - c_i
 *         cdef TokenC* h = &this._sent[h_i]             # <<<<<<<<<<<<<<
 *         cdef int i = 0
 *         if c_i > h_i:
 */
  __pyx_v_h = (&(this->_sent[__pyx_v_h_i]));

  /* "_state.pxd":247
 *         cdef int dist = h_i - c_i
 *         cdef TokenC* h = &this._sent[h_i]
 *         cdef int i = 0             # <<<<<<<<<<<<<<
 *         if c_i > h_i:
 *             # this.R_(h_i, 2) returns the second-rightmost child token of h_i
 */
  __pyx_v_i = 0;

  /* "_state.pxd":248
 *         cdef TokenC* h = &this._sent[h_i]
 *         cdef int i = 0
 *         if c_i > h_i:             # <<<<<<<<<<<<<<
 *             # this.R_(h_i, 2) returns the second-rightmost child token of h_i
 *             # If we have more than 2 rightmost children, our 2nd rightmost child's
 */
  __pyx_t_1 = ((__pyx_v_c_i > __pyx_v_h_i) != 0);
  if (__pyx_t_1) {

    /* "_state.pxd":252
 *             # If we have more than 2 rightmost children, our 2nd rightmost child's
 *             # rightmost edge is going to be our new rightmost edge.
 *             h.r_edge = this.R_(h_i, 2).r_edge if h.r_kids >= 2 else h_i             # <<<<<<<<<<<<<<
 *             h.r_kids -= 1
 *             new_edge = h.r_edge
 */
    if (((__pyx_v_h->r_kids >= 2) != 0)) {
      __pyx_t_2 = this->R_(__pyx_v_h_i, 2)->r_edge;
    } else {
      __pyx_t_2 = __pyx_v_h_i;
    }
    __pyx_v_h->r_edge = __pyx_t_2;

    /* "_state.pxd":253
 *             # rightmost edge is going to be our new rightmost edge.
 *             h.r_edge = this.R_(h_i, 2).r_edge if h.r_kids >= 2 else h_i
 *             h.r_kids -= 1             # <<<<<<<<<<<<<<
 *             new_edge = h.r_edge
 *             # Correct upwards in the tree --- see Issue #251
 */
    __pyx_v_h->r_kids = (__pyx_v_h->r_kids - 1);

    /* "_state.pxd":254
 *             h.r_edge = this.R_(h_i, 2).r_edge if h.r_kids >= 2 else h_i
 *             h.r_kids -= 1
 *             new_edge = h.r_edge             # <<<<<<<<<<<<<<
 *             # Correct upwards in the tree --- see Issue #251
 *             while h.head < 0 and i < this.length: # Guard infinite loop
 */
    __pyx_t_2 = __pyx_v_h->r_edge;
    __pyx_v_new_edge = __pyx_t_2;

    /* "_state.pxd":256
 *             new_edge = h.r_edge
 *             # Correct upwards in the tree --- see Issue #251
 *             while h.head < 0 and i < this.length: # Guard infinite loop             # <<<<<<<<<<<<<<
 *                 h += h.head
 *                 h.r_edge = new_edge
 */
    while (1) {
      __pyx_t_3 = ((__pyx_v_h->head < 0) != 0);
      if (__pyx_t_3) {
      } else {
        __pyx_t_1 = __pyx_t_3;
        goto __pyx_L6_bool_binop_done;
      }
      __pyx_t_3 = ((__pyx_v_i < this->length) != 0);
      __pyx_t_1 = __pyx_t_3;
      __pyx_L6_bool_binop_done:;
      if (!__pyx_t_1) break;

      /* "_state.pxd":257
 *             # Correct upwards in the tree --- see Issue #251
 *             while h.head < 0 and i < this.length: # Guard infinite loop
 *                 h += h.head             # <<<<<<<<<<<<<<
 *                 h.r_edge = new_edge
 *                 i += 1
 */
      __pyx_v_h = (__pyx_v_h + __pyx_v_h->head);

      /* "_state.pxd":258
 *             while h.head < 0 and i < this.length: # Guard infinite loop
 *                 h += h.head
 *                 h.r_edge = new_edge             # <<<<<<<<<<<<<<
 *                 i += 1
 *         else:
 */
      __pyx_v_h->r_edge = __pyx_v_new_edge;

      /* "_state.pxd":259
 *                 h += h.head
 *                 h.r_edge = new_edge
 *                 i += 1             # <<<<<<<<<<<<<<
 *         else:
 *             # Same logic applies for left edge, but we don't need to walk up
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }

    /* "_state.pxd":248
 *         cdef TokenC* h = &this._sent[h_i]
 *         cdef int i = 0
 *         if c_i > h_i:             # <<<<<<<<<<<<<<
 *             # this.R_(h_i, 2) returns the second-rightmost child token of h_i
 *             # If we have more than 2 rightmost children, our 2nd rightmost child's
 */
    goto __pyx_L3;
  }

  /* "_state.pxd":263
 *             # Same logic applies for left edge, but we don't need to walk up
 *             # the tree, as the head is off the stack.
 *             h.l_edge = this.L_(h_i, 2).l_edge if h.l_kids >= 2 else h_i             # <<<<<<<<<<<<<<
 *             h.l_kids -= 1
 * 
 */
  /*else*/ {
    if (((__pyx_v_h->l_kids >= 2) != 0)) {
      __pyx_t_2 = this->L_(__pyx_v_h_i, 2)->l_edge;
    } else {
      __pyx_t_2 = __pyx_v_h_i;
    }
    __pyx_v_h->l_edge = __pyx_t_2;

    /* "_state.pxd":264
 *             # the tree, as the head is off the stack.
 *             h.l_edge = this.L_(h_i, 2).l_edge if h.l_kids >= 2 else h_i
 *             h.l_kids -= 1             # <<<<<<<<<<<<<<
 * 
 *     void open_ent(int label) nogil:
 */
    __pyx_v_h->l_kids = (__pyx_v_h->l_kids - 1);
  }
  __pyx_L3:;

  /* "_state.pxd":244
 *             this._sent[head].l_edge = this._sent[child].l_edge
 * 
 *     void del_arc(int h_i, int c_i) nogil:             # <<<<<<<<<<<<<<
 *         cdef int dist = h_i - c_i
 *         cdef TokenC* h = &this._sent[h_i]
 */

  /* function exit code */
}

/* "_state.pxd":266
 *             h.l_kids -= 1
 * 
 *     void open_ent(int label) nogil:             # <<<<<<<<<<<<<<
 *         this._ents[this._e_i].start = this.B(0)
 *         this._ents[this._e_i].label = label
 */

void __pyx_t_5spacy_6syntax_6_state_StateC::open_ent(int __pyx_v_label) {

  /* "_state.pxd":267
 * 
 *     void open_ent(int label) nogil:
 *         this._ents[this._e_i].start = this.B(0)             # <<<<<<<<<<<<<<
 *         this._ents[this._e_i].label = label
 *         this._ents[this._e_i].end = -1
 */
  (this->_ents[this->_e_i]).start = this->B(0);

  /* "_state.pxd":268
 *     void open_ent(int label) nogil:
 *         this._ents[this._e_i].start = this.B(0)
 *         this._ents[this._e_i].label = label             # <<<<<<<<<<<<<<
 *         this._ents[this._e_i].end = -1
 *         this._e_i += 1
 */
  (this->_ents[this->_e_i]).label = __pyx_v_label;

  /* "_state.pxd":269
 *         this._ents[this._e_i].start = this.B(0)
 *         this._ents[this._e_i].label = label
 *         this._ents[this._e_i].end = -1             # <<<<<<<<<<<<<<
 *         this._e_i += 1
 * 
 */
  (this->_ents[this->_e_i]).end = -1;

  /* "_state.pxd":270
 *         this._ents[this._e_i].label = label
 *         this._ents[this._e_i].end = -1
 *         this._e_i += 1             # <<<<<<<<<<<<<<
 * 
 *     void close_ent() nogil:
 */
  this->_e_i = (this->_e_i + 1);

  /* "_state.pxd":266
 *             h.l_kids -= 1
 * 
 *     void open_ent(int label) nogil:             # <<<<<<<<<<<<<<
 *         this._ents[this._e_i].start = this.B(0)
 *         this._ents[this._e_i].label = label
 */

  /* function exit code */
}

/* "_state.pxd":272
 *         this._e_i += 1
 * 
 *     void close_ent() nogil:             # <<<<<<<<<<<<<<
 *         # Note that we don't decrement _e_i here! We want to maintain all
 *         # entities, not over-write them...
 */

void __pyx_t_5spacy_6syntax_6_state_StateC::close_ent(void) {

  /* "_state.pxd":275
 *         # Note that we don't decrement _e_i here! We want to maintain all
 *         # entities, not over-write them...
 *         this._ents[this._e_i-1].end = this.B(0)+1             # <<<<<<<<<<<<<<
 *         this._sent[this.B(0)].ent_iob = 1
 * 
 */
  (this->_ents[(this->_e_i - 1)]).end = (this->B(0) + 1);

  /* "_state.pxd":276
 *         # entities, not over-write them...
 *         this._ents[this._e_i-1].end = this.B(0)+1
 *         this._sent[this.B(0)].ent_iob = 1             # <<<<<<<<<<<<<<
 * 
 *     void set_ent_tag(int i, int ent_iob, int ent_type) nogil:
 */
  (this->_sent[this->B(0)]).ent_iob = 1;

  /* "_state.pxd":272
 *         this._e_i += 1
 * 
 *     void close_ent() nogil:             # <<<<<<<<<<<<<<
 *         # Note that we don't decrement _e_i here! We want to maintain all
 *         # entities, not over-write them...
 */

  /* function exit code */
}

/* "_state.pxd":278
 *         this._sent[this.B(0)].ent_iob = 1
 * 
 *     void set_ent_tag(int i, int ent_iob, int ent_type) nogil:             # <<<<<<<<<<<<<<
 *         if 0 <= i < this.length:
 *             this._sent[i].ent_iob = ent_iob
 */

void __pyx_t_5spacy_6syntax_6_state_StateC::set_ent_tag(int __pyx_v_i, int __pyx_v_ent_iob, int __pyx_v_ent_type) {
  int __pyx_t_1;
  int __pyx_t_2;

  /* "_state.pxd":279
 * 
 *     void set_ent_tag(int i, int ent_iob, int ent_type) nogil:
 *         if 0 <= i < this.length:             # <<<<<<<<<<<<<<
 *             this._sent[i].ent_iob = ent_iob
 *             this._sent[i].ent_type = ent_type
 */
  __pyx_t_1 = (0 <= __pyx_v_i);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_i < this->length);
  }
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "_state.pxd":280
 *     void set_ent_tag(int i, int ent_iob, int ent_type) nogil:
 *         if 0 <= i < this.length:
 *             this._sent[i].ent_iob = ent_iob             # <<<<<<<<<<<<<<
 *             this._sent[i].ent_type = ent_type
 * 
 */
    (this->_sent[__pyx_v_i]).ent_iob = __pyx_v_ent_iob;

    /* "_state.pxd":281
 *         if 0 <= i < this.length:
 *             this._sent[i].ent_iob = ent_iob
 *             this._sent[i].ent_type = ent_type             # <<<<<<<<<<<<<<
 * 
 *     void set_break(int i) nogil:
 */
    (this->_sent[__pyx_v_i]).ent_type = __pyx_v_ent_type;

    /* "_state.pxd":279
 * 
 *     void set_ent_tag(int i, int ent_iob, int ent_type) nogil:
 *         if 0 <= i < this.length:             # <<<<<<<<<<<<<<
 *             this._sent[i].ent_iob = ent_iob
 *             this._sent[i].ent_type = ent_type
 */
  }

  /* "_state.pxd":278
 *         this._sent[this.B(0)].ent_iob = 1
 * 
 *     void set_ent_tag(int i, int ent_iob, int ent_type) nogil:             # <<<<<<<<<<<<<<
 *         if 0 <= i < this.length:
 *             this._sent[i].ent_iob = ent_iob
 */

  /* function exit code */
}

/* "_state.pxd":283
 *             this._sent[i].ent_type = ent_type
 * 
 *     void set_break(int i) nogil:             # <<<<<<<<<<<<<<
 *         if 0 <= i < this.length:
 *             this._sent[i].sent_start = True
 */

void __pyx_t_5spacy_6syntax_6_state_StateC::set_break(int __pyx_v_i) {
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "_state.pxd":284
 * 
 *     void set_break(int i) nogil:
 *         if 0 <= i < this.length:             # <<<<<<<<<<<<<<
 *             this._sent[i].sent_start = True
 *             this._break = this._b_i
 */
  __pyx_t_1 = (0 <= __pyx_v_i);
  if (__pyx_t_1) {
    __pyx_t_1 = (__pyx_v_i < this->length);
  }
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "_state.pxd":285
 *     void set_break(int i) nogil:
 *         if 0 <= i < this.length:
 *             this._sent[i].sent_start = True             # <<<<<<<<<<<<<<
 *             this._break = this._b_i
 * 
 */
    (this->_sent[__pyx_v_i]).sent_start = 1;

    /* "_state.pxd":286
 *         if 0 <= i < this.length:
 *             this._sent[i].sent_start = True
 *             this._break = this._b_i             # <<<<<<<<<<<<<<
 * 
 *     void clone(const StateC* src) nogil:
 */
    __pyx_t_3 = this->_b_i;
    this->_break = __pyx_t_3;

    /* "_state.pxd":284
 * 
 *     void set_break(int i) nogil:
 *         if 0 <= i < this.length:             # <<<<<<<<<<<<<<
 *             this._sent[i].sent_start = True
 *             this._break = this._b_i
 */
  }

  /* "_state.pxd":283
 *             this._sent[i].ent_type = ent_type
 * 
 *     void set_break(int i) nogil:             # <<<<<<<<<<<<<<
 *         if 0 <= i < this.length:
 *             this._sent[i].sent_start = True
 */

  /* function exit code */
}

/* "_state.pxd":288
 *             this._break = this._b_i
 * 
 *     void clone(const StateC* src) nogil:             # <<<<<<<<<<<<<<
 *         memcpy(this._sent, src._sent, this.length * sizeof(TokenC))
 *         memcpy(this._stack, src._stack, this.length * sizeof(int))
 */

void __pyx_t_5spacy_6syntax_6_state_StateC::clone(__pyx_t_5spacy_6syntax_6_state_StateC const *__pyx_v_src) {
  int __pyx_t_1;

  /* "_state.pxd":289
 * 
 *     void clone(const StateC* src) nogil:
 *         memcpy(this._sent, src._sent, this.length * sizeof(TokenC))             # <<<<<<<<<<<<<<
 *         memcpy(this._stack, src._stack, this.length * sizeof(int))
 *         memcpy(this._buffer, src._buffer, this.length * sizeof(int))
 */
  memcpy(this->_sent, __pyx_v_src->_sent, (this->length * (sizeof(struct __pyx_t_5spacy_7structs_TokenC))));

  /* "_state.pxd":290
 *     void clone(const StateC* src) nogil:
 *         memcpy(this._sent, src._sent, this.length * sizeof(TokenC))
 *         memcpy(this._stack, src._stack, this.length * sizeof(int))             # <<<<<<<<<<<<<<
 *         memcpy(this._buffer, src._buffer, this.length * sizeof(int))
 *         memcpy(this._ents, src._ents, this.length * sizeof(Entity))
 */
  memcpy(this->_stack, __pyx_v_src->_stack, (this->length * (sizeof(int))));

  /* "_state.pxd":291
 *         memcpy(this._sent, src._sent, this.length * sizeof(TokenC))
 *         memcpy(this._stack, src._stack, this.length * sizeof(int))
 *         memcpy(this._buffer, src._buffer, this.length * sizeof(int))             # <<<<<<<<<<<<<<
 *         memcpy(this._ents, src._ents, this.length * sizeof(Entity))
 *         this._b_i = src._b_i
 */
  memcpy(this->_buffer, __pyx_v_src->_buffer, (this->length * (sizeof(int))));

  /* "_state.pxd":292
 *         memcpy(this._stack, src._stack, this.length * sizeof(int))
 *         memcpy(this._buffer, src._buffer, this.length * sizeof(int))
 *         memcpy(this._ents, src._ents, this.length * sizeof(Entity))             # <<<<<<<<<<<<<<
 *         this._b_i = src._b_i
 *         this._s_i = src._s_i
 */
  memcpy(this->_ents, __pyx_v_src->_ents, (this->length * (sizeof(struct __pyx_t_5spacy_7structs_Entity))));

  /* "_state.pxd":293
 *         memcpy(this._buffer, src._buffer, this.length * sizeof(int))
 *         memcpy(this._ents, src._ents, this.length * sizeof(Entity))
 *         this._b_i = src._b_i             # <<<<<<<<<<<<<<
 *         this._s_i = src._s_i
 *         this._e_i = src._e_i
 */
  __pyx_t_1 = __pyx_v_src->_b_i;
  this->_b_i = __pyx_t_1;

  /* "_state.pxd":294
 *         memcpy(this._ents, src._ents, this.length * sizeof(Entity))
 *         this._b_i = src._b_i
 *         this._s_i = src._s_i             # <<<<<<<<<<<<<<
 *         this._e_i = src._e_i
 *         this._break = src._break
 */
  __pyx_t_1 = __pyx_v_src->_s_i;
  this->_s_i = __pyx_t_1;

  /* "_state.pxd":295
 *         this._b_i = src._b_i
 *         this._s_i = src._s_i
 *         this._e_i = src._e_i             # <<<<<<<<<<<<<<
 *         this._break = src._break
 * 
 */
  __pyx_t_1 = __pyx_v_src->_e_i;
  this->_e_i = __pyx_t_1;

  /* "_state.pxd":296
 *         this._s_i = src._s_i
 *         this._e_i = src._e_i
 *         this._break = src._break             # <<<<<<<<<<<<<<
 * 
 *     void fast_forward() nogil:
 */
  __pyx_t_1 = __pyx_v_src->_break;
  this->_break = __pyx_t_1;

  /* "_state.pxd":288
 *             this._break = this._b_i
 * 
 *     void clone(const StateC* src) nogil:             # <<<<<<<<<<<<<<
 *         memcpy(this._sent, src._sent, this.length * sizeof(TokenC))
 *         memcpy(this._stack, src._stack, this.length * sizeof(int))
 */

  /* function exit code */
}

/* "_state.pxd":298
 *         this._break = src._break
 * 
 *     void fast_forward() nogil:             # <<<<<<<<<<<<<<
 *         # space token attachement policy:
 *         # - attach space tokens always to the last preceding real token
 */

void __pyx_t_5spacy_6syntax_6_state_StateC::fast_forward(void) {
  int __pyx_t_1;
  int __pyx_t_2;

  /* "_state.pxd":305
 *         #   then make the last space token the head of all others
 * 
 *         while is_space_token(this.B_(0)) \             # <<<<<<<<<<<<<<
 *         or this.buffer_length() == 0 \
 *         or this.stack_depth() == 0:
 */
  while (1) {

    /* "_state.pxd":306
 * 
 *         while is_space_token(this.B_(0)) \
 *         or this.buffer_length() == 0 \             # <<<<<<<<<<<<<<
 *         or this.stack_depth() == 0:
 *             if this.buffer_length() == 0:
 */
    __pyx_t_2 = (__pyx_f_5spacy_6syntax_6_state_is_space_token(this->B_(0)) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }

    /* "_state.pxd":307
 *         while is_space_token(this.B_(0)) \
 *         or this.buffer_length() == 0 \
 *         or this.stack_depth() == 0:             # <<<<<<<<<<<<<<
 *             if this.buffer_length() == 0:
 *                 # remove the last sentence's root from the stack
 */
    __pyx_t_2 = ((this->buffer_length() == 0) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_2 = ((this->stack_depth() == 0) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L5_bool_binop_done:;
    if (!__pyx_t_1) break;

    /* "_state.pxd":308
 *         or this.buffer_length() == 0 \
 *         or this.stack_depth() == 0:
 *             if this.buffer_length() == 0:             # <<<<<<<<<<<<<<
 *                 # remove the last sentence's root from the stack
 *                 if this.stack_depth() == 1:
 */
    __pyx_t_1 = ((this->buffer_length() == 0) != 0);
    if (__pyx_t_1) {

      /* "_state.pxd":310
 *             if this.buffer_length() == 0:
 *                 # remove the last sentence's root from the stack
 *                 if this.stack_depth() == 1:             # <<<<<<<<<<<<<<
 *                     this.pop()
 *                 # parser got stuck: reduce stack or unshift
 */
      __pyx_t_1 = ((this->stack_depth() == 1) != 0);
      if (__pyx_t_1) {

        /* "_state.pxd":311
 *                 # remove the last sentence's root from the stack
 *                 if this.stack_depth() == 1:
 *                     this.pop()             # <<<<<<<<<<<<<<
 *                 # parser got stuck: reduce stack or unshift
 *                 elif this.stack_depth() > 1:
 */
        this->pop();

        /* "_state.pxd":310
 *             if this.buffer_length() == 0:
 *                 # remove the last sentence's root from the stack
 *                 if this.stack_depth() == 1:             # <<<<<<<<<<<<<<
 *                     this.pop()
 *                 # parser got stuck: reduce stack or unshift
 */
        goto __pyx_L9;
      }

      /* "_state.pxd":313
 *                     this.pop()
 *                 # parser got stuck: reduce stack or unshift
 *                 elif this.stack_depth() > 1:             # <<<<<<<<<<<<<<
 *                     if this.has_head(this.S(0)):
 *                         this.pop()
 */
      __pyx_t_1 = ((this->stack_depth() > 1) != 0);
      if (__pyx_t_1) {

        /* "_state.pxd":314
 *                 # parser got stuck: reduce stack or unshift
 *                 elif this.stack_depth() > 1:
 *                     if this.has_head(this.S(0)):             # <<<<<<<<<<<<<<
 *                         this.pop()
 *                     else:
 */
        __pyx_t_1 = (this->has_head(this->S(0)) != 0);
        if (__pyx_t_1) {

          /* "_state.pxd":315
 *                 elif this.stack_depth() > 1:
 *                     if this.has_head(this.S(0)):
 *                         this.pop()             # <<<<<<<<<<<<<<
 *                     else:
 *                         this.unshift()
 */
          this->pop();

          /* "_state.pxd":314
 *                 # parser got stuck: reduce stack or unshift
 *                 elif this.stack_depth() > 1:
 *                     if this.has_head(this.S(0)):             # <<<<<<<<<<<<<<
 *                         this.pop()
 *                     else:
 */
          goto __pyx_L10;
        }

        /* "_state.pxd":317
 *                         this.pop()
 *                     else:
 *                         this.unshift()             # <<<<<<<<<<<<<<
 *                 # stack is empty but there is another sentence on the buffer
 *                 elif (this.length - this._b_i) >= 1:
 */
        /*else*/ {
          this->unshift();
        }
        __pyx_L10:;

        /* "_state.pxd":313
 *                     this.pop()
 *                 # parser got stuck: reduce stack or unshift
 *                 elif this.stack_depth() > 1:             # <<<<<<<<<<<<<<
 *                     if this.has_head(this.S(0)):
 *                         this.pop()
 */
        goto __pyx_L9;
      }

      /* "_state.pxd":319
 *                         this.unshift()
 *                 # stack is empty but there is another sentence on the buffer
 *                 elif (this.length - this._b_i) >= 1:             # <<<<<<<<<<<<<<
 *                     this.push()
 *                 else: # stack empty and nothing else coming
 */
      __pyx_t_1 = (((this->length - this->_b_i) >= 1) != 0);
      if (__pyx_t_1) {

        /* "_state.pxd":320
 *                 # stack is empty but there is another sentence on the buffer
 *                 elif (this.length - this._b_i) >= 1:
 *                     this.push()             # <<<<<<<<<<<<<<
 *                 else: # stack empty and nothing else coming
 *                     break
 */
        this->push();

        /* "_state.pxd":319
 *                         this.unshift()
 *                 # stack is empty but there is another sentence on the buffer
 *                 elif (this.length - this._b_i) >= 1:             # <<<<<<<<<<<<<<
 *                     this.push()
 *                 else: # stack empty and nothing else coming
 */
        goto __pyx_L9;
      }

      /* "_state.pxd":322
 *                     this.push()
 *                 else: # stack empty and nothing else coming
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             elif is_space_token(this.B_(0)):
 */
      /*else*/ {
        goto __pyx_L4_break;
      }
      __pyx_L9:;

      /* "_state.pxd":308
 *         or this.buffer_length() == 0 \
 *         or this.stack_depth() == 0:
 *             if this.buffer_length() == 0:             # <<<<<<<<<<<<<<
 *                 # remove the last sentence's root from the stack
 *                 if this.stack_depth() == 1:
 */
      goto __pyx_L8;
    }

    /* "_state.pxd":324
 *                     break
 * 
 *             elif is_space_token(this.B_(0)):             # <<<<<<<<<<<<<<
 *                 # the normal case: we're somewhere inside a sentence
 *                 if this.stack_depth() > 0:
 */
    __pyx_t_1 = (__pyx_f_5spacy_6syntax_6_state_is_space_token(this->B_(0)) != 0);
    if (__pyx_t_1) {

      /* "_state.pxd":326
 *             elif is_space_token(this.B_(0)):
 *                 # the normal case: we're somewhere inside a sentence
 *                 if this.stack_depth() > 0:             # <<<<<<<<<<<<<<
 *                     # assert not is_space_token(this.S_(0))
 *                     # attach all coming space tokens to their last preceding
 */
      __pyx_t_1 = ((this->stack_depth() > 0) != 0);
      if (__pyx_t_1) {

        /* "_state.pxd":330
 *                     # attach all coming space tokens to their last preceding
 *                     # real token (which should be on the top of the stack)
 *                     while is_space_token(this.B_(0)):             # <<<<<<<<<<<<<<
 *                         this.add_arc(this.S(0),this.B(0),0)
 *                         this.push()
 */
        while (1) {
          __pyx_t_1 = (__pyx_f_5spacy_6syntax_6_state_is_space_token(this->B_(0)) != 0);
          if (!__pyx_t_1) break;

          /* "_state.pxd":331
 *                     # real token (which should be on the top of the stack)
 *                     while is_space_token(this.B_(0)):
 *                         this.add_arc(this.S(0),this.B(0),0)             # <<<<<<<<<<<<<<
 *                         this.push()
 *                         this.pop()
 */
          this->add_arc(this->S(0), this->B(0), 0);

          /* "_state.pxd":332
 *                     while is_space_token(this.B_(0)):
 *                         this.add_arc(this.S(0),this.B(0),0)
 *                         this.push()             # <<<<<<<<<<<<<<
 *                         this.pop()
 *                 # the rare case: we're at the beginning of a document:
 */
          this->push();

          /* "_state.pxd":333
 *                         this.add_arc(this.S(0),this.B(0),0)
 *                         this.push()
 *                         this.pop()             # <<<<<<<<<<<<<<
 *                 # the rare case: we're at the beginning of a document:
 *                 # space tokens are attached to the first real token on the buffer
 */
          this->pop();
        }

        /* "_state.pxd":326
 *             elif is_space_token(this.B_(0)):
 *                 # the normal case: we're somewhere inside a sentence
 *                 if this.stack_depth() > 0:             # <<<<<<<<<<<<<<
 *                     # assert not is_space_token(this.S_(0))
 *                     # attach all coming space tokens to their last preceding
 */
        goto __pyx_L11;
      }

      /* "_state.pxd":336
 *                 # the rare case: we're at the beginning of a document:
 *                 # space tokens are attached to the first real token on the buffer
 *                 elif this.stack_depth() == 0:             # <<<<<<<<<<<<<<
 *                     # store all space tokens on the stack until a real token shows up
 *                     # or the last token on the buffer is reached
 */
      __pyx_t_1 = ((this->stack_depth() == 0) != 0);
      if (__pyx_t_1) {

        /* "_state.pxd":339
 *                     # store all space tokens on the stack until a real token shows up
 *                     # or the last token on the buffer is reached
 *                     while is_space_token(this.B_(0)) and this.buffer_length() > 1:             # <<<<<<<<<<<<<<
 *                         this.push()
 *                     # empty the stack by attaching all space tokens to the
 */
        while (1) {
          __pyx_t_2 = (__pyx_f_5spacy_6syntax_6_state_is_space_token(this->B_(0)) != 0);
          if (__pyx_t_2) {
          } else {
            __pyx_t_1 = __pyx_t_2;
            goto __pyx_L16_bool_binop_done;
          }
          __pyx_t_2 = ((this->buffer_length() > 1) != 0);
          __pyx_t_1 = __pyx_t_2;
          __pyx_L16_bool_binop_done:;
          if (!__pyx_t_1) break;

          /* "_state.pxd":340
 *                     # or the last token on the buffer is reached
 *                     while is_space_token(this.B_(0)) and this.buffer_length() > 1:
 *                         this.push()             # <<<<<<<<<<<<<<
 *                     # empty the stack by attaching all space tokens to the
 *                     # first token on the buffer
 */
          this->push();
        }

        /* "_state.pxd":345
 *                     # boundary case: if all tokens are space tokens, the last one
 *                     # becomes the head of all others
 *                     while this.stack_depth() > 0:             # <<<<<<<<<<<<<<
 *                         this.add_arc(this.B(0),this.S(0),0)
 *                         this.pop()
 */
        while (1) {
          __pyx_t_1 = ((this->stack_depth() > 0) != 0);
          if (!__pyx_t_1) break;

          /* "_state.pxd":346
 *                     # becomes the head of all others
 *                     while this.stack_depth() > 0:
 *                         this.add_arc(this.B(0),this.S(0),0)             # <<<<<<<<<<<<<<
 *                         this.pop()
 *                     # move the first token onto the stack
 */
          this->add_arc(this->B(0), this->S(0), 0);

          /* "_state.pxd":347
 *                     while this.stack_depth() > 0:
 *                         this.add_arc(this.B(0),this.S(0),0)
 *                         this.pop()             # <<<<<<<<<<<<<<
 *                     # move the first token onto the stack
 *                     this.push()
 */
          this->pop();
        }

        /* "_state.pxd":349
 *                         this.pop()
 *                     # move the first token onto the stack
 *                     this.push()             # <<<<<<<<<<<<<<
 * 
 *             elif this.stack_depth() == 0:
 */
        this->push();

        /* "_state.pxd":336
 *                 # the rare case: we're at the beginning of a document:
 *                 # space tokens are attached to the first real token on the buffer
 *                 elif this.stack_depth() == 0:             # <<<<<<<<<<<<<<
 *                     # store all space tokens on the stack until a real token shows up
 *                     # or the last token on the buffer is reached
 */
      }
      __pyx_L11:;

      /* "_state.pxd":324
 *                     break
 * 
 *             elif is_space_token(this.B_(0)):             # <<<<<<<<<<<<<<
 *                 # the normal case: we're somewhere inside a sentence
 *                 if this.stack_depth() > 0:
 */
      goto __pyx_L8;
    }

    /* "_state.pxd":351
 *                     this.push()
 * 
 *             elif this.stack_depth() == 0:             # <<<<<<<<<<<<<<
 *                 # for one token sentences (?)
 *                 if this.buffer_length() == 1:
 */
    __pyx_t_1 = ((this->stack_depth() == 0) != 0);
    if (__pyx_t_1) {

      /* "_state.pxd":353
 *             elif this.stack_depth() == 0:
 *                 # for one token sentences (?)
 *                 if this.buffer_length() == 1:             # <<<<<<<<<<<<<<
 *                     this.push()
 *                     this.pop()
 */
      __pyx_t_1 = ((this->buffer_length() == 1) != 0);
      if (__pyx_t_1) {

        /* "_state.pxd":354
 *                 # for one token sentences (?)
 *                 if this.buffer_length() == 1:
 *                     this.push()             # <<<<<<<<<<<<<<
 *                     this.pop()
 *                 # with an empty stack and a non-empty buffer
 */
        this->push();

        /* "_state.pxd":355
 *                 if this.buffer_length() == 1:
 *                     this.push()
 *                     this.pop()             # <<<<<<<<<<<<<<
 *                 # with an empty stack and a non-empty buffer
 *                 # only shift is valid anyway
 */
        this->pop();

        /* "_state.pxd":353
 *             elif this.stack_depth() == 0:
 *                 # for one token sentences (?)
 *                 if this.buffer_length() == 1:             # <<<<<<<<<<<<<<
 *                     this.push()
 *                     this.pop()
 */
        goto __pyx_L20;
      }

      /* "_state.pxd":358
 *                 # with an empty stack and a non-empty buffer
 *                 # only shift is valid anyway
 *                 elif (this.length - this._b_i) >= 1:             # <<<<<<<<<<<<<<
 *                     this.push()
 * 
 */
      __pyx_t_1 = (((this->length - this->_b_i) >= 1) != 0);
      if (__pyx_t_1) {

        /* "_state.pxd":359
 *                 # only shift is valid anyway
 *                 elif (this.length - this._b_i) >= 1:
 *                     this.push()             # <<<<<<<<<<<<<<
 * 
 *             else: # can this even happen?
 */
        this->push();

        /* "_state.pxd":358
 *                 # with an empty stack and a non-empty buffer
 *                 # only shift is valid anyway
 *                 elif (this.length - this._b_i) >= 1:             # <<<<<<<<<<<<<<
 *                     this.push()
 * 
 */
      }
      __pyx_L20:;

      /* "_state.pxd":351
 *                     this.push()
 * 
 *             elif this.stack_depth() == 0:             # <<<<<<<<<<<<<<
 *                 # for one token sentences (?)
 *                 if this.buffer_length() == 1:
 */
      goto __pyx_L8;
    }

    /* "_state.pxd":362
 * 
 *             else: # can this even happen?
 *                 break             # <<<<<<<<<<<<<<
 */
    /*else*/ {
      goto __pyx_L4_break;
    }
    __pyx_L8:;
  }
  __pyx_L4_break:;

  /* "_state.pxd":298
 *         this._break = src._break
 * 
 *     void fast_forward() nogil:             # <<<<<<<<<<<<<<
 *         # space token attachement policy:
 *         # - attach space tokens always to the last preceding real token
 */

  /* function exit code */
}

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":197
 *         # experimental exception made for __getbuffer__ and __releasebuffer__
 *         # -- the details of this may change.
 *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fullfill the PEP.
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_copy_shape;
  int __pyx_v_i;
  int __pyx_v_ndim;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  int __pyx_v_t;
  char *__pyx_v_f;
  PyArray_Descr *__pyx_v_descr = 0;
  int __pyx_v_offset;
  int __pyx_v_hasfields;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  if (__pyx_v_info != NULL) {
    __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_info->obj);
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":203
 *             # of flags
 * 
 *             if info == NULL: return             # <<<<<<<<<<<<<<
 * 
 *             cdef int copy_shape, i, ndim
 */
  __pyx_t_1 = ((__pyx_v_info == NULL) != 0);
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":206
 * 
 *             cdef int copy_shape, i, ndim
 *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 */
  __pyx_v_endian_detector = 1;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":207
 *             cdef int copy_shape, i, ndim
 *             cdef int endian_detector = 1
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 * 
 *             ndim = PyArray_NDIM(self)
 */
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":209
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211
 *             ndim = PyArray_NDIM(self)
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 copy_shape = 1
 *             else:
 */
  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
  if (__pyx_t_1) {

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":212
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 copy_shape = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 copy_shape = 0
 */
    __pyx_v_copy_shape = 1;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211
 *             ndim = PyArray_NDIM(self)
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 copy_shape = 1
 *             else:
 */
    goto __pyx_L4;
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":214
 *                 copy_shape = 1
 *             else:
 *                 copy_shape = 0             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 */
  /*else*/ {
    __pyx_v_copy_shape = 0;
  }
  __pyx_L4:;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
 *                 copy_shape = 0
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L6_bool_binop_done;
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":217
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 */
  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L6_bool_binop_done:;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
 *                 copy_shape = 0
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  if (__pyx_t_1) {

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":216
 *                 copy_shape = 0
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L9_bool_binop_done;
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":221
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 */
  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L9_bool_binop_done:;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  if (__pyx_t_1) {

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":220
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":224
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
 *             info.ndim = ndim
 *             if copy_shape:
 */
  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":225
 * 
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim             # <<<<<<<<<<<<<<
 *             if copy_shape:
 *                 # Allocate new buffer for strides and shape info.
 */
  __pyx_v_info->ndim = __pyx_v_ndim;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim
 *             if copy_shape:             # <<<<<<<<<<<<<<
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 */
  __pyx_t_1 = (__pyx_v_copy_shape != 0);
  if (__pyx_t_1) {

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":229
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)             # <<<<<<<<<<<<<<
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 */
    __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":230
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
 *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 */
    __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":231
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):             # <<<<<<<<<<<<<<
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 */
    __pyx_t_4 = __pyx_v_ndim;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":232
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 */
      (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":233
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 */
      (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
    }

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim
 *             if copy_shape:             # <<<<<<<<<<<<<<
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 */
    goto __pyx_L11;
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":235
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 */
  /*else*/ {
    __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":236
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 */
    __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
  }
  __pyx_L11:;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":237
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 */
  __pyx_v_info->suboffsets = NULL;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":238
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 * 
 */
  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":239
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
 * 
 *             cdef int t
 */
  __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":242
 * 
 *             cdef int t
 *             cdef char* f = NULL             # <<<<<<<<<<<<<<
 *             cdef dtype descr = self.descr
 *             cdef int offset
 */
  __pyx_v_f = NULL;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":243
 *             cdef int t
 *             cdef char* f = NULL
 *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
 *             cdef int offset
 * 
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->descr);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":246
 *             cdef int offset
 * 
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields and not copy_shape:
 */
  __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
 * 
 *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
 *                 # do not call releasebuffer
 *                 info.obj = None
 */
  __pyx_t_2 = ((!(__pyx_v_hasfields != 0)) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L15_bool_binop_done;
  }
  __pyx_t_2 = ((!(__pyx_v_copy_shape != 0)) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L15_bool_binop_done:;
  if (__pyx_t_1) {

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":250
 *             if not hasfields and not copy_shape:
 *                 # do not call releasebuffer
 *                 info.obj = None             # <<<<<<<<<<<<<<
 *             else:
 *                 # need to call releasebuffer
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = Py_None;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
 * 
 *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
 *                 # do not call releasebuffer
 *                 info.obj = None
 */
    goto __pyx_L14;
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":253
 *             else:
 *                 # need to call releasebuffer
 *                 info.obj = self             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields:
 */
  /*else*/ {
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
  }
  __pyx_L14:;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255
 *                 info.obj = self
 * 
 *             if not hasfields:             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 */
  __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0);
  if (__pyx_t_1) {

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":256
 * 
 *             if not hasfields:
 *                 t = descr.type_num             # <<<<<<<<<<<<<<
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 */
    __pyx_t_4 = __pyx_v_descr->type_num;
    __pyx_v_t = __pyx_t_4;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
 *             if not hasfields:
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
    if (!__pyx_t_2) {
      goto __pyx_L20_next_or;
    } else {
    }
    __pyx_t_2 = (__pyx_v_little_endian != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L19_bool_binop_done;
    }
    __pyx_L20_next_or:;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 */
    __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L19_bool_binop_done;
    }
    __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L19_bool_binop_done:;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
 *             if not hasfields:
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    if (__pyx_t_1) {

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257
 *             if not hasfields:
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    }

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":260
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 */
    switch (__pyx_v_t) {
      case NPY_BYTE:
      __pyx_v_f = __pyx_k_b;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":261
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 */
      case NPY_UBYTE:
      __pyx_v_f = __pyx_k_B;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":262
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 */
      case NPY_SHORT:
      __pyx_v_f = __pyx_k_h;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":263
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 */
      case NPY_USHORT:
      __pyx_v_f = __pyx_k_H;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":264
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 */
      case NPY_INT:
      __pyx_v_f = __pyx_k_i;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":265
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 */
      case NPY_UINT:
      __pyx_v_f = __pyx_k_I;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":266
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 */
      case NPY_LONG:
      __pyx_v_f = __pyx_k_l;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":267
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 */
      case NPY_ULONG:
      __pyx_v_f = __pyx_k_L;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":268
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 */
      case NPY_LONGLONG:
      __pyx_v_f = __pyx_k_q;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":269
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 */
      case NPY_ULONGLONG:
      __pyx_v_f = __pyx_k_Q;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 */
      case NPY_FLOAT:
      __pyx_v_f = __pyx_k_f;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":271
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 */
      case NPY_DOUBLE:
      __pyx_v_f = __pyx_k_d;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 */
      case NPY_LONGDOUBLE:
      __pyx_v_f = __pyx_k_g;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":273
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 */
      case NPY_CFLOAT:
      __pyx_v_f = __pyx_k_Zf;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"
 */
      case NPY_CDOUBLE:
      __pyx_v_f = __pyx_k_Zd;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":275
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 */
      case NPY_CLONGDOUBLE:
      __pyx_v_f = __pyx_k_Zg;
      break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
      case NPY_OBJECT:
      __pyx_v_f = __pyx_k_O;
      break;
      default:

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":278
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *                 info.format = f
 *                 return
 */
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      break;
    }

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":279
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f             # <<<<<<<<<<<<<<
 *                 return
 *             else:
 */
    __pyx_v_info->format = __pyx_v_f;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f
 *                 return             # <<<<<<<<<<<<<<
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255
 *                 info.obj = self
 * 
 *             if not hasfields:             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 */
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":282
 *                 return
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0
 */
  /*else*/ {
    __pyx_v_info->format = ((char *)malloc(0xFF));

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":283
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 *                 info.format[0] = c'^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
 *                 offset = 0
 *                 f = _util_dtypestring(descr, info.format + 1,
 */
    (__pyx_v_info->format[0]) = '^';

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":284
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0             # <<<<<<<<<<<<<<
 *                 f = _util_dtypestring(descr, info.format + 1,
 *                                       info.format + _buffer_format_string_len,
 */
    __pyx_v_offset = 0;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":285
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0
 *                 f = _util_dtypestring(descr, info.format + 1,             # <<<<<<<<<<<<<<
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 */
    __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_f = __pyx_t_7;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":288
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 *                 f[0] = c'\0' # Terminate format string             # <<<<<<<<<<<<<<
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 */
    (__pyx_v_f[0]) = '\x00';
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":197
 *         # experimental exception made for __getbuffer__ and __releasebuffer__
 *         # -- the details of this may change.
 *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fullfill the PEP.
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
  }
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
 *                 f[0] = c'\0' # Terminate format string
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 */

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
  if (__pyx_t_1) {

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":292
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)             # <<<<<<<<<<<<<<
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 stdlib.free(info.strides)
 */
    free(__pyx_v_info->format);

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.strides)
 *                 # info.shape was stored after info.strides in the same block
 */
  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
  if (__pyx_t_1) {

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":294
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 stdlib.free(info.strides)             # <<<<<<<<<<<<<<
 *                 # info.shape was stored after info.strides in the same block
 * 
 */
    free(__pyx_v_info->strides);

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.strides)
 *                 # info.shape was stored after info.strides in the same block
 */
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
 *                 f[0] = c'\0' # Terminate format string
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":770
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":773
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":782
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
 *     # Recursive utility function used in __getbuffer__ to get format
 *     # string. The new location in the format string is returned.
 */

static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
  PyArray_Descr *__pyx_v_child = 0;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_childname = NULL;
  PyObject *__pyx_v_new_offset = NULL;
  PyObject *__pyx_v_t = NULL;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  char *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_util_dtypestring", 0);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":790
 * 
 *     cdef dtype child
 *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 *     cdef tuple fields
 */
  __pyx_v_endian_detector = 1;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":791
 *     cdef dtype child
 *     cdef int endian_detector = 1
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 *     cdef tuple fields
 * 
 */
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
  if (unlikely(__pyx_v_descr->names == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":795
 * 
 *     for childname in descr.names:
 *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
 *         child, new_offset = fields
 * 
 */
    if (unlikely(__pyx_v_descr->fields == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":796
 *     for childname in descr.names:
 *         fields = descr.fields[childname]
 *         child, new_offset = fields             # <<<<<<<<<<<<<<
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:
 */
    if (likely(__pyx_v_fields != Py_None)) {
      PyObject* sequence = __pyx_v_fields;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      #endif
    } else {
      __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798
 *         child, new_offset = fields
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
    if (__pyx_t_6) {

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798
 *         child, new_offset = fields
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    }

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
    if (!__pyx_t_7) {
      goto __pyx_L8_next_or;
    } else {
    }
    __pyx_t_7 = (__pyx_v_little_endian != 0);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_L8_next_or:;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":802
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
 *             raise ValueError(u"Non-native byte order not supported")
 *             # One could encode it in the format string and have Cython
 */
    __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
    if (__pyx_t_7) {
    } else {
      __pyx_t_6 = __pyx_t_7;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
    __pyx_t_6 = __pyx_t_7;
    __pyx_L7_bool_binop_done:;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    if (__pyx_t_6) {

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    }

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":813
 * 
 *         # Output padding bytes
 *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 */
    while (1) {
      __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!__pyx_t_6) break;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":814
 *         # Output padding bytes
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
 *             f += 1
 *             offset[0] += 1
 */
      (__pyx_v_f[0]) = 0x78;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":815
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte
 *             f += 1             # <<<<<<<<<<<<<<
 *             offset[0] += 1
 * 
 */
      __pyx_v_f = (__pyx_v_f + 1);

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":816
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 *             offset[0] += 1             # <<<<<<<<<<<<<<
 * 
 *         offset[0] += child.itemsize
 */
      __pyx_t_8 = 0;
      (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
    }

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":818
 *             offset[0] += 1
 * 
 *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not PyDataType_HASFIELDS(child):
 */
    __pyx_t_8 = 0;
    (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
    __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
    if (__pyx_t_6) {

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
 * 
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num             # <<<<<<<<<<<<<<
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")
 */
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
      if (__pyx_t_6) {

        /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":826
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 98;
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 66;
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":828
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x68;
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":829
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 72;
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x69;
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":831
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 73;
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":832
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x6C;
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 76;
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":834
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x71;
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":835
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 81;
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x66;
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x64;
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":838
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 0x67;
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":839
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 0x66;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":840
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 0x64;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":841
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 */
      __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 0x67;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
      __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 79;
        goto __pyx_L15;
      }

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":844
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *             f += 1
 *         else:
 */
      /*else*/ {
        __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L15:;

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":845
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *             f += 1             # <<<<<<<<<<<<<<
 *         else:
 *             # Cython ignores struct boundary information ("T{...}"),
 */
      __pyx_v_f = (__pyx_v_f + 1);

      /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
      goto __pyx_L13;
    }

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":849
 *             # Cython ignores struct boundary information ("T{...}"),
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
 *     return f
 * 
 */
    /*else*/ {
      __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_f = __pyx_t_9;
    }
    __pyx_L13:;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":850
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)
 *     return f             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_f;
  goto __pyx_L0;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
 *     # Recursive utility function used in __getbuffer__ to get format
 *     # string. The new location in the format string is returned.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_child);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_childname);
  __Pyx_XDECREF(__pyx_v_new_offset);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966
 * 
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *      cdef PyObject* baseptr
 *      if base is None:
 */

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
  PyObject *__pyx_v_baseptr;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("set_array_base", 0);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968
 * cdef inline void set_array_base(ndarray arr, object base):
 *      cdef PyObject* baseptr
 *      if base is None:             # <<<<<<<<<<<<<<
 *          baseptr = NULL
 *      else:
 */
  __pyx_t_1 = (__pyx_v_base == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":969
 *      cdef PyObject* baseptr
 *      if base is None:
 *          baseptr = NULL             # <<<<<<<<<<<<<<
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!
 */
    __pyx_v_baseptr = NULL;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968
 * cdef inline void set_array_base(ndarray arr, object base):
 *      cdef PyObject* baseptr
 *      if base is None:             # <<<<<<<<<<<<<<
 *          baseptr = NULL
 *      else:
 */
    goto __pyx_L3;
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":971
 *          baseptr = NULL
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!             # <<<<<<<<<<<<<<
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 */
  /*else*/ {
    Py_INCREF(__pyx_v_base);

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":972
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!
 *          baseptr = <PyObject*>base             # <<<<<<<<<<<<<<
 *      Py_XDECREF(arr.base)
 *      arr.base = baseptr
 */
    __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
  }
  __pyx_L3:;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":973
 *          Py_INCREF(base) # important to do this before decref below!
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)             # <<<<<<<<<<<<<<
 *      arr.base = baseptr
 * 
 */
  Py_XDECREF(__pyx_v_arr->base);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":974
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 *      arr.base = baseptr             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
 */
  __pyx_v_arr->base = __pyx_v_baseptr;

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966
 * 
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *      cdef PyObject* baseptr
 *      if base is None:
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976
 *      arr.base = baseptr
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     if arr.base is NULL:
 *         return None
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base", 0);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
 */
  __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0);
  if (__pyx_t_1) {

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":978
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     else:
 *         return <object>arr.base
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
 */
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":980
 *         return None
 *     else:
 *         return <object>arr.base             # <<<<<<<<<<<<<<
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
    __pyx_r = ((PyObject *)__pyx_v_arr->base);
    goto __pyx_L0;
  }

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976
 *      arr.base = baseptr
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     if arr.base is NULL:
 *         return None
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "linalg.pxd":63
 * cdef class Vec:
 *     @staticmethod
 *     cdef inline int arg_max(const weight_t* scores, const int n_classes) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         cdef int best = 0
 */

static CYTHON_INLINE int __pyx_f_5thinc_6linalg_3Vec_arg_max(__pyx_t_5thinc_6linalg_weight_t const *__pyx_v_scores, int const __pyx_v_n_classes) {
  int __pyx_v_i;
  int __pyx_v_best;
  __pyx_t_5thinc_6linalg_weight_t __pyx_v_mode;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "linalg.pxd":65
 *     cdef inline int arg_max(const weight_t* scores, const int n_classes) nogil:
 *         cdef int i
 *         cdef int best = 0             # <<<<<<<<<<<<<<
 *         cdef weight_t mode = scores[0]
 *         for i in range(1, n_classes):
 */
  __pyx_v_best = 0;

  /* "linalg.pxd":66
 *         cdef int i
 *         cdef int best = 0
 *         cdef weight_t mode = scores[0]             # <<<<<<<<<<<<<<
 *         for i in range(1, n_classes):
 *             if scores[i] > mode:
 */
  __pyx_v_mode = (__pyx_v_scores[0]);

  /* "linalg.pxd":67
 *         cdef int best = 0
 *         cdef weight_t mode = scores[0]
 *         for i in range(1, n_classes):             # <<<<<<<<<<<<<<
 *             if scores[i] > mode:
 *                 mode = scores[i]
 */
  __pyx_t_1 = __pyx_v_n_classes;
  for (__pyx_t_2 = 1; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":68
 *         cdef weight_t mode = scores[0]
 *         for i in range(1, n_classes):
 *             if scores[i] > mode:             # <<<<<<<<<<<<<<
 *                 mode = scores[i]
 *                 best = i
 */
    __pyx_t_3 = (((__pyx_v_scores[__pyx_v_i]) > __pyx_v_mode) != 0);
    if (__pyx_t_3) {

      /* "linalg.pxd":69
 *         for i in range(1, n_classes):
 *             if scores[i] > mode:
 *                 mode = scores[i]             # <<<<<<<<<<<<<<
 *                 best = i
 *         return best
 */
      __pyx_v_mode = (__pyx_v_scores[__pyx_v_i]);

      /* "linalg.pxd":70
 *             if scores[i] > mode:
 *                 mode = scores[i]
 *                 best = i             # <<<<<<<<<<<<<<
 *         return best
 * 
 */
      __pyx_v_best = __pyx_v_i;

      /* "linalg.pxd":68
 *         cdef weight_t mode = scores[0]
 *         for i in range(1, n_classes):
 *             if scores[i] > mode:             # <<<<<<<<<<<<<<
 *                 mode = scores[i]
 *                 best = i
 */
    }
  }

  /* "linalg.pxd":71
 *                 mode = scores[i]
 *                 best = i
 *         return best             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_r = __pyx_v_best;
  goto __pyx_L0;

  /* "linalg.pxd":63
 * cdef class Vec:
 *     @staticmethod
 *     cdef inline int arg_max(const weight_t* scores, const int n_classes) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         cdef int best = 0
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "linalg.pxd":74
 * 
 *     @staticmethod
 *     cdef inline weight_t max(const weight_t* x, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         if nr == 0:
 *             return 0
 */

static CYTHON_INLINE __pyx_t_5thinc_6linalg_weight_t __pyx_f_5thinc_6linalg_3Vec_max(__pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, int32_t __pyx_v_nr) {
  int __pyx_v_i;
  __pyx_t_5thinc_6linalg_weight_t __pyx_v_mode;
  __pyx_t_5thinc_6linalg_weight_t __pyx_r;
  int __pyx_t_1;
  int32_t __pyx_t_2;
  int __pyx_t_3;

  /* "linalg.pxd":75
 *     @staticmethod
 *     cdef inline weight_t max(const weight_t* x, int32_t nr) nogil:
 *         if nr == 0:             # <<<<<<<<<<<<<<
 *             return 0
 *         cdef int i
 */
  __pyx_t_1 = ((__pyx_v_nr == 0) != 0);
  if (__pyx_t_1) {

    /* "linalg.pxd":76
 *     cdef inline weight_t max(const weight_t* x, int32_t nr) nogil:
 *         if nr == 0:
 *             return 0             # <<<<<<<<<<<<<<
 *         cdef int i
 *         cdef weight_t mode = x[0]
 */
    __pyx_r = 0.0;
    goto __pyx_L0;

    /* "linalg.pxd":75
 *     @staticmethod
 *     cdef inline weight_t max(const weight_t* x, int32_t nr) nogil:
 *         if nr == 0:             # <<<<<<<<<<<<<<
 *             return 0
 *         cdef int i
 */
  }

  /* "linalg.pxd":78
 *             return 0
 *         cdef int i
 *         cdef weight_t mode = x[0]             # <<<<<<<<<<<<<<
 *         for i in range(1, nr):
 *             if x[i] > mode:
 */
  __pyx_v_mode = (__pyx_v_x[0]);

  /* "linalg.pxd":79
 *         cdef int i
 *         cdef weight_t mode = x[0]
 *         for i in range(1, nr):             # <<<<<<<<<<<<<<
 *             if x[i] > mode:
 *                 mode = x[i]
 */
  __pyx_t_2 = __pyx_v_nr;
  for (__pyx_t_3 = 1; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "linalg.pxd":80
 *         cdef weight_t mode = x[0]
 *         for i in range(1, nr):
 *             if x[i] > mode:             # <<<<<<<<<<<<<<
 *                 mode = x[i]
 *         return mode
 */
    __pyx_t_1 = (((__pyx_v_x[__pyx_v_i]) > __pyx_v_mode) != 0);
    if (__pyx_t_1) {

      /* "linalg.pxd":81
 *         for i in range(1, nr):
 *             if x[i] > mode:
 *                 mode = x[i]             # <<<<<<<<<<<<<<
 *         return mode
 * 
 */
      __pyx_v_mode = (__pyx_v_x[__pyx_v_i]);

      /* "linalg.pxd":80
 *         cdef weight_t mode = x[0]
 *         for i in range(1, nr):
 *             if x[i] > mode:             # <<<<<<<<<<<<<<
 *                 mode = x[i]
 *         return mode
 */
    }
  }

  /* "linalg.pxd":82
 *             if x[i] > mode:
 *                 mode = x[i]
 *         return mode             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_r = __pyx_v_mode;
  goto __pyx_L0;

  /* "linalg.pxd":74
 * 
 *     @staticmethod
 *     cdef inline weight_t max(const weight_t* x, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         if nr == 0:
 *             return 0
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "linalg.pxd":85
 * 
 *     @staticmethod
 *     cdef inline weight_t sum(const weight_t* vec, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         cdef weight_t total = 0
 */

static CYTHON_INLINE __pyx_t_5thinc_6linalg_weight_t __pyx_f_5thinc_6linalg_3Vec_sum(__pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, int32_t __pyx_v_nr) {
  int __pyx_v_i;
  __pyx_t_5thinc_6linalg_weight_t __pyx_v_total;
  __pyx_t_5thinc_6linalg_weight_t __pyx_r;
  int32_t __pyx_t_1;
  int __pyx_t_2;

  /* "linalg.pxd":87
 *     cdef inline weight_t sum(const weight_t* vec, int32_t nr) nogil:
 *         cdef int i
 *         cdef weight_t total = 0             # <<<<<<<<<<<<<<
 *         for i in range(nr):
 *             total += vec[i]
 */
  __pyx_v_total = 0.0;

  /* "linalg.pxd":88
 *         cdef int i
 *         cdef weight_t total = 0
 *         for i in range(nr):             # <<<<<<<<<<<<<<
 *             total += vec[i]
 *         return total
 */
  __pyx_t_1 = __pyx_v_nr;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":89
 *         cdef weight_t total = 0
 *         for i in range(nr):
 *             total += vec[i]             # <<<<<<<<<<<<<<
 *         return total
 * 
 */
    __pyx_v_total = (__pyx_v_total + (__pyx_v_vec[__pyx_v_i]));
  }

  /* "linalg.pxd":90
 *         for i in range(nr):
 *             total += vec[i]
 *         return total             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_r = __pyx_v_total;
  goto __pyx_L0;

  /* "linalg.pxd":85
 * 
 *     @staticmethod
 *     cdef inline weight_t sum(const weight_t* vec, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         cdef weight_t total = 0
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "linalg.pxd":93
 * 
 *     @staticmethod
 *     cdef inline void add(weight_t* output, const weight_t* x,             # <<<<<<<<<<<<<<
 *             weight_t inc, int32_t nr) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr)
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_add(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t __pyx_v_inc, int32_t __pyx_v_nr) {

  /* "linalg.pxd":95
 *     cdef inline void add(weight_t* output, const weight_t* x,
 *             weight_t inc, int32_t nr) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr)             # <<<<<<<<<<<<<<
 *         Vec.add_i(output, inc, nr)
 * 
 */
  memcpy(__pyx_v_output, __pyx_v_x, ((sizeof((__pyx_v_output[0]))) * __pyx_v_nr));

  /* "linalg.pxd":96
 *             weight_t inc, int32_t nr) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr)
 *         Vec.add_i(output, inc, nr)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_f_5thinc_6linalg_3Vec_add_i(__pyx_v_output, __pyx_v_inc, __pyx_v_nr);

  /* "linalg.pxd":93
 * 
 *     @staticmethod
 *     cdef inline void add(weight_t* output, const weight_t* x,             # <<<<<<<<<<<<<<
 *             weight_t inc, int32_t nr) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr)
 */

  /* function exit code */
}

/* "linalg.pxd":99
 * 
 *     @staticmethod
 *     cdef inline void add_i(weight_t* vec, weight_t inc, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         for i in range(nr):
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_add_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_vec, __pyx_t_5thinc_6linalg_weight_t __pyx_v_inc, int32_t __pyx_v_nr) {
  int __pyx_v_i;
  int32_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "linalg.pxd":101
 *     cdef inline void add_i(weight_t* vec, weight_t inc, int32_t nr) nogil:
 *         cdef int i
 *         for i in range(nr):             # <<<<<<<<<<<<<<
 *             vec[i] += inc
 * 
 */
  __pyx_t_1 = __pyx_v_nr;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":102
 *         cdef int i
 *         for i in range(nr):
 *             vec[i] += inc             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
    __pyx_t_3 = __pyx_v_i;
    (__pyx_v_vec[__pyx_t_3]) = ((__pyx_v_vec[__pyx_t_3]) + __pyx_v_inc);
  }

  /* "linalg.pxd":99
 * 
 *     @staticmethod
 *     cdef inline void add_i(weight_t* vec, weight_t inc, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         for i in range(nr):
 */

  /* function exit code */
}

/* "linalg.pxd":105
 * 
 *     @staticmethod
 *     cdef inline void mul(weight_t* output, const weight_t* vec, weight_t scal,             # <<<<<<<<<<<<<<
 *             int32_t nr) nogil:
 *         memcpy(output, vec, sizeof(output[0]) * nr)
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_mul(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, __pyx_t_5thinc_6linalg_weight_t __pyx_v_scal, int32_t __pyx_v_nr) {

  /* "linalg.pxd":107
 *     cdef inline void mul(weight_t* output, const weight_t* vec, weight_t scal,
 *             int32_t nr) nogil:
 *         memcpy(output, vec, sizeof(output[0]) * nr)             # <<<<<<<<<<<<<<
 *         Vec.mul_i(output, scal, nr)
 * 
 */
  memcpy(__pyx_v_output, __pyx_v_vec, ((sizeof((__pyx_v_output[0]))) * __pyx_v_nr));

  /* "linalg.pxd":108
 *             int32_t nr) nogil:
 *         memcpy(output, vec, sizeof(output[0]) * nr)
 *         Vec.mul_i(output, scal, nr)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_f_5thinc_6linalg_3Vec_mul_i(__pyx_v_output, __pyx_v_scal, __pyx_v_nr);

  /* "linalg.pxd":105
 * 
 *     @staticmethod
 *     cdef inline void mul(weight_t* output, const weight_t* vec, weight_t scal,             # <<<<<<<<<<<<<<
 *             int32_t nr) nogil:
 *         memcpy(output, vec, sizeof(output[0]) * nr)
 */

  /* function exit code */
}

/* "linalg.pxd":111
 * 
 *     @staticmethod
 *     cdef inline void mul_i(weight_t* vec, const weight_t scal, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         if USE_BLAS:
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_mul_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_vec, __pyx_t_5thinc_6linalg_weight_t const __pyx_v_scal, int32_t __pyx_v_nr) {
  int __pyx_v_i;
  int32_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "linalg.pxd":116
 *             cblas_sscal(nr, scal, vec, 1)
 *         else:
 *             for i in range(nr):             # <<<<<<<<<<<<<<
 *                 vec[i] *= scal
 * 
 */
  __pyx_t_1 = __pyx_v_nr;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":117
 *         else:
 *             for i in range(nr):
 *                 vec[i] *= scal             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
    __pyx_t_3 = __pyx_v_i;
    (__pyx_v_vec[__pyx_t_3]) = ((__pyx_v_vec[__pyx_t_3]) * __pyx_v_scal);
  }

  /* "linalg.pxd":111
 * 
 *     @staticmethod
 *     cdef inline void mul_i(weight_t* vec, const weight_t scal, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         if USE_BLAS:
 */

  /* function exit code */
}

/* "linalg.pxd":120
 * 
 *     @staticmethod
 *     cdef inline void pow(weight_t* output, const weight_t* vec, weight_t scal,             # <<<<<<<<<<<<<<
 *             int32_t nr) nogil:
 *         memcpy(output, vec, sizeof(output[0]) * nr)
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_pow(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, __pyx_t_5thinc_6linalg_weight_t __pyx_v_scal, int32_t __pyx_v_nr) {

  /* "linalg.pxd":122
 *     cdef inline void pow(weight_t* output, const weight_t* vec, weight_t scal,
 *             int32_t nr) nogil:
 *         memcpy(output, vec, sizeof(output[0]) * nr)             # <<<<<<<<<<<<<<
 *         Vec.pow_i(output, scal, nr)
 * 
 */
  memcpy(__pyx_v_output, __pyx_v_vec, ((sizeof((__pyx_v_output[0]))) * __pyx_v_nr));

  /* "linalg.pxd":123
 *             int32_t nr) nogil:
 *         memcpy(output, vec, sizeof(output[0]) * nr)
 *         Vec.pow_i(output, scal, nr)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_f_5thinc_6linalg_3Vec_pow_i(__pyx_v_output, __pyx_v_scal, __pyx_v_nr);

  /* "linalg.pxd":120
 * 
 *     @staticmethod
 *     cdef inline void pow(weight_t* output, const weight_t* vec, weight_t scal,             # <<<<<<<<<<<<<<
 *             int32_t nr) nogil:
 *         memcpy(output, vec, sizeof(output[0]) * nr)
 */

  /* function exit code */
}

/* "linalg.pxd":126
 * 
 *     @staticmethod
 *     cdef inline void pow_i(weight_t* vec, const weight_t scal, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         for i in range(nr):
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_pow_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_vec, __pyx_t_5thinc_6linalg_weight_t const __pyx_v_scal, int32_t __pyx_v_nr) {
  int __pyx_v_i;
  int32_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "linalg.pxd":128
 *     cdef inline void pow_i(weight_t* vec, const weight_t scal, int32_t nr) nogil:
 *         cdef int i
 *         for i in range(nr):             # <<<<<<<<<<<<<<
 *             vec[i] **= scal
 * 
 */
  __pyx_t_1 = __pyx_v_nr;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":129
 *         cdef int i
 *         for i in range(nr):
 *             vec[i] **= scal             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
    __pyx_t_3 = __pyx_v_i;
    (__pyx_v_vec[__pyx_t_3]) = powf(((__pyx_t_5thinc_6linalg_weight_t const )(__pyx_v_vec[__pyx_t_3])), __pyx_v_scal);
  }

  /* "linalg.pxd":126
 * 
 *     @staticmethod
 *     cdef inline void pow_i(weight_t* vec, const weight_t scal, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         for i in range(nr):
 */

  /* function exit code */
}

/* "linalg.pxd":133
 *     @staticmethod
 *     @cython.cdivision(True)
 *     cdef inline void div(weight_t* output, const weight_t* vec, weight_t scal,             # <<<<<<<<<<<<<<
 *             int32_t nr) nogil:
 *         memcpy(output, vec, sizeof(output[0]) * nr)
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_div(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, __pyx_t_5thinc_6linalg_weight_t __pyx_v_scal, int32_t __pyx_v_nr) {

  /* "linalg.pxd":135
 *     cdef inline void div(weight_t* output, const weight_t* vec, weight_t scal,
 *             int32_t nr) nogil:
 *         memcpy(output, vec, sizeof(output[0]) * nr)             # <<<<<<<<<<<<<<
 *         Vec.div_i(output, scal, nr)
 * 
 */
  memcpy(__pyx_v_output, __pyx_v_vec, ((sizeof((__pyx_v_output[0]))) * __pyx_v_nr));

  /* "linalg.pxd":136
 *             int32_t nr) nogil:
 *         memcpy(output, vec, sizeof(output[0]) * nr)
 *         Vec.div_i(output, scal, nr)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_f_5thinc_6linalg_3Vec_div_i(__pyx_v_output, __pyx_v_scal, __pyx_v_nr);

  /* "linalg.pxd":133
 *     @staticmethod
 *     @cython.cdivision(True)
 *     cdef inline void div(weight_t* output, const weight_t* vec, weight_t scal,             # <<<<<<<<<<<<<<
 *             int32_t nr) nogil:
 *         memcpy(output, vec, sizeof(output[0]) * nr)
 */

  /* function exit code */
}

/* "linalg.pxd":140
 *     @staticmethod
 *     @cython.cdivision(True)
 *     cdef inline void div_i(weight_t* vec, const weight_t scal, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         for i in range(nr):
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_div_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_vec, __pyx_t_5thinc_6linalg_weight_t const __pyx_v_scal, int32_t __pyx_v_nr) {
  int __pyx_v_i;
  int32_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "linalg.pxd":142
 *     cdef inline void div_i(weight_t* vec, const weight_t scal, int32_t nr) nogil:
 *         cdef int i
 *         for i in range(nr):             # <<<<<<<<<<<<<<
 *             vec[i] /= scal
 * 
 */
  __pyx_t_1 = __pyx_v_nr;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":143
 *         cdef int i
 *         for i in range(nr):
 *             vec[i] /= scal             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
    __pyx_t_3 = __pyx_v_i;
    (__pyx_v_vec[__pyx_t_3]) = ((__pyx_v_vec[__pyx_t_3]) / __pyx_v_scal);
  }

  /* "linalg.pxd":140
 *     @staticmethod
 *     @cython.cdivision(True)
 *     cdef inline void div_i(weight_t* vec, const weight_t scal, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         for i in range(nr):
 */

  /* function exit code */
}

/* "linalg.pxd":146
 * 
 *     @staticmethod
 *     cdef inline void exp(weight_t* output, const weight_t* vec, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         memcpy(output, vec, sizeof(output[0]) * nr)
 *         Vec.exp_i(output, nr)
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_exp(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, int32_t __pyx_v_nr) {

  /* "linalg.pxd":147
 *     @staticmethod
 *     cdef inline void exp(weight_t* output, const weight_t* vec, int32_t nr) nogil:
 *         memcpy(output, vec, sizeof(output[0]) * nr)             # <<<<<<<<<<<<<<
 *         Vec.exp_i(output, nr)
 * 
 */
  memcpy(__pyx_v_output, __pyx_v_vec, ((sizeof((__pyx_v_output[0]))) * __pyx_v_nr));

  /* "linalg.pxd":148
 *     cdef inline void exp(weight_t* output, const weight_t* vec, int32_t nr) nogil:
 *         memcpy(output, vec, sizeof(output[0]) * nr)
 *         Vec.exp_i(output, nr)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_f_5thinc_6linalg_3Vec_exp_i(__pyx_v_output, __pyx_v_nr);

  /* "linalg.pxd":146
 * 
 *     @staticmethod
 *     cdef inline void exp(weight_t* output, const weight_t* vec, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         memcpy(output, vec, sizeof(output[0]) * nr)
 *         Vec.exp_i(output, nr)
 */

  /* function exit code */
}

/* "linalg.pxd":151
 * 
 *     @staticmethod
 *     cdef inline void exp_i(weight_t* vec, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         for i in range(nr):
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_exp_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_vec, int32_t __pyx_v_nr) {
  int __pyx_v_i;
  int32_t __pyx_t_1;
  int __pyx_t_2;

  /* "linalg.pxd":153
 *     cdef inline void exp_i(weight_t* vec, int32_t nr) nogil:
 *         cdef int i
 *         for i in range(nr):             # <<<<<<<<<<<<<<
 *             vec[i] = expf(vec[i])
 * 
 */
  __pyx_t_1 = __pyx_v_nr;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":154
 *         cdef int i
 *         for i in range(nr):
 *             vec[i] = expf(vec[i])             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
    (__pyx_v_vec[__pyx_v_i]) = expf((__pyx_v_vec[__pyx_v_i]));
  }

  /* "linalg.pxd":151
 * 
 *     @staticmethod
 *     cdef inline void exp_i(weight_t* vec, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         for i in range(nr):
 */

  /* function exit code */
}

/* "linalg.pxd":157
 * 
 *     @staticmethod
 *     cdef inline void reciprocal_i(weight_t* vec, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         for i in range(nr):
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_3Vec_reciprocal_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_vec, int32_t __pyx_v_nr) {
  int __pyx_v_i;
  int32_t __pyx_t_1;
  int __pyx_t_2;

  /* "linalg.pxd":159
 *     cdef inline void reciprocal_i(weight_t* vec, int32_t nr) nogil:
 *         cdef int i
 *         for i in range(nr):             # <<<<<<<<<<<<<<
 *             vec[i] = 1.0 / vec[i]
 * 
 */
  __pyx_t_1 = __pyx_v_nr;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":160
 *         cdef int i
 *         for i in range(nr):
 *             vec[i] = 1.0 / vec[i]             # <<<<<<<<<<<<<<
 * 
 * 
 */
    (__pyx_v_vec[__pyx_v_i]) = (1.0 / (__pyx_v_vec[__pyx_v_i]));
  }

  /* "linalg.pxd":157
 * 
 *     @staticmethod
 *     cdef inline void reciprocal_i(weight_t* vec, int32_t nr) nogil:             # <<<<<<<<<<<<<<
 *         cdef int i
 *         for i in range(nr):
 */

  /* function exit code */
}

/* "linalg.pxd":165
 * cdef class VecVec:
 *     @staticmethod
 *     cdef inline void add(weight_t* output,             # <<<<<<<<<<<<<<
 *                          const weight_t* x,
 *                          const weight_t* y,
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_add(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, __pyx_t_5thinc_6linalg_weight_t __pyx_v_scale, int32_t __pyx_v_nr) {

  /* "linalg.pxd":170
 *                          weight_t scale,
 *                          int32_t nr) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr)             # <<<<<<<<<<<<<<
 *         VecVec.add_i(output, y, scale, nr)
 * 
 */
  memcpy(__pyx_v_output, __pyx_v_x, ((sizeof((__pyx_v_output[0]))) * __pyx_v_nr));

  /* "linalg.pxd":171
 *                          int32_t nr) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr)
 *         VecVec.add_i(output, y, scale, nr)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_f_5thinc_6linalg_6VecVec_add_i(__pyx_v_output, __pyx_v_y, __pyx_v_scale, __pyx_v_nr);

  /* "linalg.pxd":165
 * cdef class VecVec:
 *     @staticmethod
 *     cdef inline void add(weight_t* output,             # <<<<<<<<<<<<<<
 *                          const weight_t* x,
 *                          const weight_t* y,
 */

  /* function exit code */
}

/* "linalg.pxd":174
 * 
 *     @staticmethod
 *     cdef inline void add_i(float* x,             # <<<<<<<<<<<<<<
 *                            const float* y,
 *                            float scale,
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_add_i(float *__pyx_v_x, float const *__pyx_v_y, float __pyx_v_scale, int32_t __pyx_v_nr) {
  int __pyx_v_i;
  int32_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "linalg.pxd":182
 *             cblas_saxpy(nr, scale, y, 1, x, 1)
 *         else:
 *             for i in range(nr):             # <<<<<<<<<<<<<<
 *                 x[i] += y[i] * scale
 * 
 */
  __pyx_t_1 = __pyx_v_nr;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":183
 *         else:
 *             for i in range(nr):
 *                 x[i] += y[i] * scale             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
    __pyx_t_3 = __pyx_v_i;
    (__pyx_v_x[__pyx_t_3]) = ((__pyx_v_x[__pyx_t_3]) + ((__pyx_v_y[__pyx_v_i]) * __pyx_v_scale));
  }

  /* "linalg.pxd":174
 * 
 *     @staticmethod
 *     cdef inline void add_i(float* x,             # <<<<<<<<<<<<<<
 *                            const float* y,
 *                            float scale,
 */

  /* function exit code */
}

/* "linalg.pxd":186
 * 
 *     @staticmethod
 *     cdef inline void add_pow(weight_t* output,             # <<<<<<<<<<<<<<
 *             const weight_t* x, const weight_t* y, weight_t power, int32_t nr) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr)
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_add_pow(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, __pyx_t_5thinc_6linalg_weight_t __pyx_v_power, int32_t __pyx_v_nr) {

  /* "linalg.pxd":188
 *     cdef inline void add_pow(weight_t* output,
 *             const weight_t* x, const weight_t* y, weight_t power, int32_t nr) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr)             # <<<<<<<<<<<<<<
 *         VecVec.add_pow_i(output, y, power, nr)
 * 
 */
  memcpy(__pyx_v_output, __pyx_v_x, ((sizeof((__pyx_v_output[0]))) * __pyx_v_nr));

  /* "linalg.pxd":189
 *             const weight_t* x, const weight_t* y, weight_t power, int32_t nr) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr)
 *         VecVec.add_pow_i(output, y, power, nr)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_f_5thinc_6linalg_6VecVec_add_pow_i(__pyx_v_output, __pyx_v_y, __pyx_v_power, __pyx_v_nr);

  /* "linalg.pxd":186
 * 
 *     @staticmethod
 *     cdef inline void add_pow(weight_t* output,             # <<<<<<<<<<<<<<
 *             const weight_t* x, const weight_t* y, weight_t power, int32_t nr) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr)
 */

  /* function exit code */
}

/* "linalg.pxd":193
 * 
 *     @staticmethod
 *     cdef inline void add_pow_i(weight_t* x,             # <<<<<<<<<<<<<<
 *             const weight_t* y, weight_t power, int32_t nr) nogil:
 *         cdef int i
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_add_pow_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, __pyx_t_5thinc_6linalg_weight_t __pyx_v_power, int32_t __pyx_v_nr) {
  int __pyx_v_i;
  int32_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "linalg.pxd":196
 *             const weight_t* y, weight_t power, int32_t nr) nogil:
 *         cdef int i
 *         for i in range(nr):             # <<<<<<<<<<<<<<
 *             x[i] += y[i] ** power
 * 
 */
  __pyx_t_1 = __pyx_v_nr;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":197
 *         cdef int i
 *         for i in range(nr):
 *             x[i] += y[i] ** power             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
    __pyx_t_3 = __pyx_v_i;
    (__pyx_v_x[__pyx_t_3]) = ((__pyx_v_x[__pyx_t_3]) + powf(((__pyx_t_5thinc_6linalg_weight_t)(__pyx_v_y[__pyx_v_i])), __pyx_v_power));
  }

  /* "linalg.pxd":193
 * 
 *     @staticmethod
 *     cdef inline void add_pow_i(weight_t* x,             # <<<<<<<<<<<<<<
 *             const weight_t* y, weight_t power, int32_t nr) nogil:
 *         cdef int i
 */

  /* function exit code */
}

/* "linalg.pxd":200
 * 
 *     @staticmethod
 *     cdef inline void mul(weight_t* output,             # <<<<<<<<<<<<<<
 *             const weight_t* x, const weight_t* y, int32_t nr) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr)
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_mul(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr) {

  /* "linalg.pxd":202
 *     cdef inline void mul(weight_t* output,
 *             const weight_t* x, const weight_t* y, int32_t nr) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr)             # <<<<<<<<<<<<<<
 *         VecVec.mul_i(output, y, nr)
 * 
 */
  memcpy(__pyx_v_output, __pyx_v_x, ((sizeof((__pyx_v_output[0]))) * __pyx_v_nr));

  /* "linalg.pxd":203
 *             const weight_t* x, const weight_t* y, int32_t nr) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr)
 *         VecVec.mul_i(output, y, nr)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_f_5thinc_6linalg_6VecVec_mul_i(__pyx_v_output, __pyx_v_y, __pyx_v_nr);

  /* "linalg.pxd":200
 * 
 *     @staticmethod
 *     cdef inline void mul(weight_t* output,             # <<<<<<<<<<<<<<
 *             const weight_t* x, const weight_t* y, int32_t nr) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr)
 */

  /* function exit code */
}

/* "linalg.pxd":206
 * 
 *     @staticmethod
 *     cdef inline void mul_i(weight_t* x,             # <<<<<<<<<<<<<<
 *             const weight_t* y, int32_t nr) nogil:
 *         cdef int i
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6VecVec_mul_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr) {
  int __pyx_v_i;
  int32_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;

  /* "linalg.pxd":209
 *             const weight_t* y, int32_t nr) nogil:
 *         cdef int i
 *         for i in range(nr):             # <<<<<<<<<<<<<<
 *             x[i] *= y[i]
 * 
 */
  __pyx_t_1 = __pyx_v_nr;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":210
 *         cdef int i
 *         for i in range(nr):
 *             x[i] *= y[i]             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __pyx_v_i;
    (__pyx_v_x[__pyx_t_3]) = ((__pyx_v_x[__pyx_t_3]) * (__pyx_v_y[__pyx_v_i]));
  }

  /* "linalg.pxd":206
 * 
 *     @staticmethod
 *     cdef inline void mul_i(weight_t* x,             # <<<<<<<<<<<<<<
 *             const weight_t* y, int32_t nr) nogil:
 *         cdef int i
 */

  /* function exit code */
}

/* "linalg.pxd":214
 * 
 *     @staticmethod
 *     cdef inline weight_t dot(             # <<<<<<<<<<<<<<
 *             const weight_t* x, const weight_t* y, int32_t nr) nogil:
 *         cdef int i
 */

static CYTHON_INLINE __pyx_t_5thinc_6linalg_weight_t __pyx_f_5thinc_6linalg_6VecVec_dot(__pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr) {
  int __pyx_v_i;
  __pyx_t_5thinc_6linalg_weight_t __pyx_v_total;
  __pyx_t_5thinc_6linalg_weight_t __pyx_r;
  int32_t __pyx_t_1;
  int __pyx_t_2;

  /* "linalg.pxd":217
 *             const weight_t* x, const weight_t* y, int32_t nr) nogil:
 *         cdef int i
 *         cdef weight_t total = 0             # <<<<<<<<<<<<<<
 *         for i in range(nr):
 *             total += x[i] * y[i]
 */
  __pyx_v_total = 0.0;

  /* "linalg.pxd":218
 *         cdef int i
 *         cdef weight_t total = 0
 *         for i in range(nr):             # <<<<<<<<<<<<<<
 *             total += x[i] * y[i]
 *         return total
 */
  __pyx_t_1 = __pyx_v_nr;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":219
 *         cdef weight_t total = 0
 *         for i in range(nr):
 *             total += x[i] * y[i]             # <<<<<<<<<<<<<<
 *         return total
 * 
 */
    __pyx_v_total = (__pyx_v_total + ((__pyx_v_x[__pyx_v_i]) * (__pyx_v_y[__pyx_v_i])));
  }

  /* "linalg.pxd":220
 *         for i in range(nr):
 *             total += x[i] * y[i]
 *         return total             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_r = __pyx_v_total;
  goto __pyx_L0;

  /* "linalg.pxd":214
 * 
 *     @staticmethod
 *     cdef inline weight_t dot(             # <<<<<<<<<<<<<<
 *             const weight_t* x, const weight_t* y, int32_t nr) nogil:
 *         cdef int i
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "linalg.pxd":223
 * 
 *     @staticmethod
 *     cdef inline int arg_max_if_true(             # <<<<<<<<<<<<<<
 *             const weight_t* scores, const int* is_valid, const int n_classes) nogil:
 *         cdef int i
 */

static CYTHON_INLINE int __pyx_f_5thinc_6linalg_6VecVec_arg_max_if_true(__pyx_t_5thinc_6linalg_weight_t const *__pyx_v_scores, int const *__pyx_v_is_valid, int const __pyx_v_n_classes) {
  int __pyx_v_i;
  int __pyx_v_best;
  __pyx_t_5thinc_6linalg_weight_t __pyx_v_mode;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "linalg.pxd":226
 *             const weight_t* scores, const int* is_valid, const int n_classes) nogil:
 *         cdef int i
 *         cdef int best = 0             # <<<<<<<<<<<<<<
 *         cdef weight_t mode = -900000
 *         for i in range(n_classes):
 */
  __pyx_v_best = 0;

  /* "linalg.pxd":227
 *         cdef int i
 *         cdef int best = 0
 *         cdef weight_t mode = -900000             # <<<<<<<<<<<<<<
 *         for i in range(n_classes):
 *             if is_valid[i] and scores[i] > mode:
 */
  __pyx_v_mode = -900000.0;

  /* "linalg.pxd":228
 *         cdef int best = 0
 *         cdef weight_t mode = -900000
 *         for i in range(n_classes):             # <<<<<<<<<<<<<<
 *             if is_valid[i] and scores[i] > mode:
 *                 mode = scores[i]
 */
  __pyx_t_1 = __pyx_v_n_classes;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":229
 *         cdef weight_t mode = -900000
 *         for i in range(n_classes):
 *             if is_valid[i] and scores[i] > mode:             # <<<<<<<<<<<<<<
 *                 mode = scores[i]
 *                 best = i
 */
    __pyx_t_4 = ((__pyx_v_is_valid[__pyx_v_i]) != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_3 = __pyx_t_4;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_4 = (((__pyx_v_scores[__pyx_v_i]) > __pyx_v_mode) != 0);
    __pyx_t_3 = __pyx_t_4;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_3) {

      /* "linalg.pxd":230
 *         for i in range(n_classes):
 *             if is_valid[i] and scores[i] > mode:
 *                 mode = scores[i]             # <<<<<<<<<<<<<<
 *                 best = i
 *         return best
 */
      __pyx_v_mode = (__pyx_v_scores[__pyx_v_i]);

      /* "linalg.pxd":231
 *             if is_valid[i] and scores[i] > mode:
 *                 mode = scores[i]
 *                 best = i             # <<<<<<<<<<<<<<
 *         return best
 * 
 */
      __pyx_v_best = __pyx_v_i;

      /* "linalg.pxd":229
 *         cdef weight_t mode = -900000
 *         for i in range(n_classes):
 *             if is_valid[i] and scores[i] > mode:             # <<<<<<<<<<<<<<
 *                 mode = scores[i]
 *                 best = i
 */
    }
  }

  /* "linalg.pxd":232
 *                 mode = scores[i]
 *                 best = i
 *         return best             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_r = __pyx_v_best;
  goto __pyx_L0;

  /* "linalg.pxd":223
 * 
 *     @staticmethod
 *     cdef inline int arg_max_if_true(             # <<<<<<<<<<<<<<
 *             const weight_t* scores, const int* is_valid, const int n_classes) nogil:
 *         cdef int i
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "linalg.pxd":235
 * 
 *     @staticmethod
 *     cdef inline int arg_max_if_zero(             # <<<<<<<<<<<<<<
 *             const weight_t* scores, const weight_t* costs, const int n_classes) nogil:
 *         cdef int i
 */

static CYTHON_INLINE int __pyx_f_5thinc_6linalg_6VecVec_arg_max_if_zero(__pyx_t_5thinc_6linalg_weight_t const *__pyx_v_scores, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_costs, int const __pyx_v_n_classes) {
  int __pyx_v_i;
  int __pyx_v_best;
  __pyx_t_5thinc_6linalg_weight_t __pyx_v_mode;
  int __pyx_r;
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;

  /* "linalg.pxd":238
 *             const weight_t* scores, const weight_t* costs, const int n_classes) nogil:
 *         cdef int i
 *         cdef int best = 0             # <<<<<<<<<<<<<<
 *         cdef weight_t mode = -900000
 *         for i in range(n_classes):
 */
  __pyx_v_best = 0;

  /* "linalg.pxd":239
 *         cdef int i
 *         cdef int best = 0
 *         cdef weight_t mode = -900000             # <<<<<<<<<<<<<<
 *         for i in range(n_classes):
 *             if costs[i] == 0 and scores[i] > mode:
 */
  __pyx_v_mode = -900000.0;

  /* "linalg.pxd":240
 *         cdef int best = 0
 *         cdef weight_t mode = -900000
 *         for i in range(n_classes):             # <<<<<<<<<<<<<<
 *             if costs[i] == 0 and scores[i] > mode:
 *                 mode = scores[i]
 */
  __pyx_t_1 = __pyx_v_n_classes;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":241
 *         cdef weight_t mode = -900000
 *         for i in range(n_classes):
 *             if costs[i] == 0 and scores[i] > mode:             # <<<<<<<<<<<<<<
 *                 mode = scores[i]
 *                 best = i
 */
    __pyx_t_4 = (((__pyx_v_costs[__pyx_v_i]) == 0.0) != 0);
    if (__pyx_t_4) {
    } else {
      __pyx_t_3 = __pyx_t_4;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_4 = (((__pyx_v_scores[__pyx_v_i]) > __pyx_v_mode) != 0);
    __pyx_t_3 = __pyx_t_4;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_3) {

      /* "linalg.pxd":242
 *         for i in range(n_classes):
 *             if costs[i] == 0 and scores[i] > mode:
 *                 mode = scores[i]             # <<<<<<<<<<<<<<
 *                 best = i
 *         return best
 */
      __pyx_v_mode = (__pyx_v_scores[__pyx_v_i]);

      /* "linalg.pxd":243
 *             if costs[i] == 0 and scores[i] > mode:
 *                 mode = scores[i]
 *                 best = i             # <<<<<<<<<<<<<<
 *         return best
 * 
 */
      __pyx_v_best = __pyx_v_i;

      /* "linalg.pxd":241
 *         cdef weight_t mode = -900000
 *         for i in range(n_classes):
 *             if costs[i] == 0 and scores[i] > mode:             # <<<<<<<<<<<<<<
 *                 mode = scores[i]
 *                 best = i
 */
    }
  }

  /* "linalg.pxd":244
 *                 mode = scores[i]
 *                 best = i
 *         return best             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_best;
  goto __pyx_L0;

  /* "linalg.pxd":235
 * 
 *     @staticmethod
 *     cdef inline int arg_max_if_zero(             # <<<<<<<<<<<<<<
 *             const weight_t* scores, const weight_t* costs, const int n_classes) nogil:
 *         cdef int i
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "linalg.pxd":249
 * cdef class MatVec:
 *     @staticmethod
 *     cdef inline void mul(weight_t* output,             # <<<<<<<<<<<<<<
 *                          const weight_t* mat,
 *                          const weight_t* vec,
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatVec_mul(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_mat, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col) {

  /* "linalg.pxd":253
 *                          const weight_t* vec,
 *                          int32_t nr_row, int32_t nr_col) nogil:
 *         memcpy(output, mat, sizeof(output[0]) * nr_row * nr_col)             # <<<<<<<<<<<<<<
 *         MatVec.mul_i(output, vec, nr_row, nr_col)
 * 
 */
  memcpy(__pyx_v_output, __pyx_v_mat, (((sizeof((__pyx_v_output[0]))) * __pyx_v_nr_row) * __pyx_v_nr_col));

  /* "linalg.pxd":254
 *                          int32_t nr_row, int32_t nr_col) nogil:
 *         memcpy(output, mat, sizeof(output[0]) * nr_row * nr_col)
 *         MatVec.mul_i(output, vec, nr_row, nr_col)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_f_5thinc_6linalg_6MatVec_mul_i(__pyx_v_output, __pyx_v_vec, __pyx_v_nr_row, __pyx_v_nr_col);

  /* "linalg.pxd":249
 * cdef class MatVec:
 *     @staticmethod
 *     cdef inline void mul(weight_t* output,             # <<<<<<<<<<<<<<
 *                          const weight_t* mat,
 *                          const weight_t* vec,
 */

  /* function exit code */
}

/* "linalg.pxd":257
 * 
 *     @staticmethod
 *     cdef inline void mul_i(weight_t* mat,             # <<<<<<<<<<<<<<
 *                            const weight_t* vec,
 *                            int32_t nr_row, int32_t nr_col) nogil:
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatVec_mul_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_mat, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col) {
  int __pyx_v_i;
  int __pyx_v_row;
  int __pyx_v_col;
  int32_t __pyx_t_1;
  int __pyx_t_2;
  int32_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;

  /* "linalg.pxd":261
 *                            int32_t nr_row, int32_t nr_col) nogil:
 *         cdef int i, row, col
 *         for i in range(nr_row):             # <<<<<<<<<<<<<<
 *             row = i * nr_col
 *             for col in range(nr_col):
 */
  __pyx_t_1 = __pyx_v_nr_row;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":262
 *         cdef int i, row, col
 *         for i in range(nr_row):
 *             row = i * nr_col             # <<<<<<<<<<<<<<
 *             for col in range(nr_col):
 *                 mat[row + col] *= vec[col]
 */
    __pyx_v_row = (__pyx_v_i * __pyx_v_nr_col);

    /* "linalg.pxd":263
 *         for i in range(nr_row):
 *             row = i * nr_col
 *             for col in range(nr_col):             # <<<<<<<<<<<<<<
 *                 mat[row + col] *= vec[col]
 * 
 */
    __pyx_t_3 = __pyx_v_nr_col;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_col = __pyx_t_4;

      /* "linalg.pxd":264
 *             row = i * nr_col
 *             for col in range(nr_col):
 *                 mat[row + col] *= vec[col]             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
      __pyx_t_5 = (__pyx_v_row + __pyx_v_col);
      (__pyx_v_mat[__pyx_t_5]) = ((__pyx_v_mat[__pyx_t_5]) * (__pyx_v_vec[__pyx_v_col]));
    }
  }

  /* "linalg.pxd":257
 * 
 *     @staticmethod
 *     cdef inline void mul_i(weight_t* mat,             # <<<<<<<<<<<<<<
 *                            const weight_t* vec,
 *                            int32_t nr_row, int32_t nr_col) nogil:
 */

  /* function exit code */
}

/* "linalg.pxd":267
 * 
 *     @staticmethod
 *     cdef inline void dot(weight_t* output,             # <<<<<<<<<<<<<<
 *                          const weight_t* mat,
 *                          const weight_t* vec,
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatVec_dot(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_mat, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col) {
  int __pyx_v_i;
  int __pyx_v_row;
  int __pyx_v_col;
  int32_t __pyx_t_1;
  int __pyx_t_2;
  int32_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;

  /* "linalg.pxd":288
 *             )
 *         else:
 *             for i in range(nr_row):             # <<<<<<<<<<<<<<
 *                 output[i] = 0
 *                 row = i * nr_col
 */
  __pyx_t_1 = __pyx_v_nr_row;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":289
 *         else:
 *             for i in range(nr_row):
 *                 output[i] = 0             # <<<<<<<<<<<<<<
 *                 row = i * nr_col
 *                 for col in range(nr_col):
 */
    (__pyx_v_output[__pyx_v_i]) = 0.0;

    /* "linalg.pxd":290
 *             for i in range(nr_row):
 *                 output[i] = 0
 *                 row = i * nr_col             # <<<<<<<<<<<<<<
 *                 for col in range(nr_col):
 *                     output[i] += mat[row + col] * vec[col]
 */
    __pyx_v_row = (__pyx_v_i * __pyx_v_nr_col);

    /* "linalg.pxd":291
 *                 output[i] = 0
 *                 row = i * nr_col
 *                 for col in range(nr_col):             # <<<<<<<<<<<<<<
 *                     output[i] += mat[row + col] * vec[col]
 * 
 */
    __pyx_t_3 = __pyx_v_nr_col;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_col = __pyx_t_4;

      /* "linalg.pxd":292
 *                 row = i * nr_col
 *                 for col in range(nr_col):
 *                     output[i] += mat[row + col] * vec[col]             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
      __pyx_t_5 = __pyx_v_i;
      (__pyx_v_output[__pyx_t_5]) = ((__pyx_v_output[__pyx_t_5]) + ((__pyx_v_mat[(__pyx_v_row + __pyx_v_col)]) * (__pyx_v_vec[__pyx_v_col])));
    }
  }

  /* "linalg.pxd":267
 * 
 *     @staticmethod
 *     cdef inline void dot(weight_t* output,             # <<<<<<<<<<<<<<
 *                          const weight_t* mat,
 *                          const weight_t* vec,
 */

  /* function exit code */
}

/* "linalg.pxd":295
 * 
 *     @staticmethod
 *     cdef inline void T_dot(weight_t* output,             # <<<<<<<<<<<<<<
 *                              const weight_t* mat,
 *                              const weight_t* vec,
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatVec_T_dot(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_mat, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_vec, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col) {
  int __pyx_v_row;
  int __pyx_v_col;
  int32_t __pyx_t_1;
  int __pyx_t_2;
  int32_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;

  /* "linalg.pxd":317
 *             )
 *         else:
 *             for row in range(nr_row):             # <<<<<<<<<<<<<<
 *                 for col in range(nr_col):
 *                     output[col] += vec[row] * mat[(row * nr_col) + col]
 */
  __pyx_t_1 = __pyx_v_nr_row;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_row = __pyx_t_2;

    /* "linalg.pxd":318
 *         else:
 *             for row in range(nr_row):
 *                 for col in range(nr_col):             # <<<<<<<<<<<<<<
 *                     output[col] += vec[row] * mat[(row * nr_col) + col]
 * 
 */
    __pyx_t_3 = __pyx_v_nr_col;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_col = __pyx_t_4;

      /* "linalg.pxd":319
 *             for row in range(nr_row):
 *                 for col in range(nr_col):
 *                     output[col] += vec[row] * mat[(row * nr_col) + col]             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_5 = __pyx_v_col;
      (__pyx_v_output[__pyx_t_5]) = ((__pyx_v_output[__pyx_t_5]) + ((__pyx_v_vec[__pyx_v_row]) * (__pyx_v_mat[((__pyx_v_row * __pyx_v_nr_col) + __pyx_v_col)])));
    }
  }

  /* "linalg.pxd":295
 * 
 *     @staticmethod
 *     cdef inline void T_dot(weight_t* output,             # <<<<<<<<<<<<<<
 *                              const weight_t* mat,
 *                              const weight_t* vec,
 */

  /* function exit code */
}

/* "linalg.pxd":324
 * cdef class MatMat:
 *     @staticmethod
 *     cdef inline void add(weight_t* output,             # <<<<<<<<<<<<<<
 *                          const weight_t* x,
 *                          const weight_t* y,
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_add(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col) {

  /* "linalg.pxd":328
 *                          const weight_t* y,
 *                          int32_t nr_row, int32_t nr_col) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr_row * nr_col)             # <<<<<<<<<<<<<<
 *         MatMat.add_i(output, y, nr_row, nr_col)
 * 
 */
  memcpy(__pyx_v_output, __pyx_v_x, (((sizeof((__pyx_v_output[0]))) * __pyx_v_nr_row) * __pyx_v_nr_col));

  /* "linalg.pxd":329
 *                          int32_t nr_row, int32_t nr_col) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr_row * nr_col)
 *         MatMat.add_i(output, y, nr_row, nr_col)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_f_5thinc_6linalg_6MatMat_add_i(__pyx_v_output, __pyx_v_y, __pyx_v_nr_row, __pyx_v_nr_col);

  /* "linalg.pxd":324
 * cdef class MatMat:
 *     @staticmethod
 *     cdef inline void add(weight_t* output,             # <<<<<<<<<<<<<<
 *                          const weight_t* x,
 *                          const weight_t* y,
 */

  /* function exit code */
}

/* "linalg.pxd":332
 * 
 *     @staticmethod
 *     cdef inline void add_i(weight_t* x,             # <<<<<<<<<<<<<<
 *                            const weight_t* y,
 *                            int32_t nr_row, int32_t nr_col) nogil:
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_add_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col) {
  int __pyx_v_i;
  int __pyx_v_row;
  int __pyx_v_col;
  int32_t __pyx_t_1;
  int __pyx_t_2;
  int32_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;

  /* "linalg.pxd":336
 *                            int32_t nr_row, int32_t nr_col) nogil:
 *         cdef int i, row, col
 *         for i in range(nr_row):             # <<<<<<<<<<<<<<
 *             row = i * nr_col
 *             for col in range(nr_col):
 */
  __pyx_t_1 = __pyx_v_nr_row;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":337
 *         cdef int i, row, col
 *         for i in range(nr_row):
 *             row = i * nr_col             # <<<<<<<<<<<<<<
 *             for col in range(nr_col):
 *                 x[row + col] += y[row + col]
 */
    __pyx_v_row = (__pyx_v_i * __pyx_v_nr_col);

    /* "linalg.pxd":338
 *         for i in range(nr_row):
 *             row = i * nr_col
 *             for col in range(nr_col):             # <<<<<<<<<<<<<<
 *                 x[row + col] += y[row + col]
 * 
 */
    __pyx_t_3 = __pyx_v_nr_col;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_col = __pyx_t_4;

      /* "linalg.pxd":339
 *             row = i * nr_col
 *             for col in range(nr_col):
 *                 x[row + col] += y[row + col]             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
      __pyx_t_5 = (__pyx_v_row + __pyx_v_col);
      (__pyx_v_x[__pyx_t_5]) = ((__pyx_v_x[__pyx_t_5]) + (__pyx_v_y[(__pyx_v_row + __pyx_v_col)]));
    }
  }

  /* "linalg.pxd":332
 * 
 *     @staticmethod
 *     cdef inline void add_i(weight_t* x,             # <<<<<<<<<<<<<<
 *                            const weight_t* y,
 *                            int32_t nr_row, int32_t nr_col) nogil:
 */

  /* function exit code */
}

/* "linalg.pxd":342
 * 
 *     @staticmethod
 *     cdef inline void mul(weight_t* output,             # <<<<<<<<<<<<<<
 *                          const weight_t* x,
 *                          const weight_t* y,
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_mul(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_output, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col) {

  /* "linalg.pxd":346
 *                          const weight_t* y,
 *                          int32_t nr_row, int32_t nr_col) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr_row * nr_col)             # <<<<<<<<<<<<<<
 *         MatMat.mul_i(output, y, nr_row, nr_col)
 * 
 */
  memcpy(__pyx_v_output, __pyx_v_x, (((sizeof((__pyx_v_output[0]))) * __pyx_v_nr_row) * __pyx_v_nr_col));

  /* "linalg.pxd":347
 *                          int32_t nr_row, int32_t nr_col) nogil:
 *         memcpy(output, x, sizeof(output[0]) * nr_row * nr_col)
 *         MatMat.mul_i(output, y, nr_row, nr_col)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_f_5thinc_6linalg_6MatMat_mul_i(__pyx_v_output, __pyx_v_y, __pyx_v_nr_row, __pyx_v_nr_col);

  /* "linalg.pxd":342
 * 
 *     @staticmethod
 *     cdef inline void mul(weight_t* output,             # <<<<<<<<<<<<<<
 *                          const weight_t* x,
 *                          const weight_t* y,
 */

  /* function exit code */
}

/* "linalg.pxd":350
 * 
 *     @staticmethod
 *     cdef inline void mul_i(weight_t* x,             # <<<<<<<<<<<<<<
 *                            const weight_t* y,
 *                            int32_t nr_row, int32_t nr_col) nogil:
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_mul_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col) {
  int __pyx_v_i;
  int __pyx_v_row;
  int __pyx_v_col;
  int32_t __pyx_t_1;
  int __pyx_t_2;
  int32_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;

  /* "linalg.pxd":354
 *                            int32_t nr_row, int32_t nr_col) nogil:
 *         cdef int i, row, col
 *         for i in range(nr_row):             # <<<<<<<<<<<<<<
 *             row = i * nr_col
 *             for col in range(nr_col):
 */
  __pyx_t_1 = __pyx_v_nr_row;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":355
 *         cdef int i, row, col
 *         for i in range(nr_row):
 *             row = i * nr_col             # <<<<<<<<<<<<<<
 *             for col in range(nr_col):
 *                 x[row + col] *= y[row + col]
 */
    __pyx_v_row = (__pyx_v_i * __pyx_v_nr_col);

    /* "linalg.pxd":356
 *         for i in range(nr_row):
 *             row = i * nr_col
 *             for col in range(nr_col):             # <<<<<<<<<<<<<<
 *                 x[row + col] *= y[row + col]
 * 
 */
    __pyx_t_3 = __pyx_v_nr_col;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_col = __pyx_t_4;

      /* "linalg.pxd":357
 *             row = i * nr_col
 *             for col in range(nr_col):
 *                 x[row + col] *= y[row + col]             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
      __pyx_t_5 = (__pyx_v_row + __pyx_v_col);
      (__pyx_v_x[__pyx_t_5]) = ((__pyx_v_x[__pyx_t_5]) * (__pyx_v_y[(__pyx_v_row + __pyx_v_col)]));
    }
  }

  /* "linalg.pxd":350
 * 
 *     @staticmethod
 *     cdef inline void mul_i(weight_t* x,             # <<<<<<<<<<<<<<
 *                            const weight_t* y,
 *                            int32_t nr_row, int32_t nr_col) nogil:
 */

  /* function exit code */
}

/* "linalg.pxd":360
 * 
 *     @staticmethod
 *     cdef inline void add_outer_i(weight_t* mat,             # <<<<<<<<<<<<<<
 *                                  const weight_t* x,
 *                                  const weight_t* y,
 */

static CYTHON_INLINE void __pyx_f_5thinc_6linalg_6MatMat_add_outer_i(__pyx_t_5thinc_6linalg_weight_t *__pyx_v_mat, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_x, __pyx_t_5thinc_6linalg_weight_t const *__pyx_v_y, int32_t __pyx_v_nr_row, int32_t __pyx_v_nr_col) {
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_row;
  int32_t __pyx_t_1;
  int __pyx_t_2;
  int32_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;

  /* "linalg.pxd":366
 *                                  int32_t nr_col) nogil:
 *         cdef int i, j, row
 *         for i in range(nr_row):             # <<<<<<<<<<<<<<
 *             row = i * nr_col
 *             for j in range(nr_col):
 */
  __pyx_t_1 = __pyx_v_nr_row;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "linalg.pxd":367
 *         cdef int i, j, row
 *         for i in range(nr_row):
 *             row = i * nr_col             # <<<<<<<<<<<<<<
 *             for j in range(nr_col):
 *                 mat[row + j] += x[i] * y[j]
 */
    __pyx_v_row = (__pyx_v_i * __pyx_v_nr_col);

    /* "linalg.pxd":368
 *         for i in range(nr_row):
 *             row = i * nr_col
 *             for j in range(nr_col):             # <<<<<<<<<<<<<<
 *                 mat[row + j] += x[i] * y[j]
 */
    __pyx_t_3 = __pyx_v_nr_col;
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_j = __pyx_t_4;

      /* "linalg.pxd":369
 *             row = i * nr_col
 *             for j in range(nr_col):
 *                 mat[row + j] += x[i] * y[j]             # <<<<<<<<<<<<<<
 */
      __pyx_t_5 = (__pyx_v_row + __pyx_v_j);
      (__pyx_v_mat[__pyx_t_5]) = ((__pyx_v_mat[__pyx_t_5]) + ((__pyx_v_x[__pyx_v_i]) * (__pyx_v_y[__pyx_v_j])));
    }
  }

  /* "linalg.pxd":360
 * 
 *     @staticmethod
 *     cdef inline void add_outer_i(weight_t* mat,             # <<<<<<<<<<<<<<
 *                                  const weight_t* x,
 *                                  const weight_t* y,
 */

  /* function exit code */
}

/* "stateclass.pxd":17
 * 
 *     @staticmethod
 *     cdef inline StateClass init(const TokenC* sent, int length):             # <<<<<<<<<<<<<<
 *         cdef StateClass self = StateClass(length)
 *         self.c = new StateC(sent, length)
 */

static CYTHON_INLINE struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_init(struct __pyx_t_5spacy_7structs_TokenC const *__pyx_v_sent, int __pyx_v_length) {
  struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self = 0;
  struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init", 0);

  /* "stateclass.pxd":18
 *     @staticmethod
 *     cdef inline StateClass init(const TokenC* sent, int length):
 *         cdef StateClass self = StateClass(length)             # <<<<<<<<<<<<<<
 *         self.c = new StateC(sent, length)
 *         return self
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5spacy_6syntax_10stateclass_StateClass), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self = ((struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "stateclass.pxd":19
 *     cdef inline StateClass init(const TokenC* sent, int length):
 *         cdef StateClass self = StateClass(length)
 *         self.c = new StateC(sent, length)             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->c = new __pyx_t_5spacy_6syntax_6_state_StateC(__pyx_v_sent, __pyx_v_length);

  /* "stateclass.pxd":20
 *         cdef StateClass self = StateClass(length)
 *         self.c = new StateC(sent, length)
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int S(self, int i) nogil:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "stateclass.pxd":17
 * 
 *     @staticmethod
 *     cdef inline StateClass init(const TokenC* sent, int length):             # <<<<<<<<<<<<<<
 *         cdef StateClass self = StateClass(length)
 *         self.c = new StateC(sent, length)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spacy.syntax.stateclass.StateClass.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_self);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "stateclass.pxd":22
 *         return self
 * 
 *     cdef inline int S(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.S(i)
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_S(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i) {
  int __pyx_r;

  /* "stateclass.pxd":23
 * 
 *     cdef inline int S(self, int i) nogil:
 *         return self.c.S(i)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int B(self, int i) nogil:
 */
  __pyx_r = __pyx_v_self->c->S(__pyx_v_i);
  goto __pyx_L0;

  /* "stateclass.pxd":22
 *         return self
 * 
 *     cdef inline int S(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.S(i)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":25
 *         return self.c.S(i)
 * 
 *     cdef inline int B(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.B(i)
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_B(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i) {
  int __pyx_r;

  /* "stateclass.pxd":26
 * 
 *     cdef inline int B(self, int i) nogil:
 *         return self.c.B(i)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline const TokenC* S_(self, int i) nogil:
 */
  __pyx_r = __pyx_v_self->c->B(__pyx_v_i);
  goto __pyx_L0;

  /* "stateclass.pxd":25
 *         return self.c.S(i)
 * 
 *     cdef inline int B(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.B(i)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":28
 *         return self.c.B(i)
 * 
 *     cdef inline const TokenC* S_(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.S_(i)
 * 
 */

static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_S_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i) {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_r;

  /* "stateclass.pxd":29
 * 
 *     cdef inline const TokenC* S_(self, int i) nogil:
 *         return self.c.S_(i)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline const TokenC* B_(self, int i) nogil:
 */
  __pyx_r = __pyx_v_self->c->S_(__pyx_v_i);
  goto __pyx_L0;

  /* "stateclass.pxd":28
 *         return self.c.B(i)
 * 
 *     cdef inline const TokenC* S_(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.S_(i)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":31
 *         return self.c.S_(i)
 * 
 *     cdef inline const TokenC* B_(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.B_(i)
 * 
 */

static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_B_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i) {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_r;

  /* "stateclass.pxd":32
 * 
 *     cdef inline const TokenC* B_(self, int i) nogil:
 *         return self.c.B_(i)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline const TokenC* H_(self, int i) nogil:
 */
  __pyx_r = __pyx_v_self->c->B_(__pyx_v_i);
  goto __pyx_L0;

  /* "stateclass.pxd":31
 *         return self.c.S_(i)
 * 
 *     cdef inline const TokenC* B_(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.B_(i)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":34
 *         return self.c.B_(i)
 * 
 *     cdef inline const TokenC* H_(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.H_(i)
 * 
 */

static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_H_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i) {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_r;

  /* "stateclass.pxd":35
 * 
 *     cdef inline const TokenC* H_(self, int i) nogil:
 *         return self.c.H_(i)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline const TokenC* E_(self, int i) nogil:
 */
  __pyx_r = __pyx_v_self->c->H_(__pyx_v_i);
  goto __pyx_L0;

  /* "stateclass.pxd":34
 *         return self.c.B_(i)
 * 
 *     cdef inline const TokenC* H_(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.H_(i)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":37
 *         return self.c.H_(i)
 * 
 *     cdef inline const TokenC* E_(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.E_(i)
 * 
 */

static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_E_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i) {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_r;

  /* "stateclass.pxd":38
 * 
 *     cdef inline const TokenC* E_(self, int i) nogil:
 *         return self.c.E_(i)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline const TokenC* L_(self, int i, int idx) nogil:
 */
  __pyx_r = __pyx_v_self->c->E_(__pyx_v_i);
  goto __pyx_L0;

  /* "stateclass.pxd":37
 *         return self.c.H_(i)
 * 
 *     cdef inline const TokenC* E_(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.E_(i)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":40
 *         return self.c.E_(i)
 * 
 *     cdef inline const TokenC* L_(self, int i, int idx) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.L_(i, idx)
 * 
 */

static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_L_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i, int __pyx_v_idx) {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_r;

  /* "stateclass.pxd":41
 * 
 *     cdef inline const TokenC* L_(self, int i, int idx) nogil:
 *         return self.c.L_(i, idx)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline const TokenC* R_(self, int i, int idx) nogil:
 */
  __pyx_r = __pyx_v_self->c->L_(__pyx_v_i, __pyx_v_idx);
  goto __pyx_L0;

  /* "stateclass.pxd":40
 *         return self.c.E_(i)
 * 
 *     cdef inline const TokenC* L_(self, int i, int idx) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.L_(i, idx)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":43
 *         return self.c.L_(i, idx)
 * 
 *     cdef inline const TokenC* R_(self, int i, int idx) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.R_(i, idx)
 * 
 */

static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_R_(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i, int __pyx_v_idx) {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_r;

  /* "stateclass.pxd":44
 * 
 *     cdef inline const TokenC* R_(self, int i, int idx) nogil:
 *         return self.c.R_(i, idx)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline const TokenC* safe_get(self, int i) nogil:
 */
  __pyx_r = __pyx_v_self->c->R_(__pyx_v_i, __pyx_v_idx);
  goto __pyx_L0;

  /* "stateclass.pxd":43
 *         return self.c.L_(i, idx)
 * 
 *     cdef inline const TokenC* R_(self, int i, int idx) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.R_(i, idx)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":46
 *         return self.c.R_(i, idx)
 * 
 *     cdef inline const TokenC* safe_get(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.safe_get(i)
 * 
 */

static CYTHON_INLINE struct __pyx_t_5spacy_7structs_TokenC const *__pyx_f_5spacy_6syntax_10stateclass_10StateClass_safe_get(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i) {
  struct __pyx_t_5spacy_7structs_TokenC const *__pyx_r;

  /* "stateclass.pxd":47
 * 
 *     cdef inline const TokenC* safe_get(self, int i) nogil:
 *         return self.c.safe_get(i)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int H(self, int i) nogil:
 */
  __pyx_r = __pyx_v_self->c->safe_get(__pyx_v_i);
  goto __pyx_L0;

  /* "stateclass.pxd":46
 *         return self.c.R_(i, idx)
 * 
 *     cdef inline const TokenC* safe_get(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.safe_get(i)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":49
 *         return self.c.safe_get(i)
 * 
 *     cdef inline int H(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.H(i)
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_H(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i) {
  int __pyx_r;

  /* "stateclass.pxd":50
 * 
 *     cdef inline int H(self, int i) nogil:
 *         return self.c.H(i)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int E(self, int i) nogil:
 */
  __pyx_r = __pyx_v_self->c->H(__pyx_v_i);
  goto __pyx_L0;

  /* "stateclass.pxd":49
 *         return self.c.safe_get(i)
 * 
 *     cdef inline int H(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.H(i)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":52
 *         return self.c.H(i)
 * 
 *     cdef inline int E(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.E(i)
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_E(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i) {
  int __pyx_r;

  /* "stateclass.pxd":53
 * 
 *     cdef inline int E(self, int i) nogil:
 *         return self.c.E(i)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int L(self, int i, int idx) nogil:
 */
  __pyx_r = __pyx_v_self->c->E(__pyx_v_i);
  goto __pyx_L0;

  /* "stateclass.pxd":52
 *         return self.c.H(i)
 * 
 *     cdef inline int E(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.E(i)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":55
 *         return self.c.E(i)
 * 
 *     cdef inline int L(self, int i, int idx) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.L(i, idx)
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_L(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i, int __pyx_v_idx) {
  int __pyx_r;

  /* "stateclass.pxd":56
 * 
 *     cdef inline int L(self, int i, int idx) nogil:
 *         return self.c.L(i, idx)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int R(self, int i, int idx) nogil:
 */
  __pyx_r = __pyx_v_self->c->L(__pyx_v_i, __pyx_v_idx);
  goto __pyx_L0;

  /* "stateclass.pxd":55
 *         return self.c.E(i)
 * 
 *     cdef inline int L(self, int i, int idx) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.L(i, idx)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":58
 *         return self.c.L(i, idx)
 * 
 *     cdef inline int R(self, int i, int idx) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.R(i, idx)
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_R(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i, int __pyx_v_idx) {
  int __pyx_r;

  /* "stateclass.pxd":59
 * 
 *     cdef inline int R(self, int i, int idx) nogil:
 *         return self.c.R(i, idx)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline bint empty(self) nogil:
 */
  __pyx_r = __pyx_v_self->c->R(__pyx_v_i, __pyx_v_idx);
  goto __pyx_L0;

  /* "stateclass.pxd":58
 *         return self.c.L(i, idx)
 * 
 *     cdef inline int R(self, int i, int idx) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.R(i, idx)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":61
 *         return self.c.R(i, idx)
 * 
 *     cdef inline bint empty(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.empty()
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_empty(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self) {
  int __pyx_r;

  /* "stateclass.pxd":62
 * 
 *     cdef inline bint empty(self) nogil:
 *         return self.c.empty()             # <<<<<<<<<<<<<<
 * 
 *     cdef inline bint eol(self) nogil:
 */
  __pyx_r = __pyx_v_self->c->empty();
  goto __pyx_L0;

  /* "stateclass.pxd":61
 *         return self.c.R(i, idx)
 * 
 *     cdef inline bint empty(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.empty()
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":64
 *         return self.c.empty()
 * 
 *     cdef inline bint eol(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.eol()
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_eol(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self) {
  int __pyx_r;

  /* "stateclass.pxd":65
 * 
 *     cdef inline bint eol(self) nogil:
 *         return self.c.eol()             # <<<<<<<<<<<<<<
 * 
 *     cdef inline bint at_break(self) nogil:
 */
  __pyx_r = __pyx_v_self->c->eol();
  goto __pyx_L0;

  /* "stateclass.pxd":64
 *         return self.c.empty()
 * 
 *     cdef inline bint eol(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.eol()
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":67
 *         return self.c.eol()
 * 
 *     cdef inline bint at_break(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.at_break()
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_at_break(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self) {
  int __pyx_r;

  /* "stateclass.pxd":68
 * 
 *     cdef inline bint at_break(self) nogil:
 *         return self.c.at_break()             # <<<<<<<<<<<<<<
 * 
 *     cdef inline bint is_final(self) nogil:
 */
  __pyx_r = __pyx_v_self->c->at_break();
  goto __pyx_L0;

  /* "stateclass.pxd":67
 *         return self.c.eol()
 * 
 *     cdef inline bint at_break(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.at_break()
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":70
 *         return self.c.at_break()
 * 
 *     cdef inline bint is_final(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.is_final()
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_is_final(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self) {
  int __pyx_r;

  /* "stateclass.pxd":71
 * 
 *     cdef inline bint is_final(self) nogil:
 *         return self.c.is_final()             # <<<<<<<<<<<<<<
 * 
 *     cdef inline bint has_head(self, int i) nogil:
 */
  __pyx_r = __pyx_v_self->c->is_final();
  goto __pyx_L0;

  /* "stateclass.pxd":70
 *         return self.c.at_break()
 * 
 *     cdef inline bint is_final(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.is_final()
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":73
 *         return self.c.is_final()
 * 
 *     cdef inline bint has_head(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.has_head(i)
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_has_head(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i) {
  int __pyx_r;

  /* "stateclass.pxd":74
 * 
 *     cdef inline bint has_head(self, int i) nogil:
 *         return self.c.has_head(i)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int n_L(self, int i) nogil:
 */
  __pyx_r = __pyx_v_self->c->has_head(__pyx_v_i);
  goto __pyx_L0;

  /* "stateclass.pxd":73
 *         return self.c.is_final()
 * 
 *     cdef inline bint has_head(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.has_head(i)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":76
 *         return self.c.has_head(i)
 * 
 *     cdef inline int n_L(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.n_L(i)
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_n_L(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i) {
  int __pyx_r;

  /* "stateclass.pxd":77
 * 
 *     cdef inline int n_L(self, int i) nogil:
 *         return self.c.n_L(i)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int n_R(self, int i) nogil:
 */
  __pyx_r = __pyx_v_self->c->n_L(__pyx_v_i);
  goto __pyx_L0;

  /* "stateclass.pxd":76
 *         return self.c.has_head(i)
 * 
 *     cdef inline int n_L(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.n_L(i)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":79
 *         return self.c.n_L(i)
 * 
 *     cdef inline int n_R(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.n_R(i)
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_n_R(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i) {
  int __pyx_r;

  /* "stateclass.pxd":80
 * 
 *     cdef inline int n_R(self, int i) nogil:
 *         return self.c.n_R(i)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline bint stack_is_connected(self) nogil:
 */
  __pyx_r = __pyx_v_self->c->n_R(__pyx_v_i);
  goto __pyx_L0;

  /* "stateclass.pxd":79
 *         return self.c.n_L(i)
 * 
 *     cdef inline int n_R(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.n_R(i)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":82
 *         return self.c.n_R(i)
 * 
 *     cdef inline bint stack_is_connected(self) nogil:             # <<<<<<<<<<<<<<
 *         return False
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_stack_is_connected(CYTHON_UNUSED struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self) {
  int __pyx_r;

  /* "stateclass.pxd":83
 * 
 *     cdef inline bint stack_is_connected(self) nogil:
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     cdef inline bint entity_is_open(self) nogil:
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "stateclass.pxd":82
 *         return self.c.n_R(i)
 * 
 *     cdef inline bint stack_is_connected(self) nogil:             # <<<<<<<<<<<<<<
 *         return False
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":85
 *         return False
 * 
 *     cdef inline bint entity_is_open(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.entity_is_open()
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_entity_is_open(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self) {
  int __pyx_r;

  /* "stateclass.pxd":86
 * 
 *     cdef inline bint entity_is_open(self) nogil:
 *         return self.c.entity_is_open()             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int stack_depth(self) nogil:
 */
  __pyx_r = __pyx_v_self->c->entity_is_open();
  goto __pyx_L0;

  /* "stateclass.pxd":85
 *         return False
 * 
 *     cdef inline bint entity_is_open(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.entity_is_open()
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":88
 *         return self.c.entity_is_open()
 * 
 *     cdef inline int stack_depth(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.stack_depth()
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_stack_depth(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self) {
  int __pyx_r;

  /* "stateclass.pxd":89
 * 
 *     cdef inline int stack_depth(self) nogil:
 *         return self.c.stack_depth()             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int buffer_length(self) nogil:
 */
  __pyx_r = __pyx_v_self->c->stack_depth();
  goto __pyx_L0;

  /* "stateclass.pxd":88
 *         return self.c.entity_is_open()
 * 
 *     cdef inline int stack_depth(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.stack_depth()
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":91
 *         return self.c.stack_depth()
 * 
 *     cdef inline int buffer_length(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.buffer_length()
 * 
 */

static CYTHON_INLINE int __pyx_f_5spacy_6syntax_10stateclass_10StateClass_buffer_length(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self) {
  int __pyx_r;

  /* "stateclass.pxd":92
 * 
 *     cdef inline int buffer_length(self) nogil:
 *         return self.c.buffer_length()             # <<<<<<<<<<<<<<
 * 
 *     cdef inline void push(self) nogil:
 */
  __pyx_r = __pyx_v_self->c->buffer_length();
  goto __pyx_L0;

  /* "stateclass.pxd":91
 *         return self.c.stack_depth()
 * 
 *     cdef inline int buffer_length(self) nogil:             # <<<<<<<<<<<<<<
 *         return self.c.buffer_length()
 * 
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "stateclass.pxd":94
 *         return self.c.buffer_length()
 * 
 *     cdef inline void push(self) nogil:             # <<<<<<<<<<<<<<
 *         self.c.push()
 * 
 */

static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_push(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self) {

  /* "stateclass.pxd":95
 * 
 *     cdef inline void push(self) nogil:
 *         self.c.push()             # <<<<<<<<<<<<<<
 * 
 *     cdef inline void pop(self) nogil:
 */
  __pyx_v_self->c->push();

  /* "stateclass.pxd":94
 *         return self.c.buffer_length()
 * 
 *     cdef inline void push(self) nogil:             # <<<<<<<<<<<<<<
 *         self.c.push()
 * 
 */

  /* function exit code */
}

/* "stateclass.pxd":97
 *         self.c.push()
 * 
 *     cdef inline void pop(self) nogil:             # <<<<<<<<<<<<<<
 *         self.c.pop()
 * 
 */

static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_pop(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self) {

  /* "stateclass.pxd":98
 * 
 *     cdef inline void pop(self) nogil:
 *         self.c.pop()             # <<<<<<<<<<<<<<
 * 
 *     cdef inline void unshift(self) nogil:
 */
  __pyx_v_self->c->pop();

  /* "stateclass.pxd":97
 *         self.c.push()
 * 
 *     cdef inline void pop(self) nogil:             # <<<<<<<<<<<<<<
 *         self.c.pop()
 * 
 */

  /* function exit code */
}

/* "stateclass.pxd":100
 *         self.c.pop()
 * 
 *     cdef inline void unshift(self) nogil:             # <<<<<<<<<<<<<<
 *         self.c.unshift()
 * 
 */

static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_unshift(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self) {

  /* "stateclass.pxd":101
 * 
 *     cdef inline void unshift(self) nogil:
 *         self.c.unshift()             # <<<<<<<<<<<<<<
 * 
 *     cdef inline void add_arc(self, int head, int child, int label) nogil:
 */
  __pyx_v_self->c->unshift();

  /* "stateclass.pxd":100
 *         self.c.pop()
 * 
 *     cdef inline void unshift(self) nogil:             # <<<<<<<<<<<<<<
 *         self.c.unshift()
 * 
 */

  /* function exit code */
}

/* "stateclass.pxd":103
 *         self.c.unshift()
 * 
 *     cdef inline void add_arc(self, int head, int child, int label) nogil:             # <<<<<<<<<<<<<<
 *         self.c.add_arc(head, child, label)
 * 
 */

static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_add_arc(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_head, int __pyx_v_child, int __pyx_v_label) {

  /* "stateclass.pxd":104
 * 
 *     cdef inline void add_arc(self, int head, int child, int label) nogil:
 *         self.c.add_arc(head, child, label)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline void del_arc(self, int head, int child) nogil:
 */
  __pyx_v_self->c->add_arc(__pyx_v_head, __pyx_v_child, __pyx_v_label);

  /* "stateclass.pxd":103
 *         self.c.unshift()
 * 
 *     cdef inline void add_arc(self, int head, int child, int label) nogil:             # <<<<<<<<<<<<<<
 *         self.c.add_arc(head, child, label)
 * 
 */

  /* function exit code */
}

/* "stateclass.pxd":106
 *         self.c.add_arc(head, child, label)
 * 
 *     cdef inline void del_arc(self, int head, int child) nogil:             # <<<<<<<<<<<<<<
 *         self.c.del_arc(head, child)
 * 
 */

static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_del_arc(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_head, int __pyx_v_child) {

  /* "stateclass.pxd":107
 * 
 *     cdef inline void del_arc(self, int head, int child) nogil:
 *         self.c.del_arc(head, child)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline void open_ent(self, int label) nogil:
 */
  __pyx_v_self->c->del_arc(__pyx_v_head, __pyx_v_child);

  /* "stateclass.pxd":106
 *         self.c.add_arc(head, child, label)
 * 
 *     cdef inline void del_arc(self, int head, int child) nogil:             # <<<<<<<<<<<<<<
 *         self.c.del_arc(head, child)
 * 
 */

  /* function exit code */
}

/* "stateclass.pxd":109
 *         self.c.del_arc(head, child)
 * 
 *     cdef inline void open_ent(self, int label) nogil:             # <<<<<<<<<<<<<<
 *         self.c.open_ent(label)
 * 
 */

static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_open_ent(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_label) {

  /* "stateclass.pxd":110
 * 
 *     cdef inline void open_ent(self, int label) nogil:
 *         self.c.open_ent(label)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline void close_ent(self) nogil:
 */
  __pyx_v_self->c->open_ent(__pyx_v_label);

  /* "stateclass.pxd":109
 *         self.c.del_arc(head, child)
 * 
 *     cdef inline void open_ent(self, int label) nogil:             # <<<<<<<<<<<<<<
 *         self.c.open_ent(label)
 * 
 */

  /* function exit code */
}

/* "stateclass.pxd":112
 *         self.c.open_ent(label)
 * 
 *     cdef inline void close_ent(self) nogil:             # <<<<<<<<<<<<<<
 *         self.c.close_ent()
 * 
 */

static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_close_ent(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self) {

  /* "stateclass.pxd":113
 * 
 *     cdef inline void close_ent(self) nogil:
 *         self.c.close_ent()             # <<<<<<<<<<<<<<
 * 
 *     cdef inline void set_ent_tag(self, int i, int ent_iob, int ent_type) nogil:
 */
  __pyx_v_self->c->close_ent();

  /* "stateclass.pxd":112
 *         self.c.open_ent(label)
 * 
 *     cdef inline void close_ent(self) nogil:             # <<<<<<<<<<<<<<
 *         self.c.close_ent()
 * 
 */

  /* function exit code */
}

/* "stateclass.pxd":115
 *         self.c.close_ent()
 * 
 *     cdef inline void set_ent_tag(self, int i, int ent_iob, int ent_type) nogil:             # <<<<<<<<<<<<<<
 *         self.c.set_ent_tag(i, ent_iob, ent_type)
 * 
 */

static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_set_ent_tag(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i, int __pyx_v_ent_iob, int __pyx_v_ent_type) {

  /* "stateclass.pxd":116
 * 
 *     cdef inline void set_ent_tag(self, int i, int ent_iob, int ent_type) nogil:
 *         self.c.set_ent_tag(i, ent_iob, ent_type)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline void set_break(self, int i) nogil:
 */
  __pyx_v_self->c->set_ent_tag(__pyx_v_i, __pyx_v_ent_iob, __pyx_v_ent_type);

  /* "stateclass.pxd":115
 *         self.c.close_ent()
 * 
 *     cdef inline void set_ent_tag(self, int i, int ent_iob, int ent_type) nogil:             # <<<<<<<<<<<<<<
 *         self.c.set_ent_tag(i, ent_iob, ent_type)
 * 
 */

  /* function exit code */
}

/* "stateclass.pxd":118
 *         self.c.set_ent_tag(i, ent_iob, ent_type)
 * 
 *     cdef inline void set_break(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         self.c.set_break(i)
 * 
 */

static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_set_break(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, int __pyx_v_i) {

  /* "stateclass.pxd":119
 * 
 *     cdef inline void set_break(self, int i) nogil:
 *         self.c.set_break(i)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline void clone(self, StateClass src) nogil:
 */
  __pyx_v_self->c->set_break(__pyx_v_i);

  /* "stateclass.pxd":118
 *         self.c.set_ent_tag(i, ent_iob, ent_type)
 * 
 *     cdef inline void set_break(self, int i) nogil:             # <<<<<<<<<<<<<<
 *         self.c.set_break(i)
 * 
 */

  /* function exit code */
}

/* "stateclass.pxd":121
 *         self.c.set_break(i)
 * 
 *     cdef inline void clone(self, StateClass src) nogil:             # <<<<<<<<<<<<<<
 *         self.c.clone(src.c)
 * 
 */

static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_clone(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self, struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_src) {

  /* "stateclass.pxd":122
 * 
 *     cdef inline void clone(self, StateClass src) nogil:
 *         self.c.clone(src.c)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline void fast_forward(self) nogil:
 */
  __pyx_v_self->c->clone(__pyx_v_src->c);

  /* "stateclass.pxd":121
 *         self.c.set_break(i)
 * 
 *     cdef inline void clone(self, StateClass src) nogil:             # <<<<<<<<<<<<<<
 *         self.c.clone(src.c)
 * 
 */

  /* function exit code */
}

/* "stateclass.pxd":124
 *         self.c.clone(src.c)
 * 
 *     cdef inline void fast_forward(self) nogil:             # <<<<<<<<<<<<<<
 *         self.c.fast_forward()
 */

static CYTHON_INLINE void __pyx_f_5spacy_6syntax_10stateclass_10StateClass_fast_forward(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *__pyx_v_self) {

  /* "stateclass.pxd":125
 * 
 *     cdef inline void fast_forward(self) nogil:
 *         self.c.fast_forward()             # <<<<<<<<<<<<<<
 */
  __pyx_v_self->c->fast_forward();

  /* "stateclass.pxd":124
 *         self.c.clone(src.c)
 * 
 *     cdef inline void fast_forward(self) nogil:             # <<<<<<<<<<<<<<
 *         self.c.fast_forward()
 */

  /* function exit code */
}

/* "lexeme.pxd":20
 * 
 *     @staticmethod
 *     cdef inline Lexeme from_ptr(LexemeC* lex, Vocab vocab, int vector_length):             # <<<<<<<<<<<<<<
 *         cdef Lexeme self = Lexeme.__new__(Lexeme, vocab, lex.orth)
 *         self.c = lex
 */

static CYTHON_INLINE struct __pyx_obj_5spacy_6lexeme_Lexeme *__pyx_f_5spacy_6lexeme_6Lexeme_from_ptr(struct __pyx_t_5spacy_7structs_LexemeC *__pyx_v_lex, struct __pyx_obj_5spacy_5vocab_Vocab *__pyx_v_vocab, CYTHON_UNUSED int __pyx_v_vector_length) {
  struct __pyx_obj_5spacy_6lexeme_Lexeme *__pyx_v_self = 0;
  struct __pyx_obj_5spacy_6lexeme_Lexeme *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __pyx_t_5spacy_8typedefs_attr_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("from_ptr", 0);

  /* "lexeme.pxd":21
 *     @staticmethod
 *     cdef inline Lexeme from_ptr(LexemeC* lex, Vocab vocab, int vector_length):
 *         cdef Lexeme self = Lexeme.__new__(Lexeme, vocab, lex.orth)             # <<<<<<<<<<<<<<
 *         self.c = lex
 *         self.vocab = vocab
 */
  __pyx_t_1 = __Pyx_PyInt_From_int32_t(__pyx_v_lex->orth); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_vocab));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_vocab));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_vocab));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_5spacy_6lexeme_Lexeme), ((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5spacy_6lexeme_Lexeme)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self = ((struct __pyx_obj_5spacy_6lexeme_Lexeme *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "lexeme.pxd":22
 *     cdef inline Lexeme from_ptr(LexemeC* lex, Vocab vocab, int vector_length):
 *         cdef Lexeme self = Lexeme.__new__(Lexeme, vocab, lex.orth)
 *         self.c = lex             # <<<<<<<<<<<<<<
 *         self.vocab = vocab
 *         self.orth = lex.orth
 */
  __pyx_v_self->c = __pyx_v_lex;

  /* "lexeme.pxd":23
 *         cdef Lexeme self = Lexeme.__new__(Lexeme, vocab, lex.orth)
 *         self.c = lex
 *         self.vocab = vocab             # <<<<<<<<<<<<<<
 *         self.orth = lex.orth
 * 
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_vocab));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_vocab));
  __Pyx_GOTREF(__pyx_v_self->vocab);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->vocab));
  __pyx_v_self->vocab = __pyx_v_vocab;

  /* "lexeme.pxd":24
 *         self.c = lex
 *         self.vocab = vocab
 *         self.orth = lex.orth             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_t_3 = __pyx_v_lex->orth;
  __pyx_v_self->orth = __pyx_t_3;

  /* "lexeme.pxd":20
 * 
 *     @staticmethod
 *     cdef inline Lexeme from_ptr(LexemeC* lex, Vocab vocab, int vector_length):             # <<<<<<<<<<<<<<
 *         cdef Lexeme self = Lexeme.__new__(Lexeme, vocab, lex.orth)
 *         self.c = lex
 */

  /* function exit code */
  __pyx_r = ((struct __pyx_obj_5spacy_6lexeme_Lexeme *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("spacy.lexeme.Lexeme.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_self);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "lexeme.pxd":27
 * 
 *     @staticmethod
 *     cdef inline void set_struct_attr(LexemeC* lex, attr_id_t name, attr_t value) nogil:             # <<<<<<<<<<<<<<
 *         if name < (sizeof(flags_t) * 8):
 *             Lexeme.c_set_flag(lex, name, value)
 */

static CYTHON_INLINE void __pyx_f_5spacy_6lexeme_6Lexeme_set_struct_attr(struct __pyx_t_5spacy_7structs_LexemeC *__pyx_v_lex, enum __pyx_t_5spacy_5attrs_attr_id_t __pyx_v_name, __pyx_t_5spacy_8typedefs_attr_t __pyx_v_value) {
  int __pyx_t_1;

  /* "lexeme.pxd":28
 *     @staticmethod
 *     cdef inline void set_struct_attr(LexemeC* lex, attr_id_t name, attr_t value) nogil:
 *         if name < (sizeof(flags_t) * 8):             # <<<<<<<<<<<<<<
 *             Lexeme.c_set_flag(lex, name, value)
 *         elif name == ID:
 */
  __pyx_t_1 = ((__pyx_v_name < ((sizeof(__pyx_t_5spacy_8typedefs_flags_t)) * 8)) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":29
 *     cdef inline void set_struct_attr(LexemeC* lex, attr_id_t name, attr_t value) nogil:
 *         if name < (sizeof(flags_t) * 8):
 *             Lexeme.c_set_flag(lex, name, value)             # <<<<<<<<<<<<<<
 *         elif name == ID:
 *             lex.id = value
 */
    __pyx_f_5spacy_6lexeme_6Lexeme_c_set_flag(__pyx_v_lex, __pyx_v_name, __pyx_v_value);

    /* "lexeme.pxd":28
 *     @staticmethod
 *     cdef inline void set_struct_attr(LexemeC* lex, attr_id_t name, attr_t value) nogil:
 *         if name < (sizeof(flags_t) * 8):             # <<<<<<<<<<<<<<
 *             Lexeme.c_set_flag(lex, name, value)
 *         elif name == ID:
 */
    goto __pyx_L3;
  }

  /* "lexeme.pxd":30
 *         if name < (sizeof(flags_t) * 8):
 *             Lexeme.c_set_flag(lex, name, value)
 *         elif name == ID:             # <<<<<<<<<<<<<<
 *             lex.id = value
 *         elif name == LOWER:
 */
  __pyx_t_1 = ((__pyx_v_name == __pyx_e_5spacy_5attrs_ID) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":31
 *             Lexeme.c_set_flag(lex, name, value)
 *         elif name == ID:
 *             lex.id = value             # <<<<<<<<<<<<<<
 *         elif name == LOWER:
 *             lex.lower = value
 */
    __pyx_v_lex->id = __pyx_v_value;

    /* "lexeme.pxd":30
 *         if name < (sizeof(flags_t) * 8):
 *             Lexeme.c_set_flag(lex, name, value)
 *         elif name == ID:             # <<<<<<<<<<<<<<
 *             lex.id = value
 *         elif name == LOWER:
 */
    goto __pyx_L3;
  }

  /* "lexeme.pxd":32
 *         elif name == ID:
 *             lex.id = value
 *         elif name == LOWER:             # <<<<<<<<<<<<<<
 *             lex.lower = value
 *         elif name == NORM:
 */
  __pyx_t_1 = ((__pyx_v_name == __pyx_e_5spacy_5attrs_LOWER) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":33
 *             lex.id = value
 *         elif name == LOWER:
 *             lex.lower = value             # <<<<<<<<<<<<<<
 *         elif name == NORM:
 *             lex.norm = value
 */
    __pyx_v_lex->lower = __pyx_v_value;

    /* "lexeme.pxd":32
 *         elif name == ID:
 *             lex.id = value
 *         elif name == LOWER:             # <<<<<<<<<<<<<<
 *             lex.lower = value
 *         elif name == NORM:
 */
    goto __pyx_L3;
  }

  /* "lexeme.pxd":34
 *         elif name == LOWER:
 *             lex.lower = value
 *         elif name == NORM:             # <<<<<<<<<<<<<<
 *             lex.norm = value
 *         elif name == SHAPE:
 */
  __pyx_t_1 = ((__pyx_v_name == __pyx_e_5spacy_5attrs_NORM) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":35
 *             lex.lower = value
 *         elif name == NORM:
 *             lex.norm = value             # <<<<<<<<<<<<<<
 *         elif name == SHAPE:
 *             lex.shape = value
 */
    __pyx_v_lex->norm = __pyx_v_value;

    /* "lexeme.pxd":34
 *         elif name == LOWER:
 *             lex.lower = value
 *         elif name == NORM:             # <<<<<<<<<<<<<<
 *             lex.norm = value
 *         elif name == SHAPE:
 */
    goto __pyx_L3;
  }

  /* "lexeme.pxd":36
 *         elif name == NORM:
 *             lex.norm = value
 *         elif name == SHAPE:             # <<<<<<<<<<<<<<
 *             lex.shape = value
 *         elif name == PREFIX:
 */
  __pyx_t_1 = ((__pyx_v_name == __pyx_e_5spacy_5attrs_SHAPE) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":37
 *             lex.norm = value
 *         elif name == SHAPE:
 *             lex.shape = value             # <<<<<<<<<<<<<<
 *         elif name == PREFIX:
 *             lex.prefix = value
 */
    __pyx_v_lex->shape = __pyx_v_value;

    /* "lexeme.pxd":36
 *         elif name == NORM:
 *             lex.norm = value
 *         elif name == SHAPE:             # <<<<<<<<<<<<<<
 *             lex.shape = value
 *         elif name == PREFIX:
 */
    goto __pyx_L3;
  }

  /* "lexeme.pxd":38
 *         elif name == SHAPE:
 *             lex.shape = value
 *         elif name == PREFIX:             # <<<<<<<<<<<<<<
 *             lex.prefix = value
 *         elif name == SUFFIX:
 */
  __pyx_t_1 = ((__pyx_v_name == __pyx_e_5spacy_5attrs_PREFIX) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":39
 *             lex.shape = value
 *         elif name == PREFIX:
 *             lex.prefix = value             # <<<<<<<<<<<<<<
 *         elif name == SUFFIX:
 *             lex.suffix = value
 */
    __pyx_v_lex->prefix = __pyx_v_value;

    /* "lexeme.pxd":38
 *         elif name == SHAPE:
 *             lex.shape = value
 *         elif name == PREFIX:             # <<<<<<<<<<<<<<
 *             lex.prefix = value
 *         elif name == SUFFIX:
 */
    goto __pyx_L3;
  }

  /* "lexeme.pxd":40
 *         elif name == PREFIX:
 *             lex.prefix = value
 *         elif name == SUFFIX:             # <<<<<<<<<<<<<<
 *             lex.suffix = value
 *         elif name == CLUSTER:
 */
  __pyx_t_1 = ((__pyx_v_name == __pyx_e_5spacy_5attrs_SUFFIX) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":41
 *             lex.prefix = value
 *         elif name == SUFFIX:
 *             lex.suffix = value             # <<<<<<<<<<<<<<
 *         elif name == CLUSTER:
 *             lex.cluster = value
 */
    __pyx_v_lex->suffix = __pyx_v_value;

    /* "lexeme.pxd":40
 *         elif name == PREFIX:
 *             lex.prefix = value
 *         elif name == SUFFIX:             # <<<<<<<<<<<<<<
 *             lex.suffix = value
 *         elif name == CLUSTER:
 */
    goto __pyx_L3;
  }

  /* "lexeme.pxd":42
 *         elif name == SUFFIX:
 *             lex.suffix = value
 *         elif name == CLUSTER:             # <<<<<<<<<<<<<<
 *             lex.cluster = value
 *         elif name == LANG:
 */
  __pyx_t_1 = ((__pyx_v_name == __pyx_e_5spacy_5attrs_CLUSTER) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":43
 *             lex.suffix = value
 *         elif name == CLUSTER:
 *             lex.cluster = value             # <<<<<<<<<<<<<<
 *         elif name == LANG:
 *             lex.lang = value
 */
    __pyx_v_lex->cluster = __pyx_v_value;

    /* "lexeme.pxd":42
 *         elif name == SUFFIX:
 *             lex.suffix = value
 *         elif name == CLUSTER:             # <<<<<<<<<<<<<<
 *             lex.cluster = value
 *         elif name == LANG:
 */
    goto __pyx_L3;
  }

  /* "lexeme.pxd":44
 *         elif name == CLUSTER:
 *             lex.cluster = value
 *         elif name == LANG:             # <<<<<<<<<<<<<<
 *             lex.lang = value
 * 
 */
  __pyx_t_1 = ((__pyx_v_name == __pyx_e_5spacy_5attrs_LANG) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":45
 *             lex.cluster = value
 *         elif name == LANG:
 *             lex.lang = value             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
    __pyx_v_lex->lang = __pyx_v_value;

    /* "lexeme.pxd":44
 *         elif name == CLUSTER:
 *             lex.cluster = value
 *         elif name == LANG:             # <<<<<<<<<<<<<<
 *             lex.lang = value
 * 
 */
  }
  __pyx_L3:;

  /* "lexeme.pxd":27
 * 
 *     @staticmethod
 *     cdef inline void set_struct_attr(LexemeC* lex, attr_id_t name, attr_t value) nogil:             # <<<<<<<<<<<<<<
 *         if name < (sizeof(flags_t) * 8):
 *             Lexeme.c_set_flag(lex, name, value)
 */

  /* function exit code */
}

/* "lexeme.pxd":48
 * 
 *     @staticmethod
 *     cdef inline attr_t get_struct_attr(const LexemeC* lex, attr_id_t feat_name) nogil:             # <<<<<<<<<<<<<<
 *         if feat_name < (sizeof(flags_t) * 8):
 *             if Lexeme.c_check_flag(lex, feat_name):
 */

static CYTHON_INLINE __pyx_t_5spacy_8typedefs_attr_t __pyx_f_5spacy_6lexeme_6Lexeme_get_struct_attr(struct __pyx_t_5spacy_7structs_LexemeC const *__pyx_v_lex, enum __pyx_t_5spacy_5attrs_attr_id_t __pyx_v_feat_name) {
  __pyx_t_5spacy_8typedefs_attr_t __pyx_r;
  int __pyx_t_1;

  /* "lexeme.pxd":49
 *     @staticmethod
 *     cdef inline attr_t get_struct_attr(const LexemeC* lex, attr_id_t feat_name) nogil:
 *         if feat_name < (sizeof(flags_t) * 8):             # <<<<<<<<<<<<<<
 *             if Lexeme.c_check_flag(lex, feat_name):
 *                 return 1
 */
  __pyx_t_1 = ((__pyx_v_feat_name < ((sizeof(__pyx_t_5spacy_8typedefs_flags_t)) * 8)) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":50
 *     cdef inline attr_t get_struct_attr(const LexemeC* lex, attr_id_t feat_name) nogil:
 *         if feat_name < (sizeof(flags_t) * 8):
 *             if Lexeme.c_check_flag(lex, feat_name):             # <<<<<<<<<<<<<<
 *                 return 1
 *             else:
 */
    __pyx_t_1 = (__pyx_f_5spacy_6lexeme_6Lexeme_c_check_flag(__pyx_v_lex, __pyx_v_feat_name) != 0);
    if (__pyx_t_1) {

      /* "lexeme.pxd":51
 *         if feat_name < (sizeof(flags_t) * 8):
 *             if Lexeme.c_check_flag(lex, feat_name):
 *                 return 1             # <<<<<<<<<<<<<<
 *             else:
 *                 return 0
 */
      __pyx_r = 1;
      goto __pyx_L0;

      /* "lexeme.pxd":50
 *     cdef inline attr_t get_struct_attr(const LexemeC* lex, attr_id_t feat_name) nogil:
 *         if feat_name < (sizeof(flags_t) * 8):
 *             if Lexeme.c_check_flag(lex, feat_name):             # <<<<<<<<<<<<<<
 *                 return 1
 *             else:
 */
    }

    /* "lexeme.pxd":53
 *                 return 1
 *             else:
 *                 return 0             # <<<<<<<<<<<<<<
 *         elif feat_name == ID:
 *             return lex.id
 */
    /*else*/ {
      __pyx_r = 0;
      goto __pyx_L0;
    }

    /* "lexeme.pxd":49
 *     @staticmethod
 *     cdef inline attr_t get_struct_attr(const LexemeC* lex, attr_id_t feat_name) nogil:
 *         if feat_name < (sizeof(flags_t) * 8):             # <<<<<<<<<<<<<<
 *             if Lexeme.c_check_flag(lex, feat_name):
 *                 return 1
 */
  }

  /* "lexeme.pxd":54
 *             else:
 *                 return 0
 *         elif feat_name == ID:             # <<<<<<<<<<<<<<
 *             return lex.id
 *         elif feat_name == ORTH:
 */
  __pyx_t_1 = ((__pyx_v_feat_name == __pyx_e_5spacy_5attrs_ID) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":55
 *                 return 0
 *         elif feat_name == ID:
 *             return lex.id             # <<<<<<<<<<<<<<
 *         elif feat_name == ORTH:
 *             return lex.orth
 */
    __pyx_r = __pyx_v_lex->id;
    goto __pyx_L0;

    /* "lexeme.pxd":54
 *             else:
 *                 return 0
 *         elif feat_name == ID:             # <<<<<<<<<<<<<<
 *             return lex.id
 *         elif feat_name == ORTH:
 */
  }

  /* "lexeme.pxd":56
 *         elif feat_name == ID:
 *             return lex.id
 *         elif feat_name == ORTH:             # <<<<<<<<<<<<<<
 *             return lex.orth
 *         elif feat_name == LOWER:
 */
  __pyx_t_1 = ((__pyx_v_feat_name == __pyx_e_5spacy_5attrs_ORTH) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":57
 *             return lex.id
 *         elif feat_name == ORTH:
 *             return lex.orth             # <<<<<<<<<<<<<<
 *         elif feat_name == LOWER:
 *             return lex.lower
 */
    __pyx_r = __pyx_v_lex->orth;
    goto __pyx_L0;

    /* "lexeme.pxd":56
 *         elif feat_name == ID:
 *             return lex.id
 *         elif feat_name == ORTH:             # <<<<<<<<<<<<<<
 *             return lex.orth
 *         elif feat_name == LOWER:
 */
  }

  /* "lexeme.pxd":58
 *         elif feat_name == ORTH:
 *             return lex.orth
 *         elif feat_name == LOWER:             # <<<<<<<<<<<<<<
 *             return lex.lower
 *         elif feat_name == NORM:
 */
  __pyx_t_1 = ((__pyx_v_feat_name == __pyx_e_5spacy_5attrs_LOWER) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":59
 *             return lex.orth
 *         elif feat_name == LOWER:
 *             return lex.lower             # <<<<<<<<<<<<<<
 *         elif feat_name == NORM:
 *             return lex.norm
 */
    __pyx_r = __pyx_v_lex->lower;
    goto __pyx_L0;

    /* "lexeme.pxd":58
 *         elif feat_name == ORTH:
 *             return lex.orth
 *         elif feat_name == LOWER:             # <<<<<<<<<<<<<<
 *             return lex.lower
 *         elif feat_name == NORM:
 */
  }

  /* "lexeme.pxd":60
 *         elif feat_name == LOWER:
 *             return lex.lower
 *         elif feat_name == NORM:             # <<<<<<<<<<<<<<
 *             return lex.norm
 *         elif feat_name == SHAPE:
 */
  __pyx_t_1 = ((__pyx_v_feat_name == __pyx_e_5spacy_5attrs_NORM) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":61
 *             return lex.lower
 *         elif feat_name == NORM:
 *             return lex.norm             # <<<<<<<<<<<<<<
 *         elif feat_name == SHAPE:
 *             return lex.shape
 */
    __pyx_r = __pyx_v_lex->norm;
    goto __pyx_L0;

    /* "lexeme.pxd":60
 *         elif feat_name == LOWER:
 *             return lex.lower
 *         elif feat_name == NORM:             # <<<<<<<<<<<<<<
 *             return lex.norm
 *         elif feat_name == SHAPE:
 */
  }

  /* "lexeme.pxd":62
 *         elif feat_name == NORM:
 *             return lex.norm
 *         elif feat_name == SHAPE:             # <<<<<<<<<<<<<<
 *             return lex.shape
 *         elif feat_name == PREFIX:
 */
  __pyx_t_1 = ((__pyx_v_feat_name == __pyx_e_5spacy_5attrs_SHAPE) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":63
 *             return lex.norm
 *         elif feat_name == SHAPE:
 *             return lex.shape             # <<<<<<<<<<<<<<
 *         elif feat_name == PREFIX:
 *             return lex.prefix
 */
    __pyx_r = __pyx_v_lex->shape;
    goto __pyx_L0;

    /* "lexeme.pxd":62
 *         elif feat_name == NORM:
 *             return lex.norm
 *         elif feat_name == SHAPE:             # <<<<<<<<<<<<<<
 *             return lex.shape
 *         elif feat_name == PREFIX:
 */
  }

  /* "lexeme.pxd":64
 *         elif feat_name == SHAPE:
 *             return lex.shape
 *         elif feat_name == PREFIX:             # <<<<<<<<<<<<<<
 *             return lex.prefix
 *         elif feat_name == SUFFIX:
 */
  __pyx_t_1 = ((__pyx_v_feat_name == __pyx_e_5spacy_5attrs_PREFIX) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":65
 *             return lex.shape
 *         elif feat_name == PREFIX:
 *             return lex.prefix             # <<<<<<<<<<<<<<
 *         elif feat_name == SUFFIX:
 *             return lex.suffix
 */
    __pyx_r = __pyx_v_lex->prefix;
    goto __pyx_L0;

    /* "lexeme.pxd":64
 *         elif feat_name == SHAPE:
 *             return lex.shape
 *         elif feat_name == PREFIX:             # <<<<<<<<<<<<<<
 *             return lex.prefix
 *         elif feat_name == SUFFIX:
 */
  }

  /* "lexeme.pxd":66
 *         elif feat_name == PREFIX:
 *             return lex.prefix
 *         elif feat_name == SUFFIX:             # <<<<<<<<<<<<<<
 *             return lex.suffix
 *         elif feat_name == LENGTH:
 */
  __pyx_t_1 = ((__pyx_v_feat_name == __pyx_e_5spacy_5attrs_SUFFIX) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":67
 *             return lex.prefix
 *         elif feat_name == SUFFIX:
 *             return lex.suffix             # <<<<<<<<<<<<<<
 *         elif feat_name == LENGTH:
 *             return lex.length
 */
    __pyx_r = __pyx_v_lex->suffix;
    goto __pyx_L0;

    /* "lexeme.pxd":66
 *         elif feat_name == PREFIX:
 *             return lex.prefix
 *         elif feat_name == SUFFIX:             # <<<<<<<<<<<<<<
 *             return lex.suffix
 *         elif feat_name == LENGTH:
 */
  }

  /* "lexeme.pxd":68
 *         elif feat_name == SUFFIX:
 *             return lex.suffix
 *         elif feat_name == LENGTH:             # <<<<<<<<<<<<<<
 *             return lex.length
 *         elif feat_name == CLUSTER:
 */
  __pyx_t_1 = ((__pyx_v_feat_name == __pyx_e_5spacy_5attrs_LENGTH) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":69
 *             return lex.suffix
 *         elif feat_name == LENGTH:
 *             return lex.length             # <<<<<<<<<<<<<<
 *         elif feat_name == CLUSTER:
 *             return lex.cluster
 */
    __pyx_r = __pyx_v_lex->length;
    goto __pyx_L0;

    /* "lexeme.pxd":68
 *         elif feat_name == SUFFIX:
 *             return lex.suffix
 *         elif feat_name == LENGTH:             # <<<<<<<<<<<<<<
 *             return lex.length
 *         elif feat_name == CLUSTER:
 */
  }

  /* "lexeme.pxd":70
 *         elif feat_name == LENGTH:
 *             return lex.length
 *         elif feat_name == CLUSTER:             # <<<<<<<<<<<<<<
 *             return lex.cluster
 *         elif feat_name == LANG:
 */
  __pyx_t_1 = ((__pyx_v_feat_name == __pyx_e_5spacy_5attrs_CLUSTER) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":71
 *             return lex.length
 *         elif feat_name == CLUSTER:
 *             return lex.cluster             # <<<<<<<<<<<<<<
 *         elif feat_name == LANG:
 *             return lex.lang
 */
    __pyx_r = __pyx_v_lex->cluster;
    goto __pyx_L0;

    /* "lexeme.pxd":70
 *         elif feat_name == LENGTH:
 *             return lex.length
 *         elif feat_name == CLUSTER:             # <<<<<<<<<<<<<<
 *             return lex.cluster
 *         elif feat_name == LANG:
 */
  }

  /* "lexeme.pxd":72
 *         elif feat_name == CLUSTER:
 *             return lex.cluster
 *         elif feat_name == LANG:             # <<<<<<<<<<<<<<
 *             return lex.lang
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_feat_name == __pyx_e_5spacy_5attrs_LANG) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":73
 *             return lex.cluster
 *         elif feat_name == LANG:
 *             return lex.lang             # <<<<<<<<<<<<<<
 *         else:
 *             return 0
 */
    __pyx_r = __pyx_v_lex->lang;
    goto __pyx_L0;

    /* "lexeme.pxd":72
 *         elif feat_name == CLUSTER:
 *             return lex.cluster
 *         elif feat_name == LANG:             # <<<<<<<<<<<<<<
 *             return lex.lang
 *         else:
 */
  }

  /* "lexeme.pxd":75
 *             return lex.lang
 *         else:
 *             return 0             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  /*else*/ {
    __pyx_r = 0;
    goto __pyx_L0;
  }

  /* "lexeme.pxd":48
 * 
 *     @staticmethod
 *     cdef inline attr_t get_struct_attr(const LexemeC* lex, attr_id_t feat_name) nogil:             # <<<<<<<<<<<<<<
 *         if feat_name < (sizeof(flags_t) * 8):
 *             if Lexeme.c_check_flag(lex, feat_name):
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "lexeme.pxd":78
 * 
 *     @staticmethod
 *     cdef inline bint c_check_flag(const LexemeC* lexeme, attr_id_t flag_id) nogil:             # <<<<<<<<<<<<<<
 *         cdef flags_t one = 1
 *         if lexeme.flags & (one << flag_id):
 */

static CYTHON_INLINE int __pyx_f_5spacy_6lexeme_6Lexeme_c_check_flag(struct __pyx_t_5spacy_7structs_LexemeC const *__pyx_v_lexeme, enum __pyx_t_5spacy_5attrs_attr_id_t __pyx_v_flag_id) {
  __pyx_t_5spacy_8typedefs_flags_t __pyx_v_one;
  int __pyx_r;
  int __pyx_t_1;

  /* "lexeme.pxd":79
 *     @staticmethod
 *     cdef inline bint c_check_flag(const LexemeC* lexeme, attr_id_t flag_id) nogil:
 *         cdef flags_t one = 1             # <<<<<<<<<<<<<<
 *         if lexeme.flags & (one << flag_id):
 *             return True
 */
  __pyx_v_one = 1;

  /* "lexeme.pxd":80
 *     cdef inline bint c_check_flag(const LexemeC* lexeme, attr_id_t flag_id) nogil:
 *         cdef flags_t one = 1
 *         if lexeme.flags & (one << flag_id):             # <<<<<<<<<<<<<<
 *             return True
 *         else:
 */
  __pyx_t_1 = ((__pyx_v_lexeme->flags & (__pyx_v_one << __pyx_v_flag_id)) != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":81
 *         cdef flags_t one = 1
 *         if lexeme.flags & (one << flag_id):
 *             return True             # <<<<<<<<<<<<<<
 *         else:
 *             return False
 */
    __pyx_r = 1;
    goto __pyx_L0;

    /* "lexeme.pxd":80
 *     cdef inline bint c_check_flag(const LexemeC* lexeme, attr_id_t flag_id) nogil:
 *         cdef flags_t one = 1
 *         if lexeme.flags & (one << flag_id):             # <<<<<<<<<<<<<<
 *             return True
 *         else:
 */
  }

  /* "lexeme.pxd":83
 *             return True
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  /*else*/ {
    __pyx_r = 0;
    goto __pyx_L0;
  }

  /* "lexeme.pxd":78
 * 
 *     @staticmethod
 *     cdef inline bint c_check_flag(const LexemeC* lexeme, attr_id_t flag_id) nogil:             # <<<<<<<<<<<<<<
 *         cdef flags_t one = 1
 *         if lexeme.flags & (one << flag_id):
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "lexeme.pxd":86
 * 
 *     @staticmethod
 *     cdef inline bint c_set_flag(LexemeC* lex, attr_id_t flag_id, bint value) nogil:             # <<<<<<<<<<<<<<
 *         cdef flags_t one = 1
 *         if value:
 */

static CYTHON_INLINE int __pyx_f_5spacy_6lexeme_6Lexeme_c_set_flag(struct __pyx_t_5spacy_7structs_LexemeC *__pyx_v_lex, enum __pyx_t_5spacy_5attrs_attr_id_t __pyx_v_flag_id, int __pyx_v_value) {
  __pyx_t_5spacy_8typedefs_flags_t __pyx_v_one;
  int __pyx_r;
  int __pyx_t_1;

  /* "lexeme.pxd":87
 *     @staticmethod
 *     cdef inline bint c_set_flag(LexemeC* lex, attr_id_t flag_id, bint value) nogil:
 *         cdef flags_t one = 1             # <<<<<<<<<<<<<<
 *         if value:
 *             lex.flags |= one << flag_id
 */
  __pyx_v_one = 1;

  /* "lexeme.pxd":88
 *     cdef inline bint c_set_flag(LexemeC* lex, attr_id_t flag_id, bint value) nogil:
 *         cdef flags_t one = 1
 *         if value:             # <<<<<<<<<<<<<<
 *             lex.flags |= one << flag_id
 *         else:
 */
  __pyx_t_1 = (__pyx_v_value != 0);
  if (__pyx_t_1) {

    /* "lexeme.pxd":89
 *         cdef flags_t one = 1
 *         if value:
 *             lex.flags |= one << flag_id             # <<<<<<<<<<<<<<
 *         else:
 *             lex.flags &= ~(one << flag_id)
 */
    __pyx_v_lex->flags = (__pyx_v_lex->flags | (__pyx_v_one << __pyx_v_flag_id));

    /* "lexeme.pxd":88
 *     cdef inline bint c_set_flag(LexemeC* lex, attr_id_t flag_id, bint value) nogil:
 *         cdef flags_t one = 1
 *         if value:             # <<<<<<<<<<<<<<
 *             lex.flags |= one << flag_id
 *         else:
 */
    goto __pyx_L3;
  }

  /* "lexeme.pxd":91
 *             lex.flags |= one << flag_id
 *         else:
 *             lex.flags &= ~(one << flag_id)             # <<<<<<<<<<<<<<
 */
  /*else*/ {
    __pyx_v_lex->flags = (__pyx_v_lex->flags & (~(__pyx_v_one << __pyx_v_flag_id)));
  }
  __pyx_L3:;

  /* "lexeme.pxd":86
 * 
 *     @staticmethod
 *     cdef inline bint c_set_flag(LexemeC* lex, attr_id_t flag_id, bint value) nogil:             # <<<<<<<<<<<<<<
 *         cdef flags_t one = 1
 *         if value:
 */

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "thinc/extra/eg.pxd":25
 * 
 *     @staticmethod
 *     cdef inline Example from_ptr(Pool mem, ExampleC* ptr):             # <<<<<<<<<<<<<<
 *         cdef Example eg = Example.__new__(Example)
 *         eg.mem = mem
 */

static CYTHON_INLINE struct __pyx_obj_5thinc_5extra_2eg_Example *__pyx_f_5thinc_5extra_2eg_7Example_from_ptr(struct __pyx_obj_5cymem_5cymem_Pool *__pyx_v_mem, struct __pyx_t_5thinc_7structs_ExampleC *__pyx_v_ptr) {
  struct __pyx_obj_5thinc_5extra_2eg_Example *__pyx_v_eg = 0;
  struct __pyx_obj_5thinc_5extra_2eg_Example *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("from_ptr", 0);

  /* "thinc/extra/eg.pxd":26
 *     @staticmethod
 *     cdef inline Example from_ptr(Pool mem, ExampleC* ptr):
 *         cdef Example eg = Example.__new__(Example)             # <<<<<<<<<<<<<<
 *         eg.mem = mem
 *         eg.c = ptr[0]
 */
  __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_ptype_5thinc_5extra_2eg_Example), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5thinc_5extra_2eg_Example)))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_eg = ((struct __pyx_obj_5thinc_5extra_2eg_Example *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "thinc/extra/eg.pxd":27
 *     cdef inline Example from_ptr(Pool mem, ExampleC* ptr):
 *         cdef Example eg = Example.__new__(Example)
 *         eg.mem = mem             # <<<<<<<<<<<<<<
 *         eg.c = ptr[0]
 *         return eg
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_mem));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_mem));
  __Pyx_GOTREF(__pyx_v_eg->mem);
  __Pyx_DECREF(((PyObject *)__pyx_v_eg->mem));
  __pyx_v_eg->mem = __pyx_v_mem;

  /* "thinc/extra/eg.pxd":28
 *         cdef Example eg = Example.__new__(Example)
 *         eg.mem = mem
 *         eg.c = ptr[0]             # <<<<<<<<<<<<<<
 *         return eg
 * 
 */
  __pyx_v_eg->c = (__pyx_v_ptr[0]);

  /* "thinc/extra/eg.pxd":29
 *         eg.mem = mem
 *         eg.c = ptr[0]
 *         return eg             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_eg));
  __pyx_r = __pyx_v_eg;
  goto __pyx_L0;

  /* "thinc/extra/eg.pxd":25
 * 
 *     @staticmethod
 *     cdef inline Example from_ptr(Pool mem, ExampleC* ptr):             # <<<<<<<<<<<<<<
 *         cdef Example eg = Example.__new__(Example)
 *         eg.mem = mem
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("thinc.extra.eg.Example.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_eg);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "thinc/extra/eg.pxd":32
 * 
 *     @staticmethod
 *     cdef inline void init(ExampleC* self, Pool mem, model_shape,             # <<<<<<<<<<<<<<
 *                           blocks_per_layer) except *:
 *         raise NotImplementedError
 */

static CYTHON_INLINE void __pyx_f_5thinc_5extra_2eg_7Example_init(CYTHON_UNUSED struct __pyx_t_5thinc_7structs_ExampleC *__pyx_v_self, CYTHON_UNUSED struct __pyx_obj_5cymem_5cymem_Pool *__pyx_v_mem, CYTHON_UNUSED PyObject *__pyx_v_model_shape, CYTHON_UNUSED PyObject *__pyx_v_blocks_per_layer) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init", 0);

  /* "thinc/extra/eg.pxd":34
 *     cdef inline void init(ExampleC* self, Pool mem, model_shape,
 *                           blocks_per_layer) except *:
 *         raise NotImplementedError             # <<<<<<<<<<<<<<
 *         # Revise this/make consistent with the Python-land reset_x() stuff
 *         #if len(model_shape) >= 2:
 */
  __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0);
  {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "thinc/extra/eg.pxd":32
 * 
 *     @staticmethod
 *     cdef inline void init(ExampleC* self, Pool mem, model_shape,             # <<<<<<<<<<<<<<
 *                           blocks_per_layer) except *:
 *         raise NotImplementedError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("thinc.extra.eg.Example.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
}
static struct __pyx_vtabstruct_5spacy_6syntax_6parser_ParserModel __pyx_vtable_5spacy_6syntax_6parser_ParserModel;

static PyObject *__pyx_tp_new_5spacy_6syntax_6parser_ParserModel(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *p;
  PyObject *o = __pyx_ptype_5thinc_6linear_7avgtron_AveragedPerceptron->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5thinc_6linear_7avgtron_AveragedPerceptron*)__pyx_vtabptr_5spacy_6syntax_6parser_ParserModel;
  return o;
}

static void __pyx_tp_dealloc_5spacy_6syntax_6parser_ParserModel(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  PyObject_GC_Track(o);
  if (likely(__pyx_ptype_5thinc_6linear_7avgtron_AveragedPerceptron)) __pyx_ptype_5thinc_6linear_7avgtron_AveragedPerceptron->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_5spacy_6syntax_6parser_ParserModel);
}

static int __pyx_tp_traverse_5spacy_6syntax_6parser_ParserModel(PyObject *o, visitproc v, void *a) {
  int e;
  e = ((likely(__pyx_ptype_5thinc_6linear_7avgtron_AveragedPerceptron)) ? ((__pyx_ptype_5thinc_6linear_7avgtron_AveragedPerceptron->tp_traverse) ? __pyx_ptype_5thinc_6linear_7avgtron_AveragedPerceptron->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_5spacy_6syntax_6parser_ParserModel)); if (e) return e;
  return 0;
}

static int __pyx_tp_clear_5spacy_6syntax_6parser_ParserModel(PyObject *o) {
  if (likely(__pyx_ptype_5thinc_6linear_7avgtron_AveragedPerceptron)) { if (__pyx_ptype_5thinc_6linear_7avgtron_AveragedPerceptron->tp_clear) __pyx_ptype_5thinc_6linear_7avgtron_AveragedPerceptron->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5spacy_6syntax_6parser_ParserModel);
  return 0;
}

static PyTypeObject __pyx_type_5spacy_6syntax_6parser_ParserModel = {
  PyVarObject_HEAD_INIT(0, 0)
  "spacy.syntax.parser.ParserModel", /*tp_name*/
  sizeof(struct __pyx_obj_5spacy_6syntax_6parser_ParserModel), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5spacy_6syntax_6parser_ParserModel, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5spacy_6syntax_6parser_ParserModel, /*tp_traverse*/
  __pyx_tp_clear_5spacy_6syntax_6parser_ParserModel, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5spacy_6syntax_6parser_ParserModel, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_5spacy_6syntax_6parser_Parser __pyx_vtable_5spacy_6syntax_6parser_Parser;

static PyObject *__pyx_tp_new_5spacy_6syntax_6parser_Parser(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5spacy_6syntax_6parser_Parser *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)o);
  p->__pyx_vtab = __pyx_vtabptr_5spacy_6syntax_6parser_Parser;
  p->vocab = ((struct __pyx_obj_5spacy_5vocab_Vocab *)Py_None); Py_INCREF(Py_None);
  p->model = ((struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *)Py_None); Py_INCREF(Py_None);
  p->moves = ((struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem *)Py_None); Py_INCREF(Py_None);
  p->cfg = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5spacy_6syntax_6parser_Parser(PyObject *o) {
  struct __pyx_obj_5spacy_6syntax_6parser_Parser *p = (struct __pyx_obj_5spacy_6syntax_6parser_Parser *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->vocab);
  Py_CLEAR(p->model);
  Py_CLEAR(p->moves);
  Py_CLEAR(p->cfg);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5spacy_6syntax_6parser_Parser(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5spacy_6syntax_6parser_Parser *p = (struct __pyx_obj_5spacy_6syntax_6parser_Parser *)o;
  if (p->vocab) {
    e = (*v)(((PyObject*)p->vocab), a); if (e) return e;
  }
  if (p->model) {
    e = (*v)(((PyObject*)p->model), a); if (e) return e;
  }
  if (p->moves) {
    e = (*v)(((PyObject*)p->moves), a); if (e) return e;
  }
  if (p->cfg) {
    e = (*v)(p->cfg, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5spacy_6syntax_6parser_Parser(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5spacy_6syntax_6parser_Parser *p = (struct __pyx_obj_5spacy_6syntax_6parser_Parser *)o;
  tmp = ((PyObject*)p->vocab);
  p->vocab = ((struct __pyx_obj_5spacy_5vocab_Vocab *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->model);
  p->model = ((struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->moves);
  p->moves = ((struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->cfg);
  p->cfg = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5spacy_6syntax_6parser_6Parser_vocab(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5spacy_6syntax_6parser_6Parser_5vocab_1__get__(o);
}

static PyObject *__pyx_getprop_5spacy_6syntax_6parser_6Parser_model(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5spacy_6syntax_6parser_6Parser_5model_1__get__(o);
}

static PyObject *__pyx_getprop_5spacy_6syntax_6parser_6Parser_moves(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5spacy_6syntax_6parser_6Parser_5moves_1__get__(o);
}

static PyObject *__pyx_getprop_5spacy_6syntax_6parser_6Parser_cfg(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5spacy_6syntax_6parser_6Parser_3cfg_1__get__(o);
}

static PyMethodDef __pyx_methods_5spacy_6syntax_6parser_Parser[] = {
  {"load", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_6Parser_1load, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce__", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_6Parser_5__reduce__, METH_NOARGS, 0},
  {"pipe", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_6Parser_9pipe, METH_VARARGS|METH_KEYWORDS, 0},
  {"update", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_6Parser_12update, METH_VARARGS|METH_KEYWORDS, 0},
  {"step_through", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_6Parser_14step_through, METH_O, 0},
  {"from_transition_sequence", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_6Parser_16from_transition_sequence, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_label", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_6Parser_18add_label, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5spacy_6syntax_6parser_Parser[] = {
  {(char *)"vocab", __pyx_getprop_5spacy_6syntax_6parser_6Parser_vocab, 0, 0, 0},
  {(char *)"model", __pyx_getprop_5spacy_6syntax_6parser_6Parser_model, 0, 0, 0},
  {(char *)"moves", __pyx_getprop_5spacy_6syntax_6parser_6Parser_moves, 0, 0, 0},
  {(char *)"cfg", __pyx_getprop_5spacy_6syntax_6parser_6Parser_cfg, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5spacy_6syntax_6parser_Parser = {
  PyVarObject_HEAD_INIT(0, 0)
  "spacy.syntax.parser.Parser", /*tp_name*/
  sizeof(struct __pyx_obj_5spacy_6syntax_6parser_Parser), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5spacy_6syntax_6parser_Parser, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  __pyx_pw_5spacy_6syntax_6parser_6Parser_7__call__, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5spacy_6syntax_6parser_Parser, /*tp_traverse*/
  __pyx_tp_clear_5spacy_6syntax_6parser_Parser, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5spacy_6syntax_6parser_Parser, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5spacy_6syntax_6parser_Parser, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5spacy_6syntax_6parser_6Parser_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5spacy_6syntax_6parser_Parser, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_5spacy_6syntax_6parser_StepwiseState(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)o);
  p->stcls = ((struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *)Py_None); Py_INCREF(Py_None);
  p->eg = ((struct __pyx_obj_5thinc_5extra_2eg_Example *)Py_None); Py_INCREF(Py_None);
  p->doc = ((struct __pyx_obj_5spacy_6tokens_3doc_Doc *)Py_None); Py_INCREF(Py_None);
  p->parser = ((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5spacy_6syntax_6parser_StepwiseState(PyObject *o) {
  struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *p = (struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->stcls);
  Py_CLEAR(p->eg);
  Py_CLEAR(p->doc);
  Py_CLEAR(p->parser);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5spacy_6syntax_6parser_StepwiseState(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *p = (struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)o;
  if (p->stcls) {
    e = (*v)(((PyObject*)p->stcls), a); if (e) return e;
  }
  if (p->eg) {
    e = (*v)(((PyObject*)p->eg), a); if (e) return e;
  }
  if (p->doc) {
    e = (*v)(((PyObject*)p->doc), a); if (e) return e;
  }
  if (p->parser) {
    e = (*v)(((PyObject*)p->parser), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5spacy_6syntax_6parser_StepwiseState(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *p = (struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState *)o;
  tmp = ((PyObject*)p->stcls);
  p->stcls = ((struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->eg);
  p->eg = ((struct __pyx_obj_5thinc_5extra_2eg_Example *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->doc);
  p->doc = ((struct __pyx_obj_5spacy_6tokens_3doc_Doc *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->parser);
  p->parser = ((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5spacy_6syntax_6parser_13StepwiseState_stcls(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5spacy_6syntax_6parser_13StepwiseState_5stcls_1__get__(o);
}

static PyObject *__pyx_getprop_5spacy_6syntax_6parser_13StepwiseState_eg(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5spacy_6syntax_6parser_13StepwiseState_2eg_1__get__(o);
}

static PyObject *__pyx_getprop_5spacy_6syntax_6parser_13StepwiseState_doc(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5spacy_6syntax_6parser_13StepwiseState_3doc_1__get__(o);
}

static PyObject *__pyx_getprop_5spacy_6syntax_6parser_13StepwiseState_parser(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5spacy_6syntax_6parser_13StepwiseState_6parser_1__get__(o);
}

static PyMethodDef __pyx_methods_5spacy_6syntax_6parser_StepwiseState[] = {
  {"__enter__", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_3__enter__, METH_NOARGS, 0},
  {"__exit__", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_5__exit__, METH_VARARGS|METH_KEYWORDS, 0},
  {"is_final", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_7is_final, METH_NOARGS, 0},
  {"stack", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_9stack, METH_NOARGS, 0},
  {"queue", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_11queue, METH_NOARGS, 0},
  {"heads", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_13heads, METH_NOARGS, 0},
  {"deps", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_15deps, METH_NOARGS, 0},
  {"predict", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_17predict, METH_NOARGS, 0},
  {"transition", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_19transition, METH_VARARGS|METH_KEYWORDS, 0},
  {"finish", (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_13StepwiseState_21finish, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5spacy_6syntax_6parser_StepwiseState[] = {
  {(char *)"stcls", __pyx_getprop_5spacy_6syntax_6parser_13StepwiseState_stcls, 0, 0, 0},
  {(char *)"eg", __pyx_getprop_5spacy_6syntax_6parser_13StepwiseState_eg, 0, 0, 0},
  {(char *)"doc", __pyx_getprop_5spacy_6syntax_6parser_13StepwiseState_doc, 0, 0, 0},
  {(char *)"parser", __pyx_getprop_5spacy_6syntax_6parser_13StepwiseState_parser, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5spacy_6syntax_6parser_StepwiseState = {
  PyVarObject_HEAD_INIT(0, 0)
  "spacy.syntax.parser.StepwiseState", /*tp_name*/
  sizeof(struct __pyx_obj_5spacy_6syntax_6parser_StepwiseState), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5spacy_6syntax_6parser_StepwiseState, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5spacy_6syntax_6parser_StepwiseState, /*tp_traverse*/
  __pyx_tp_clear_5spacy_6syntax_6parser_StepwiseState, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5spacy_6syntax_6parser_StepwiseState, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5spacy_6syntax_6parser_StepwiseState, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5spacy_6syntax_6parser_13StepwiseState_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5spacy_6syntax_6parser_StepwiseState, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe *__pyx_freelist_5spacy_6syntax_6parser___pyx_scope_struct__pipe[8];
static int __pyx_freecount_5spacy_6syntax_6parser___pyx_scope_struct__pipe = 0;

static PyObject *__pyx_tp_new_5spacy_6syntax_6parser___pyx_scope_struct__pipe(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5spacy_6syntax_6parser___pyx_scope_struct__pipe > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe)))) {
    o = (PyObject*)__pyx_freelist_5spacy_6syntax_6parser___pyx_scope_struct__pipe[--__pyx_freecount_5spacy_6syntax_6parser___pyx_scope_struct__pipe];
    memset(o, 0, sizeof(struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5spacy_6syntax_6parser___pyx_scope_struct__pipe(PyObject *o) {
  struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe *p = (struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_doc);
  Py_CLEAR(p->__pyx_v_mem);
  Py_CLEAR(p->__pyx_v_queue);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_stream);
  Py_CLEAR(p->__pyx_t_0);
  Py_CLEAR(p->__pyx_t_3);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5spacy_6syntax_6parser___pyx_scope_struct__pipe < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe)))) {
    __pyx_freelist_5spacy_6syntax_6parser___pyx_scope_struct__pipe[__pyx_freecount_5spacy_6syntax_6parser___pyx_scope_struct__pipe++] = ((struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5spacy_6syntax_6parser___pyx_scope_struct__pipe(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe *p = (struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe *)o;
  if (p->__pyx_v_doc) {
    e = (*v)(((PyObject*)p->__pyx_v_doc), a); if (e) return e;
  }
  if (p->__pyx_v_mem) {
    e = (*v)(((PyObject*)p->__pyx_v_mem), a); if (e) return e;
  }
  if (p->__pyx_v_queue) {
    e = (*v)(p->__pyx_v_queue, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  if (p->__pyx_v_stream) {
    e = (*v)(p->__pyx_v_stream, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  if (p->__pyx_t_3) {
    e = (*v)(p->__pyx_t_3, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5spacy_6syntax_6parser___pyx_scope_struct__pipe(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe *p = (struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe *)o;
  tmp = ((PyObject*)p->__pyx_v_doc);
  p->__pyx_v_doc = ((struct __pyx_obj_5spacy_6tokens_3doc_Doc *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_mem);
  p->__pyx_v_mem = ((struct __pyx_obj_5cymem_5cymem_Pool *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_queue);
  p->__pyx_v_queue = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_5spacy_6syntax_6parser_Parser *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_stream);
  p->__pyx_v_stream = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_3);
  p->__pyx_t_3 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5spacy_6syntax_6parser___pyx_scope_struct__pipe = {
  PyVarObject_HEAD_INIT(0, 0)
  "spacy.syntax.parser.__pyx_scope_struct__pipe", /*tp_name*/
  sizeof(struct __pyx_obj_5spacy_6syntax_6parser___pyx_scope_struct__pipe), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5spacy_6syntax_6parser___pyx_scope_struct__pipe, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5spacy_6syntax_6parser___pyx_scope_struct__pipe, /*tp_traverse*/
  __pyx_tp_clear_5spacy_6syntax_6parser___pyx_scope_struct__pipe, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5spacy_6syntax_6parser___pyx_scope_struct__pipe, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
  #if PY_VERSION_HEX < 0x03020000
    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
  #else
    PyModuleDef_HEAD_INIT,
  #endif
    "parser",
    __pyx_k_MALT_style_dependency_parser, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s_Config, __pyx_k_Config, sizeof(__pyx_k_Config), 0, 0, 1, 1},
  {&__pyx_n_u_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 1, 0, 1},
  {&__pyx_n_s_DEBUG, __pyx_k_DEBUG, sizeof(__pyx_k_DEBUG), 0, 0, 1, 1},
  {&__pyx_kp_u_Error_analysing_doc_no_valid_act, __pyx_k_Error_analysing_doc_no_valid_act, sizeof(__pyx_k_Error_analysing_doc_no_valid_act), 0, 1, 0, 0},
  {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
  {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
  {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
  {&__pyx_n_u_L, __pyx_k_L, sizeof(__pyx_k_L), 0, 1, 0, 1},
  {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {&__pyx_n_s_OracleError, __pyx_k_OracleError, sizeof(__pyx_k_OracleError), 0, 0, 1, 1},
  {&__pyx_n_s_ParserStateError, __pyx_k_ParserStateError, sizeof(__pyx_k_ParserStateError), 0, 0, 1, 1},
  {&__pyx_n_s_ParserStateError___init, __pyx_k_ParserStateError___init, sizeof(__pyx_k_ParserStateError___init), 0, 0, 1, 1},
  {&__pyx_n_s_Parser_pipe, __pyx_k_Parser_pipe, sizeof(__pyx_k_Parser_pipe), 0, 0, 1, 1},
  {&__pyx_n_s_PseudoProjectivity, __pyx_k_PseudoProjectivity, sizeof(__pyx_k_PseudoProjectivity), 0, 0, 1, 1},
  {&__pyx_n_u_R, __pyx_k_R, sizeof(__pyx_k_R), 0, 1, 0, 1},
  {&__pyx_kp_u_Required_file_s_model_not_found, __pyx_k_Required_file_s_model_not_found, sizeof(__pyx_k_Required_file_s_model_not_found), 0, 1, 0, 0},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_u_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 1, 0, 1},
  {&__pyx_n_s_TransitionSystem, __pyx_k_TransitionSystem, sizeof(__pyx_k_TransitionSystem), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 1, 1},
  {&__pyx_n_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 1},
  {&__pyx_n_s_action_name, __pyx_k_action_name, sizeof(__pyx_k_action_name), 0, 0, 1, 1},
  {&__pyx_n_s_action_types, __pyx_k_action_types, sizeof(__pyx_k_action_types), 0, 0, 1, 1},
  {&__pyx_n_u_actions, __pyx_k_actions, sizeof(__pyx_k_actions), 0, 1, 0, 1},
  {&__pyx_n_s_add_action, __pyx_k_add_action, sizeof(__pyx_k_add_action), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_batch_size, __pyx_k_batch_size, sizeof(__pyx_k_batch_size), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_kp_u_config_json, __pyx_k_config_json, sizeof(__pyx_k_config_json), 0, 1, 0, 0},
  {&__pyx_n_s_costs, __pyx_k_costs, sizeof(__pyx_k_costs), 0, 0, 1, 1},
  {&__pyx_n_u_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 1, 0, 1},
  {&__pyx_n_s_deps, __pyx_k_deps, sizeof(__pyx_k_deps), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_doc_2, __pyx_k_doc_2, sizeof(__pyx_k_doc_2), 0, 0, 1, 1},
  {&__pyx_n_u_embed, __pyx_k_embed, sizeof(__pyx_k_embed), 0, 1, 0, 1},
  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
  {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_feature_templates, __pyx_k_feature_templates, sizeof(__pyx_k_feature_templates), 0, 0, 1, 1},
  {&__pyx_n_u_features, __pyx_k_features, sizeof(__pyx_k_features), 0, 1, 0, 1},
  {&__pyx_n_s_finalize_doc, __pyx_k_finalize_doc, sizeof(__pyx_k_finalize_doc), 0, 0, 1, 1},
  {&__pyx_n_s_finish, __pyx_k_finish, sizeof(__pyx_k_finish), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_get_actions, __pyx_k_get_actions, sizeof(__pyx_k_get_actions), 0, 0, 1, 1},
  {&__pyx_n_s_get_templates, __pyx_k_get_templates, sizeof(__pyx_k_get_templates), 0, 0, 1, 1},
  {&__pyx_n_s_gold, __pyx_k_gold, sizeof(__pyx_k_gold), 0, 0, 1, 1},
  {&__pyx_n_s_guess, __pyx_k_guess, sizeof(__pyx_k_guess), 0, 0, 1, 1},
  {&__pyx_n_s_heads, __pyx_k_heads, sizeof(__pyx_k_heads), 0, 0, 1, 1},
  {&__pyx_kp_s_home_pixie_repos_bdist_builder, __pyx_k_home_pixie_repos_bdist_builder, sizeof(__pyx_k_home_pixie_repos_bdist_builder), 0, 0, 1, 0},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_is_final, __pyx_k_is_final, sizeof(__pyx_k_is_final), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_json, __pyx_k_json, sizeof(__pyx_k_json), 0, 0, 1, 1},
  {&__pyx_n_s_labels, __pyx_k_labels, sizeof(__pyx_k_labels), 0, 0, 1, 1},
  {&__pyx_n_u_labels, __pyx_k_labels, sizeof(__pyx_k_labels), 0, 1, 0, 1},
  {&__pyx_n_s_load, __pyx_k_load, sizeof(__pyx_k_load), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_model, __pyx_k_model, sizeof(__pyx_k_model), 0, 0, 1, 1},
  {&__pyx_n_u_model, __pyx_k_model, sizeof(__pyx_k_model), 0, 1, 0, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_move_name, __pyx_k_move_name, sizeof(__pyx_k_move_name), 0, 0, 1, 1},
  {&__pyx_n_s_n0_n1, __pyx_k_n0_n1, sizeof(__pyx_k_n0_n1), 0, 0, 1, 1},
  {&__pyx_n_s_n_threads, __pyx_k_n_threads, sizeof(__pyx_k_n_threads), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
  {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
  {&__pyx_n_s_ner, __pyx_k_ner, sizeof(__pyx_k_ner), 0, 0, 1, 1},
  {&__pyx_n_u_ner, __pyx_k_ner, sizeof(__pyx_k_ner), 0, 1, 0, 1},
  {&__pyx_n_s_nonproj, __pyx_k_nonproj, sizeof(__pyx_k_nonproj), 0, 0, 1, 1},
  {&__pyx_n_s_nr_atom, __pyx_k_nr_atom, sizeof(__pyx_k_nr_atom), 0, 0, 1, 1},
  {&__pyx_n_s_nr_class, __pyx_k_nr_class, sizeof(__pyx_k_nr_class), 0, 0, 1, 1},
  {&__pyx_n_s_nr_feat, __pyx_k_nr_feat, sizeof(__pyx_k_nr_feat), 0, 0, 1, 1},
  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_os_path, __pyx_k_os_path, sizeof(__pyx_k_os_path), 0, 0, 1, 1},
  {&__pyx_n_s_parse_features, __pyx_k_parse_features, sizeof(__pyx_k_parse_features), 0, 0, 1, 1},
  {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_pf, __pyx_k_pf, sizeof(__pyx_k_pf), 0, 0, 1, 1},
  {&__pyx_n_s_pipe, __pyx_k_pipe, sizeof(__pyx_k_pipe), 0, 0, 1, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_predict, __pyx_k_predict, sizeof(__pyx_k_predict), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_queue, __pyx_k_queue, sizeof(__pyx_k_queue), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_require, __pyx_k_require, sizeof(__pyx_k_require), 0, 0, 1, 1},
  {&__pyx_n_s_reset, __pyx_k_reset, sizeof(__pyx_k_reset), 0, 0, 1, 1},
  {&__pyx_n_s_s0_n0, __pyx_k_s0_n0, sizeof(__pyx_k_s0_n0), 0, 0, 1, 1},
  {&__pyx_n_s_s0_n1, __pyx_k_s0_n1, sizeof(__pyx_k_s0_n1), 0, 0, 1, 1},
  {&__pyx_n_s_s1_n0, __pyx_k_s1_n0, sizeof(__pyx_k_s1_n0), 0, 0, 1, 1},
  {&__pyx_n_s_s1_s0, __pyx_k_s1_s0, sizeof(__pyx_k_s1_s0), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_sequence, __pyx_k_sequence, sizeof(__pyx_k_sequence), 0, 0, 1, 1},
  {&__pyx_n_s_set_debug, __pyx_k_set_debug, sizeof(__pyx_k_set_debug), 0, 0, 1, 1},
  {&__pyx_n_s_shutil, __pyx_k_shutil, sizeof(__pyx_k_shutil), 0, 0, 1, 1},
  {&__pyx_n_s_spacy_syntax_parser, __pyx_k_spacy_syntax_parser, sizeof(__pyx_k_spacy_syntax_parser), 0, 0, 1, 1},
  {&__pyx_n_s_stack, __pyx_k_stack, sizeof(__pyx_k_stack), 0, 0, 1, 1},
  {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
  {&__pyx_n_s_step_through, __pyx_k_step_through, sizeof(__pyx_k_step_through), 0, 0, 1, 1},
  {&__pyx_n_s_stream, __pyx_k_stream, sizeof(__pyx_k_stream), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_tags, __pyx_k_tags, sizeof(__pyx_k_tags), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_tokens, __pyx_k_tokens, sizeof(__pyx_k_tokens), 0, 0, 1, 1},
  {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_transition, __pyx_k_transition, sizeof(__pyx_k_transition), 0, 0, 1, 1},
  {&__pyx_n_s_transition_system, __pyx_k_transition_system, sizeof(__pyx_k_transition_system), 0, 0, 1, 1},
  {&__pyx_n_s_tree_shape, __pyx_k_tree_shape, sizeof(__pyx_k_tree_shape), 0, 0, 1, 1},
  {&__pyx_n_s_trigrams, __pyx_k_trigrams, sizeof(__pyx_k_trigrams), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_unigrams, __pyx_k_unigrams, sizeof(__pyx_k_unigrams), 0, 0, 1, 1},
  {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
  {&__pyx_n_s_util, __pyx_k_util, sizeof(__pyx_k_util), 0, 0, 1, 1},
  {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_vocab, __pyx_k_vocab, sizeof(__pyx_k_vocab), 0, 0, 1, 1},
  {&__pyx_n_s_words, __pyx_k_words, sizeof(__pyx_k_words), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "spacy/syntax/parser.pyx":63
 *     elif name == 'debug':
 *         return pf.unigrams
 *     elif name.startswith('embed'):             # <<<<<<<<<<<<<<
 *         return (pf.words, pf.tags, pf.labels)
 *     else:
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_u_embed); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "spacy/syntax/parser.pyx":79
 *     @classmethod
 *     def load(cls, path, Vocab vocab, TransitionSystem=None, require=False):
 *         with (path / 'config.json').open() as file_:             # <<<<<<<<<<<<<<
 *             cfg = json.load(file_)
 *         # TODO: remove this shim when we don't have to support older data
 */
  __pyx_tuple__2 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "spacy/syntax/parser.pyx":83
 *         # TODO: remove this shim when we don't have to support older data
 *         if 'labels' in cfg:
 *             cfg['actions'] = cfg.pop('labels')             # <<<<<<<<<<<<<<
 *         self = cls(vocab, TransitionSystem=TransitionSystem, model=None, **cfg)
 *         if (path / 'model').exists():
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_n_u_labels); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "spacy/syntax/parser.pyx":225
 * 
 *     def from_transition_sequence(self, Doc doc, sequence):
 *         with self.step_through(doc) as stepwise:             # <<<<<<<<<<<<<<
 *             for transition in sequence:
 *                 stepwise.transition(transition)
 */
  __pyx_tuple__4 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799
 * 
 *         if (end - f) - <int>(new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "../../.env/local/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "spacy/syntax/parser.pyx":52
 * 
 * DEBUG = False
 * def set_debug(val):             # <<<<<<<<<<<<<<
 *     global DEBUG
 *     DEBUG = val
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_n_s_val); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);
  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_pixie_repos_bdist_builder, __pyx_n_s_set_debug, 52, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "spacy/syntax/parser.pyx":57
 * 
 * 
 * def get_templates(name):             # <<<<<<<<<<<<<<
 *     pf = _parse_features
 *     if name == 'ner':
 */
  __pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_s_name, __pyx_n_s_pf); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);
  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_pixie_repos_bdist_builder, __pyx_n_s_get_templates, 57, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "spacy/syntax/parser.pyx":314
 * 
 * class ParserStateError(ValueError):
 *     def __init__(self, doc):             # <<<<<<<<<<<<<<
 *         ValueError.__init__(self,
 *             "Error analysing doc -- no valid actions available. This should "
 */
  __pyx_tuple__17 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_doc); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);
  __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_pixie_repos_bdist_builder, __pyx_n_s_init, 314, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  /* InitThreads.init */
  #ifdef WITH_THREAD
PyEval_InitThreads();
#endif

if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initparser(void); /*proto*/
PyMODINIT_FUNC initparser(void)
#else
PyMODINIT_FUNC PyInit_parser(void); /*proto*/
PyMODINIT_FUNC PyInit_parser(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_parser(void)", 0);
  if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("parser", __pyx_methods, __pyx_k_MALT_style_dependency_parser, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  if (__pyx_module_is_main_spacy__syntax__parser) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!PyDict_GetItemString(modules, "spacy.syntax.parser")) {
      if (unlikely(PyDict_SetItemString(modules, "spacy.syntax.parser", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  __pyx_ptype_5thinc_6linear_7avgtron_AveragedPerceptron = __Pyx_ImportType("thinc.linear.avgtron", "AveragedPerceptron", sizeof(struct __pyx_obj_5thinc_6linear_7avgtron_AveragedPerceptron), 1); if (unlikely(!__pyx_ptype_5thinc_6linear_7avgtron_AveragedPerceptron)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5thinc_6linear_7avgtron_AveragedPerceptron = (struct __pyx_vtabstruct_5thinc_6linear_7avgtron_AveragedPerceptron*)__Pyx_GetVtable(__pyx_ptype_5thinc_6linear_7avgtron_AveragedPerceptron->tp_dict); if (unlikely(!__pyx_vtabptr_5thinc_6linear_7avgtron_AveragedPerceptron)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5spacy_6syntax_6parser_ParserModel = &__pyx_vtable_5spacy_6syntax_6parser_ParserModel;
  __pyx_vtable_5spacy_6syntax_6parser_ParserModel.__pyx_base = *__pyx_vtabptr_5thinc_6linear_7avgtron_AveragedPerceptron;
  __pyx_vtable_5spacy_6syntax_6parser_ParserModel.set_featuresC = (void (*)(struct __pyx_obj_5spacy_6syntax_6parser_ParserModel *, struct __pyx_t_5thinc_7structs_ExampleC *, __pyx_t_5spacy_6syntax_6_state_StateC const *))__pyx_f_5spacy_6syntax_6parser_11ParserModel_set_featuresC;
  __pyx_type_5spacy_6syntax_6parser_ParserModel.tp_base = __pyx_ptype_5thinc_6linear_7avgtron_AveragedPerceptron;
  if (PyType_Ready(&__pyx_type_5spacy_6syntax_6parser_ParserModel) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5spacy_6syntax_6parser_ParserModel.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_5spacy_6syntax_6parser_ParserModel.tp_dict, __pyx_vtabptr_5spacy_6syntax_6parser_ParserModel) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "ParserModel", (PyObject *)&__pyx_type_5spacy_6syntax_6parser_ParserModel) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5spacy_6syntax_6parser_ParserModel = &__pyx_type_5spacy_6syntax_6parser_ParserModel;
  __pyx_vtabptr_5spacy_6syntax_6parser_Parser = &__pyx_vtable_5spacy_6syntax_6parser_Parser;
  __pyx_vtable_5spacy_6syntax_6parser_Parser.parseC = (int (*)(struct __pyx_obj_5spacy_6syntax_6parser_Parser *, struct __pyx_t_5spacy_7structs_TokenC *, int, int, int))__pyx_f_5spacy_6syntax_6parser_6Parser_parseC;
  if (PyType_Ready(&__pyx_type_5spacy_6syntax_6parser_Parser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5spacy_6syntax_6parser_Parser.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_5spacy_6syntax_6parser_Parser.tp_dict, __pyx_vtabptr_5spacy_6syntax_6parser_Parser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "Parser", (PyObject *)&__pyx_type_5spacy_6syntax_6parser_Parser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5spacy_6syntax_6parser_Parser = &__pyx_type_5spacy_6syntax_6parser_Parser;
  if (PyType_Ready(&__pyx_type_5spacy_6syntax_6parser_StepwiseState) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5spacy_6syntax_6parser_StepwiseState.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "StepwiseState", (PyObject *)&__pyx_type_5spacy_6syntax_6parser_StepwiseState) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5spacy_6syntax_6parser_StepwiseState = &__pyx_type_5spacy_6syntax_6parser_StepwiseState;
  if (PyType_Ready(&__pyx_type_5spacy_6syntax_6parser___pyx_scope_struct__pipe) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5spacy_6syntax_6parser___pyx_scope_struct__pipe.tp_print = 0;
  __pyx_ptype_5spacy_6syntax_6parser___pyx_scope_struct__pipe = &__pyx_type_5spacy_6syntax_6parser___pyx_scope_struct__pipe;
  /*--- Type import code ---*/
  __pyx_ptype_5cymem_5cymem_Pool = __Pyx_ImportType("cymem.cymem", "Pool", sizeof(struct __pyx_obj_5cymem_5cymem_Pool), 1); if (unlikely(!__pyx_ptype_5cymem_5cymem_Pool)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5cymem_5cymem_Pool = (struct __pyx_vtabstruct_5cymem_5cymem_Pool*)__Pyx_GetVtable(__pyx_ptype_5cymem_5cymem_Pool->tp_dict); if (unlikely(!__pyx_vtabptr_5cymem_5cymem_Pool)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5cymem_5cymem_Address = __Pyx_ImportType("cymem.cymem", "Address", sizeof(struct __pyx_obj_5cymem_5cymem_Address), 1); if (unlikely(!__pyx_ptype_5cymem_5cymem_Address)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7preshed_4maps_PreshMap = __Pyx_ImportType("preshed.maps", "PreshMap", sizeof(struct __pyx_obj_7preshed_4maps_PreshMap), 1); if (unlikely(!__pyx_ptype_7preshed_4maps_PreshMap)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_7preshed_4maps_PreshMap = (struct __pyx_vtabstruct_7preshed_4maps_PreshMap*)__Pyx_GetVtable(__pyx_ptype_7preshed_4maps_PreshMap->tp_dict); if (unlikely(!__pyx_vtabptr_7preshed_4maps_PreshMap)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7preshed_4maps_PreshMapArray = __Pyx_ImportType("preshed.maps", "PreshMapArray", sizeof(struct __pyx_obj_7preshed_4maps_PreshMapArray), 1); if (unlikely(!__pyx_ptype_7preshed_4maps_PreshMapArray)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_7preshed_4maps_PreshMapArray = (struct __pyx_vtabstruct_7preshed_4maps_PreshMapArray*)__Pyx_GetVtable(__pyx_ptype_7preshed_4maps_PreshMapArray->tp_dict); if (unlikely(!__pyx_vtabptr_7preshed_4maps_PreshMapArray)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5thinc_6linear_8features_ConjunctionExtracter = __Pyx_ImportType("thinc.linear.features", "ConjunctionExtracter", sizeof(struct __pyx_obj_5thinc_6linear_8features_ConjunctionExtracter), 1); if (unlikely(!__pyx_ptype_5thinc_6linear_8features_ConjunctionExtracter)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5thinc_6linear_8features_ConjunctionExtracter = (struct __pyx_vtabstruct_5thinc_6linear_8features_ConjunctionExtracter*)__Pyx_GetVtable(__pyx_ptype_5thinc_6linear_8features_ConjunctionExtracter->tp_dict); if (unlikely(!__pyx_vtabptr_5thinc_6linear_8features_ConjunctionExtracter)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5thinc_6linalg_Matrix = __Pyx_ImportType("thinc.linalg", "Matrix", sizeof(struct __pyx_obj_5thinc_6linalg_Matrix), 1); if (unlikely(!__pyx_ptype_5thinc_6linalg_Matrix)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5thinc_6linalg_Vec = __Pyx_ImportType("thinc.linalg", "Vec", sizeof(struct __pyx_obj_5thinc_6linalg_Vec), 1); if (unlikely(!__pyx_ptype_5thinc_6linalg_Vec)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5thinc_6linalg_Vec = (struct __pyx_vtabstruct_5thinc_6linalg_Vec*)__Pyx_GetVtable(__pyx_ptype_5thinc_6linalg_Vec->tp_dict); if (unlikely(!__pyx_vtabptr_5thinc_6linalg_Vec)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5thinc_6linalg_VecVec = __Pyx_ImportType("thinc.linalg", "VecVec", sizeof(struct __pyx_obj_5thinc_6linalg_VecVec), 1); if (unlikely(!__pyx_ptype_5thinc_6linalg_VecVec)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5thinc_6linalg_VecVec = (struct __pyx_vtabstruct_5thinc_6linalg_VecVec*)__Pyx_GetVtable(__pyx_ptype_5thinc_6linalg_VecVec->tp_dict); if (unlikely(!__pyx_vtabptr_5thinc_6linalg_VecVec)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5thinc_6linalg_MatVec = __Pyx_ImportType("thinc.linalg", "MatVec", sizeof(struct __pyx_obj_5thinc_6linalg_MatVec), 1); if (unlikely(!__pyx_ptype_5thinc_6linalg_MatVec)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5thinc_6linalg_MatVec = (struct __pyx_vtabstruct_5thinc_6linalg_MatVec*)__Pyx_GetVtable(__pyx_ptype_5thinc_6linalg_MatVec->tp_dict); if (unlikely(!__pyx_vtabptr_5thinc_6linalg_MatVec)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5thinc_6linalg_MatMat = __Pyx_ImportType("thinc.linalg", "MatMat", sizeof(struct __pyx_obj_5thinc_6linalg_MatMat), 1); if (unlikely(!__pyx_ptype_5thinc_6linalg_MatMat)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5thinc_6linalg_MatMat = (struct __pyx_vtabstruct_5thinc_6linalg_MatMat*)__Pyx_GetVtable(__pyx_ptype_5thinc_6linalg_MatMat->tp_dict); if (unlikely(!__pyx_vtabptr_5thinc_6linalg_MatMat)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5thinc_5extra_2eg_Example = __Pyx_ImportType("thinc.extra.eg", "Example", sizeof(struct __pyx_obj_5thinc_5extra_2eg_Example), 1); if (unlikely(!__pyx_ptype_5thinc_5extra_2eg_Example)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5thinc_5extra_2eg_Example = (struct __pyx_vtabstruct_5thinc_5extra_2eg_Example*)__Pyx_GetVtable(__pyx_ptype_5thinc_5extra_2eg_Example->tp_dict); if (unlikely(!__pyx_vtabptr_5thinc_5extra_2eg_Example)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5spacy_7strings_StringStore = __Pyx_ImportType("spacy.strings", "StringStore", sizeof(struct __pyx_obj_5spacy_7strings_StringStore), 1); if (unlikely(!__pyx_ptype_5spacy_7strings_StringStore)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5spacy_7strings_StringStore = (struct __pyx_vtabstruct_5spacy_7strings_StringStore*)__Pyx_GetVtable(__pyx_ptype_5spacy_7strings_StringStore->tp_dict); if (unlikely(!__pyx_vtabptr_5spacy_7strings_StringStore)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5spacy_10morphology_Morphology = __Pyx_ImportType("spacy.morphology", "Morphology", sizeof(struct __pyx_obj_5spacy_10morphology_Morphology), 1); if (unlikely(!__pyx_ptype_5spacy_10morphology_Morphology)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5spacy_10morphology_Morphology = (struct __pyx_vtabstruct_5spacy_10morphology_Morphology*)__Pyx_GetVtable(__pyx_ptype_5spacy_10morphology_Morphology->tp_dict); if (unlikely(!__pyx_vtabptr_5spacy_10morphology_Morphology)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5spacy_5vocab_Vocab = __Pyx_ImportType("spacy.vocab", "Vocab", sizeof(struct __pyx_obj_5spacy_5vocab_Vocab), 1); if (unlikely(!__pyx_ptype_5spacy_5vocab_Vocab)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5spacy_5vocab_Vocab = (struct __pyx_vtabstruct_5spacy_5vocab_Vocab*)__Pyx_GetVtable(__pyx_ptype_5spacy_5vocab_Vocab->tp_dict); if (unlikely(!__pyx_vtabptr_5spacy_5vocab_Vocab)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
  #if CYTHON_COMPILING_IN_PYPY
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5spacy_6lexeme_Lexeme = __Pyx_ImportType("spacy.lexeme", "Lexeme", sizeof(struct __pyx_obj_5spacy_6lexeme_Lexeme), 1); if (unlikely(!__pyx_ptype_5spacy_6lexeme_Lexeme)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5spacy_6lexeme_Lexeme = (struct __pyx_vtabstruct_5spacy_6lexeme_Lexeme*)__Pyx_GetVtable(__pyx_ptype_5spacy_6lexeme_Lexeme->tp_dict); if (unlikely(!__pyx_vtabptr_5spacy_6lexeme_Lexeme)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5spacy_6syntax_10stateclass_StateClass = __Pyx_ImportType("spacy.syntax.stateclass", "StateClass", sizeof(struct __pyx_obj_5spacy_6syntax_10stateclass_StateClass), 1); if (unlikely(!__pyx_ptype_5spacy_6syntax_10stateclass_StateClass)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5spacy_6syntax_10stateclass_StateClass = (struct __pyx_vtabstruct_5spacy_6syntax_10stateclass_StateClass*)__Pyx_GetVtable(__pyx_ptype_5spacy_6syntax_10stateclass_StateClass->tp_dict); if (unlikely(!__pyx_vtabptr_5spacy_6syntax_10stateclass_StateClass)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5spacy_4gold_GoldParse = __Pyx_ImportType("spacy.gold", "GoldParse", sizeof(struct __pyx_obj_5spacy_4gold_GoldParse), 1); if (unlikely(!__pyx_ptype_5spacy_4gold_GoldParse)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5spacy_6syntax_17transition_system_TransitionSystem = __Pyx_ImportType("spacy.syntax.transition_system", "TransitionSystem", sizeof(struct __pyx_obj_5spacy_6syntax_17transition_system_TransitionSystem), 1); if (unlikely(!__pyx_ptype_5spacy_6syntax_17transition_system_TransitionSystem)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5spacy_6syntax_17transition_system_TransitionSystem = (struct __pyx_vtabstruct_5spacy_6syntax_17transition_system_TransitionSystem*)__Pyx_GetVtable(__pyx_ptype_5spacy_6syntax_17transition_system_TransitionSystem->tp_dict); if (unlikely(!__pyx_vtabptr_5spacy_6syntax_17transition_system_TransitionSystem)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5spacy_6syntax_9arc_eager_ArcEager = __Pyx_ImportType("spacy.syntax.arc_eager", "ArcEager", sizeof(struct __pyx_obj_5spacy_6syntax_9arc_eager_ArcEager), 1); if (unlikely(!__pyx_ptype_5spacy_6syntax_9arc_eager_ArcEager)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5spacy_6syntax_9arc_eager_ArcEager = (struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_ArcEager*)__Pyx_GetVtable(__pyx_ptype_5spacy_6syntax_9arc_eager_ArcEager->tp_dict); if (unlikely(!__pyx_vtabptr_5spacy_6syntax_9arc_eager_ArcEager)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7preshed_7counter_PreshCounter = __Pyx_ImportType("preshed.counter", "PreshCounter", sizeof(struct __pyx_obj_7preshed_7counter_PreshCounter), 1); if (unlikely(!__pyx_ptype_7preshed_7counter_PreshCounter)) {__pyx_filename = __pyx_f[16]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_7preshed_7counter_PreshCounter = (struct __pyx_vtabstruct_7preshed_7counter_PreshCounter*)__Pyx_GetVtable(__pyx_ptype_7preshed_7counter_PreshCounter->tp_dict); if (unlikely(!__pyx_vtabptr_7preshed_7counter_PreshCounter)) {__pyx_filename = __pyx_f[16]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5spacy_6tokens_3doc_Doc = __Pyx_ImportType("spacy.tokens.doc", "Doc", sizeof(struct __pyx_obj_5spacy_6tokens_3doc_Doc), 1); if (unlikely(!__pyx_ptype_5spacy_6tokens_3doc_Doc)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_5spacy_6tokens_3doc_Doc = (struct __pyx_vtabstruct_5spacy_6tokens_3doc_Doc*)__Pyx_GetVtable(__pyx_ptype_5spacy_6tokens_3doc_Doc->tp_dict); if (unlikely(!__pyx_vtabptr_5spacy_6tokens_3doc_Doc)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Variable import code ---*/
  __pyx_t_1 = __Pyx_ImportModule("spacy.vocab"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "EMPTY_LEXEME", (void **)&__pyx_vp_5spacy_5vocab_EMPTY_LEXEME, "struct __pyx_t_5spacy_7structs_LexemeC") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_ImportModule("spacy.lexeme"); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ImportVoidPtr(__pyx_t_2, "EMPTY_LEXEME", (void **)&__pyx_vp_5spacy_6lexeme_EMPTY_LEXEME, "struct __pyx_t_5spacy_7structs_LexemeC") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  /*--- Function import code ---*/
  __pyx_t_3 = __Pyx_ImportModule("preshed.maps"); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ImportFunction(__pyx_t_3, "map_get", (void (**)(void))&__pyx_f_7preshed_4maps_map_get, "void *(struct __pyx_t_7preshed_4maps_MapStruct const *, __pyx_t_7preshed_4maps_key_t const )") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ImportFunction(__pyx_t_3, "map_set", (void (**)(void))&__pyx_f_7preshed_4maps_map_set, "void (struct __pyx_obj_5cymem_5cymem_Pool *, struct __pyx_t_7preshed_4maps_MapStruct *, __pyx_t_7preshed_4maps_key_t, void *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ImportFunction(__pyx_t_3, "map_init", (void (**)(void))&__pyx_f_7preshed_4maps_map_init, "void (struct __pyx_obj_5cymem_5cymem_Pool *, struct __pyx_t_7preshed_4maps_MapStruct *, size_t)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_ImportModule("murmurhash.mrmr"); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ImportFunction(__pyx_t_4, "hash64", (void (**)(void))&__pyx_f_10murmurhash_4mrmr_hash64, "uint64_t (void *, int, uint64_t)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __Pyx_ImportModule("spacy.syntax._parse_features"); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ImportFunction(__pyx_t_5, "fill_context", (void (**)(void))&__pyx_f_5spacy_6syntax_15_parse_features_fill_context, "int (__pyx_t_5thinc_8typedefs_atom_t *, __pyx_t_5spacy_6syntax_6_state_StateC const *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif

  /* "spacy/syntax/parser.pyx":15
 * from libc.string cimport memset, memcpy
 * from libc.stdlib cimport malloc, calloc, free
 * import os.path             # <<<<<<<<<<<<<<
 * from os import path
 * import shutil
 */
  __pyx_t_6 = __Pyx_Import(__pyx_n_s_os_path, 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "spacy/syntax/parser.pyx":16
 * from libc.stdlib cimport malloc, calloc, free
 * import os.path
 * from os import path             # <<<<<<<<<<<<<<
 * import shutil
 * import json
 */
  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_path);
  __Pyx_GIVEREF(__pyx_n_s_path);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_path);
  __pyx_t_7 = __Pyx_Import(__pyx_n_s_os, __pyx_t_6, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_path, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "spacy/syntax/parser.pyx":17
 * import os.path
 * from os import path
 * import shutil             # <<<<<<<<<<<<<<
 * import json
 * import sys
 */
  __pyx_t_7 = __Pyx_Import(__pyx_n_s_shutil, 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_shutil, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "spacy/syntax/parser.pyx":18
 * from os import path
 * import shutil
 * import json             # <<<<<<<<<<<<<<
 * import sys
 * from .nonproj import PseudoProjectivity
 */
  __pyx_t_7 = __Pyx_Import(__pyx_n_s_json, 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_json, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "spacy/syntax/parser.pyx":19
 * import shutil
 * import json
 * import sys             # <<<<<<<<<<<<<<
 * from .nonproj import PseudoProjectivity
 * 
 */
  __pyx_t_7 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "spacy/syntax/parser.pyx":20
 * import json
 * import sys
 * from .nonproj import PseudoProjectivity             # <<<<<<<<<<<<<<
 * 
 * from cymem.cymem cimport Pool, Address
 */
  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_n_s_PseudoProjectivity);
  __Pyx_GIVEREF(__pyx_n_s_PseudoProjectivity);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_PseudoProjectivity);
  __pyx_t_6 = __Pyx_Import(__pyx_n_s_nonproj, __pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_PseudoProjectivity); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PseudoProjectivity, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "spacy/syntax/parser.pyx":32
 * from thinc.structs cimport FeatureC
 * 
 * from util import Config             # <<<<<<<<<<<<<<
 * 
 * from ..structs cimport TokenC
 */
  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_Config);
  __Pyx_GIVEREF(__pyx_n_s_Config);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_Config);
  __pyx_t_7 = __Pyx_Import(__pyx_n_s_util, __pyx_t_6, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_Config); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Config, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "spacy/syntax/parser.pyx":39
 * from ..strings cimport StringStore
 * 
 * from .transition_system import OracleError             # <<<<<<<<<<<<<<
 * from .transition_system cimport TransitionSystem, Transition
 * 
 */
  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_n_s_OracleError);
  __Pyx_GIVEREF(__pyx_n_s_OracleError);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_OracleError);
  __pyx_t_6 = __Pyx_Import(__pyx_n_s_transition_system, __pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_OracleError); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OracleError, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "spacy/syntax/parser.pyx":44
 * from ..gold cimport GoldParse
 * 
 * from . import _parse_features             # <<<<<<<<<<<<<<
 * from ._parse_features cimport CONTEXT_SIZE
 * from ._parse_features cimport fill_context
 */
  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_n_s_parse_features);
  __Pyx_GIVEREF(__pyx_n_s_parse_features);
  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_parse_features);
  __pyx_t_7 = __Pyx_Import(__pyx_n_s__12, __pyx_t_6, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_parse_features); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_features, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "spacy/syntax/parser.pyx":51
 * 
 * 
 * DEBUG = False             # <<<<<<<<<<<<<<
 * def set_debug(val):
 *     global DEBUG
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "spacy/syntax/parser.pyx":52
 * 
 * DEBUG = False
 * def set_debug(val):             # <<<<<<<<<<<<<<
 *     global DEBUG
 *     DEBUG = val
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_5spacy_6syntax_6parser_1set_debug, NULL, __pyx_n_s_spacy_syntax_parser); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_debug, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "spacy/syntax/parser.pyx":57
 * 
 * 
 * def get_templates(name):             # <<<<<<<<<<<<<<
 *     pf = _parse_features
 *     if name == 'ner':
 */
  __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_5spacy_6syntax_6parser_3get_templates, NULL, __pyx_n_s_spacy_syntax_parser); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_templates, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "spacy/syntax/parser.pyx":78
 * cdef class Parser:
 *     @classmethod
 *     def load(cls, path, Vocab vocab, TransitionSystem=None, require=False):             # <<<<<<<<<<<<<<
 *         with (path / 'config.json').open() as file_:
 *             cfg = json.load(file_)
 */
  __pyx_t_7 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_Parser, __pyx_n_s_load); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "spacy/syntax/parser.pyx":77
 * 
 * cdef class Parser:
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def load(cls, path, Vocab vocab, TransitionSystem=None, require=False):
 *         with (path / 'config.json').open() as file_:
 */
  __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_Parser->tp_dict, __pyx_n_s_load, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_5spacy_6syntax_6parser_Parser);

  /* "spacy/syntax/parser.pyx":259
 * 
 *     @property
 *     def is_final(self):             # <<<<<<<<<<<<<<
 *         return self.stcls.is_final()
 * 
 */
  __pyx_t_6 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_StepwiseState, __pyx_n_s_is_final); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);

  /* "spacy/syntax/parser.pyx":258
 *         self.finish()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def is_final(self):
 *         return self.stcls.is_final()
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_StepwiseState->tp_dict, __pyx_n_s_is_final, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_5spacy_6syntax_6parser_StepwiseState);

  /* "spacy/syntax/parser.pyx":263
 * 
 *     @property
 *     def stack(self):             # <<<<<<<<<<<<<<
 *         return self.stcls.stack
 * 
 */
  __pyx_t_6 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_StepwiseState, __pyx_n_s_stack); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);

  /* "spacy/syntax/parser.pyx":262
 *         return self.stcls.is_final()
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def stack(self):
 *         return self.stcls.stack
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_StepwiseState->tp_dict, __pyx_n_s_stack, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_5spacy_6syntax_6parser_StepwiseState);

  /* "spacy/syntax/parser.pyx":267
 * 
 *     @property
 *     def queue(self):             # <<<<<<<<<<<<<<
 *         return self.stcls.queue
 * 
 */
  __pyx_t_6 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_StepwiseState, __pyx_n_s_queue); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);

  /* "spacy/syntax/parser.pyx":266
 *         return self.stcls.stack
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def queue(self):
 *         return self.stcls.queue
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_StepwiseState->tp_dict, __pyx_n_s_queue, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_5spacy_6syntax_6parser_StepwiseState);

  /* "spacy/syntax/parser.pyx":271
 * 
 *     @property
 *     def heads(self):             # <<<<<<<<<<<<<<
 *         return [self.stcls.H(i) for i in range(self.stcls.c.length)]
 * 
 */
  __pyx_t_6 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_StepwiseState, __pyx_n_s_heads); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);

  /* "spacy/syntax/parser.pyx":270
 *         return self.stcls.queue
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def heads(self):
 *         return [self.stcls.H(i) for i in range(self.stcls.c.length)]
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_StepwiseState->tp_dict, __pyx_n_s_heads, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_5spacy_6syntax_6parser_StepwiseState);

  /* "spacy/syntax/parser.pyx":275
 * 
 *     @property
 *     def deps(self):             # <<<<<<<<<<<<<<
 *         return [self.doc.vocab.strings[self.stcls.c._sent[i].dep]
 *                 for i in range(self.stcls.c.length)]
 */
  __pyx_t_6 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_StepwiseState, __pyx_n_s_deps); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);

  /* "spacy/syntax/parser.pyx":274
 *         return [self.stcls.H(i) for i in range(self.stcls.c.length)]
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def deps(self):
 *         return [self.doc.vocab.strings[self.stcls.c._sent[i].dep]
 */
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5spacy_6syntax_6parser_StepwiseState->tp_dict, __pyx_n_s_deps, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_5spacy_6syntax_6parser_StepwiseState);

  /* "spacy/syntax/parser.pyx":313
 * 
 * 
 * class ParserStateError(ValueError):             # <<<<<<<<<<<<<<
 *     def __init__(self, doc):
 *         ValueError.__init__(self,
 */
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_builtin_ValueError);
  __Pyx_GIVEREF(__pyx_builtin_ValueError);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_builtin_ValueError);
  __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_6, __pyx_n_s_ParserStateError, __pyx_n_s_ParserStateError, (PyObject *) NULL, __pyx_n_s_spacy_syntax_parser, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);

  /* "spacy/syntax/parser.pyx":314
 * 
 * class ParserStateError(ValueError):
 *     def __init__(self, doc):             # <<<<<<<<<<<<<<
 *         ValueError.__init__(self,
 *             "Error analysing doc -- no valid actions available. This should "
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5spacy_6syntax_6parser_16ParserStateError_1__init__, 0, __pyx_n_s_ParserStateError___init, NULL, __pyx_n_s_spacy_syntax_parser, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "spacy/syntax/parser.pyx":313
 * 
 * 
 * class ParserStateError(ValueError):             # <<<<<<<<<<<<<<
 *     def __init__(self, doc):
 *         ValueError.__init__(self,
 */
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ParserStateError, __pyx_t_6, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ParserStateError, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "spacy/syntax/parser.pyx":1
 * # cython: infer_types=True             # <<<<<<<<<<<<<<
 * """
 * MALT-style dependency parser
 */
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "thinc/extra/eg.pxd":32
 * 
 *     @staticmethod
 *     cdef inline void init(ExampleC* self, Pool mem, model_shape,             # <<<<<<<<<<<<<<
 *                           blocks_per_layer) except *:
 *         raise NotImplementedError
 */

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init spacy.syntax.parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init spacy.syntax.parser");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* --- Runtime support code --- */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
}
static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (likely(Py_TYPE(obj) == type)) return 1;
        #if PY_MAJOR_VERSION == 2
        else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(PyObject_TypeCheck(obj, type))) return 1;
    }
    __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
    return 0;
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
#else
    PyErr_GetExcInfo(type, value, tb);
#endif
}
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(type, value, tb);
#endif
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_COMPILING_IN_CPYTHON
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_Restore(type, value, tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(type, value, tb);
#endif
}

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *function = PyMethod_GET_FUNCTION(method);
            result = __Pyx_PyObject_CallOneArg(function, self);
            Py_DECREF(method);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                             int is_tuple, int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    if (!is_tuple && unlikely(!PyTuple_Check(tuple))) {
        iternextfunc iternext;
        iter = PyObject_GetIter(tuple);
        if (unlikely(!iter)) goto bad;
        if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
        iternext = Py_TYPE(iter)->tp_iternext;
        value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
        value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
        if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
        Py_DECREF(iter);
    } else {
        if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) {
            __Pyx_UnpackTupleError(tuple, 2);
            goto bad;
        }
#if CYTHON_COMPILING_IN_PYPY
        value1 = PySequence_ITEM(tuple, 0);
        if (unlikely(!value1)) goto bad;
        value2 = PySequence_ITEM(tuple, 1);
        if (unlikely(!value2)) goto bad;
#else
        value1 = PyTuple_GET_ITEM(tuple, 0);
        value2 = PyTuple_GET_ITEM(tuple, 1);
        Py_INCREF(value1);
        Py_INCREF(value2);
#endif
        if (decref_tuple) { Py_DECREF(tuple); }
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
#if !CYTHON_COMPILING_IN_PYPY
    if (is_dict) {
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
    }
#endif
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) {
    PyObject *iter, *key = NULL, *value = NULL;
    int source_is_dict, result;
    Py_ssize_t orig_length, ppos = 0;
    iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_n_s_items, &orig_length, &source_is_dict);
    if (unlikely(!iter)) {
        PyObject *args;
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        args = PyTuple_Pack(1, source_mapping);
        if (likely(args)) {
            PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL);
            Py_DECREF(args);
            if (likely(fallback)) {
                iter = __Pyx_dict_iterator(fallback, 1, __pyx_n_s_items, &orig_length, &source_is_dict);
                Py_DECREF(fallback);
            }
        }
        if (unlikely(!iter)) goto bad;
    }
    while (1) {
        result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict);
        if (unlikely(result < 0)) goto bad;
        if (!result) break;
        if (unlikely(PyDict_Contains(kwdict, key))) {
            __Pyx_RaiseDoubleKeywordsError("function", key);
            result = -1;
        } else {
            result = PyDict_SetItem(kwdict, key, value);
        }
        Py_DECREF(key);
        Py_DECREF(value);
        if (unlikely(result < 0)) goto bad;
    }
    Py_XDECREF(iter);
    return 0;
bad:
    Py_XDECREF(iter);
    return -1;
}

#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
#if PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    } else {
        if (default_value == Py_None)
            default_value = NULL;
        value = PyObject_CallMethodObjArgs(
            d, __pyx_n_s_get, key, default_value, NULL);
    }
#endif
    return value;
}

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
                        PyErr_Clear();
                    else
                        return NULL;
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_dealloc != current_tp_dealloc)
        type = type->tp_base;
    while (type && type->tp_dealloc == current_tp_dealloc)
        type = type->tp_base;
    if (type)
        type->tp_dealloc(obj);
}

static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_traverse != current_tp_traverse)
        type = type->tp_base;
    while (type && type->tp_traverse == current_tp_traverse)
        type = type->tp_base;
    if (type && type->tp_traverse)
        return type->tp_traverse(obj, v, a);
    return 0;
}

static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_clear != current_tp_clear)
        type = type->tp_base;
    while (type && type->tp_clear == current_tp_clear)
        type = type->tp_base;
    if (type && type->tp_clear)
        type->tp_clear(obj);
}

static void* __Pyx_GetVtable(PyObject *dict) {
    void* ptr;
    PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
    if (!ob)
        goto bad;
#if PY_VERSION_HEX >= 0x02070000
    ptr = PyCapsule_GetPointer(ob, 0);
#else
    ptr = PyCObject_AsVoidPtr(ob);
#endif
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_VERSION_HEX < 0x03030000
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                #if PY_VERSION_HEX < 0x03030000
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                #endif
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_VERSION_HEX < 0x03030000
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_VERSION_HEX < 0x03030000
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    result = __Pyx_PyObject_GetAttrStr(nmspace, name);
    if (!result)
        result = __Pyx_GetModuleGlobalName(name);
    return result;
}

static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_COMPILING_IN_CPYTHON
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyMem_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
#if CYTHON_COMPILING_IN_PYPY
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    PyObject *self = f->m_self;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0 = PySequence_ITEM(arg, 0);
                if (unlikely(!arg0)) return NULL;
                result = (*meth)(self, arg0);
                Py_DECREF(arg0);
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
#else
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
	return PyCFunction_Call(func, arg, kw);
}
#endif
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_Call,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (__pyx_CyFunctionType == NULL) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyMem_Malloc(size);
    if (!m->defaults)
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc_2, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        __pyx_d,      /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
#endif

static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) {
        return PyClassMethod_New(method);
    }
#else
    static PyTypeObject *methoddescr_type = NULL;
    if (methoddescr_type == NULL) {
       PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append");
       if (!meth) return NULL;
       methoddescr_type = Py_TYPE(meth);
       Py_DECREF(meth);
    }
    if (PyObject_TypeCheck(method, methoddescr_type)) {
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        #if PY_VERSION_HEX < 0x03020000
        PyTypeObject *d_type = descr->d_type;
        #else
        PyTypeObject *d_type = descr->d_common.d_type;
        #endif
        return PyDescr_NewClassMethod(d_type, descr->d_method);
    }
#endif
    else if (PyMethod_Check(method)) {
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else if (PyCFunction_Check(method)) {
        return PyClassMethod_New(method);
    }
#ifdef __Pyx_CyFunction_USED
    else if (PyObject_TypeCheck(method, __pyx_CyFunctionType)) {
        return PyClassMethod_New(method);
    }
#endif
    PyErr_SetString(PyExc_TypeError,
                   "Class-level classmethod() can only be called on "
                   "a method_descriptor or instance method.");
    return NULL;
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return ::std::complex< float >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return x + y*(__pyx_t_float_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      __pyx_t_float_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

#if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        float denom = b.real * b.real + b.imag * b.imag;
        z.real = (a.real * b.real + a.imag * b.imag) / denom;
        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrtf(z.real*z.real + z.imag*z.imag);
          #else
            return hypotf(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
            __pyx_t_float_complex z;
            float r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    float denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(a, a);
                    case 3:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(z, a);
                    case 4:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                }
                r = a.real;
                theta = 0;
            } else {
                r = __Pyx_c_absf(a);
                theta = atan2f(a.imag, a.real);
            }
            lnr = logf(r);
            z_r = expf(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cosf(z_theta);
            z.imag = z_r * sinf(z_theta);
            return z;
        }
    #endif
#endif

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return ::std::complex< double >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return x + y*(__pyx_t_double_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      __pyx_t_double_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

#if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        double denom = b.real * b.real + b.imag * b.imag;
        z.real = (a.real * b.real + a.imag * b.imag) / denom;
        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrt(z.real*z.real + z.imag*z.imag);
          #else
            return hypot(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) {
            __pyx_t_double_complex z;
            double r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    double denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(a, a);
                    case 3:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(z, a);
                    case 4:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                }
                r = a.real;
                theta = 0;
            } else {
                r = __Pyx_c_abs(a);
                theta = atan2(a.imag, a.real);
            }
            lnr = log(r);
            z_r = exp(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cos(z_theta);
            z.imag = z_r * sin(z_theta);
            return z;
        }
    #endif
#endif

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
    const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(enum NPY_TYPES) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(int32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int32_t),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
#else
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
#endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}

static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *args;
            PyObject *function = PyMethod_GET_FUNCTION(method);
            args = PyTuple_New(2);
            if (unlikely(!args)) goto bad;
            Py_INCREF(self);
            PyTuple_SET_ITEM(args, 0, self);
            Py_INCREF(arg);
            PyTuple_SET_ITEM(args, 1, arg);
            Py_INCREF(function);
            Py_DECREF(method); method = NULL;
            result = __Pyx_PyObject_Call(function, args, NULL);
            Py_DECREF(args);
            Py_DECREF(function);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallOneArg(method, arg);
bad:
    Py_XDECREF(method);
    return result;
}

#include <structmember.h>
#include <frameobject.h>
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
#if PY_VERSION_HEX >= 0x030300A0
        if (ev && Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
#endif
        if (!ev || !PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            if (!ev) {
                Py_INCREF(Py_None);
                ev = Py_None;
            } else if (PyTuple_Check(ev)) {
                if (PyTuple_GET_SIZE(ev) >= 1) {
                    PyObject *value;
#if CYTHON_COMPILING_IN_CPYTHON
                    value = PySequence_ITEM(ev, 0);
#else
                    value = PyTuple_GET_ITEM(ev, 0);
                    Py_INCREF(value);
#endif
                    Py_DECREF(ev);
                    ev = value;
                } else {
                    Py_INCREF(Py_None);
                    Py_DECREF(ev);
                    ev = Py_None;
                }
            }
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = ev;
            return 0;
        }
    } else if (!PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
#endif
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
    PyObject *exc_type = self->exc_type;
    PyObject *exc_value = self->exc_value;
    PyObject *exc_traceback = self->exc_traceback;
    self->exc_type = NULL;
    self->exc_value = NULL;
    self->exc_traceback = NULL;
    Py_XDECREF(exc_type);
    Py_XDECREF(exc_value);
    Py_XDECREF(exc_traceback);
}
static CYTHON_INLINE
int __Pyx_Coroutine_CheckRunning(__pyx_CoroutineObject *gen) {
    if (unlikely(gen->is_running)) {
        PyErr_SetString(PyExc_ValueError,
                        "generator already executing");
        return 1;
    }
    return 0;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value) {
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            PyErr_SetString(PyExc_TypeError,
                            "can't send non-None value to a "
                            "just-started generator");
            return NULL;
        }
    }
    if (unlikely(self->resume_label == -1)) {
        PyErr_SetNone(PyExc_StopIteration);
        return NULL;
    }
    if (value) {
#if CYTHON_COMPILING_IN_PYPY
#else
        if (self->exc_traceback) {
            PyThreadState *tstate = PyThreadState_GET();
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
#endif
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(self);
    }
    self->is_running = 1;
    retval = self->body((PyObject *) self, value);
    self->is_running = 0;
    if (retval) {
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
#if CYTHON_COMPILING_IN_PYPY
#else
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_CLEAR(f->f_back);
        }
#endif
    } else {
        __Pyx_Coroutine_ExceptionClear(self);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(PyObject *retval) {
    if (unlikely(!retval && !PyErr_Occurred())) {
        PyErr_SetNone(PyExc_StopIteration);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen_FetchStopIterationValue(&val);
    ret = __Pyx_Coroutine_SendEx(gen, val);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = Py_TYPE(yf)->tp_iternext(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value);
    }
    return __Pyx_Coroutine_MethodReturn(retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL);
    if (retval) {
        Py_DECREF(retval);
        PyErr_SetString(PyExc_RuntimeError,
                        "generator ignored GeneratorExit");
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (!raised_exception
        || raised_exception == PyExc_StopIteration
        || raised_exception == PyExc_GeneratorExit
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
    {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *typ;
    PyObject *tb = NULL;
    PyObject *val = NULL;
    PyObject *yf = gen->yieldfrom;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
            goto throw_here;
        }
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Throw(yf, args);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Throw(yf, args);
        } else
        #endif
        {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            ret = PyObject_CallObject(meth, args);
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
}
static int __Pyx_Coroutine_traverse(PyObject *self, visitproc visit, void *arg) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    Py_VISIT(gen->exc_type);
    Py_VISIT(gen->exc_value);
    Py_VISIT(gen->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    Py_CLEAR(gen->exc_type);
    Py_CLEAR(gen->exc_value);
    Py_CLEAR(gen->exc_traceback);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label > 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *res;
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    if (gen->resume_label <= 0)
        return ;
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
    res = __Pyx_Coroutine_Close(self);
    if (res == NULL)
        PyErr_WriteUnraisable(self);
    else
        Py_DECREF(res);
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
{
    Py_INCREF(self->gi_name);
    return self->gi_name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
{
    Py_INCREF(self->gi_qualname);
    return self->gi_qualname;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject* type, __pyx_coroutine_body_t body,
                                                   PyObject *closure, PyObject *name, PyObject *qualname) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (gen == NULL)
        return NULL;
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->exc_type = NULL;
    gen->exc_value = NULL;
    gen->exc_traceback = NULL;
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    PyObject_GC_Track(gen);
    return gen;
}

static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (!abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_VERSION_HEX >= 0x03030000) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_VERSION_HEX >= 0x03030000) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if (0) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if PY_VERSION_HEX >= 0x030400a1
    __Pyx_Coroutine_del,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    py_name = __Pyx_PyIdentifier_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    py_name = __Pyx_PyIdentifier_FromString(class_name);
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (!strict && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility",
            module_name, class_name);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    else if ((size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s has the wrong size, try recompiling",
            module_name, class_name);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

#ifndef __PYX_HAVE_RT_ImportVoidPtr
#define __PYX_HAVE_RT_ImportVoidPtr
static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, name);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C variable %.200s",
                PyModule_GetName(module), name);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    *p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), name, sig, desc);
        goto bad;
    }
    *p = PyCObject_AsVoidPtr(cobj);}
#endif
    if (!(*p))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

#ifndef __PYX_HAVE_RT_ImportFunction
#define __PYX_HAVE_RT_ImportFunction
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, funcname);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C function %.200s",
                PyModule_GetName(module), funcname);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    tmp.p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, desc);
        goto bad;
    }
    tmp.p = PyCObject_AsVoidPtr(cobj);}
#endif
    *f = tmp.fp;
    if (!(*f))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
#if PY_VERSION_HEX < 0x03030000
        char* defenc_c;
        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
        if (!defenc) return NULL;
        defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        {
            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
            char* c;
            for (c = defenc_c; c < end; c++) {
                if ((unsigned char) (*c) >= 128) {
                    PyUnicode_AsASCIIString(o);
                    return NULL;
                }
            }
        }
#endif
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else
        if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (PyUnicode_IS_ASCII(o)) {
            *length = PyUnicode_GET_LENGTH(o);
            return PyUnicode_AsUTF8(o);
        } else {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
#else
        return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return __Pyx_NewRef(x);
  m = Py_TYPE(x)->tp_as_number;
#if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_MAJOR_VERSION < 3
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%.4s__ returned non-%.4s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(x);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
